-
1. Re: Drools Guvnor problem
eaa Dec 4, 2011 6:57 AM (in response to paulcoronel)I'm also integrating Guvnor with my web application and I'm experiencing the same problem you have. What you would need to do is to refresh the iframe where Guvnor is whenever you save the process. The problem is that right now, there is no way to add some kind of listener to Guvnor's save button when you are editing a process.
I will try to add this functionality into Guvnor soon.
Best Regards,
-
2. Re: Drools Guvnor problem
paulcoronel Dec 5, 2011 2:12 PM (in response to eaa)Thank you Esteban, I'll be waiting for your solution
-
3. Re: Drools Guvnor problem
eaa Dec 9, 2011 6:16 AM (in response to paulcoronel)I have created an issue for this problem: https://issues.jboss.org/browse/GUVNOR-1774
-
4. Re: Drools Guvnor problem
eaa Dec 9, 2011 6:57 AM (in response to eaa)And this is the pull request: https://github.com/droolsjbpm/guvnor/pull/28
Let's wait and see if drools' team apply it.
What I did was basically to add 2 new hook function in JS:
registerBeforeSaveAllButtonCallbackFunction() and registerAfterSaveAllButtonCallbackFunction(). Using them, you can attach your own listeners to, for example, refresh the iframe after the process as been saved.
Best Regards,
-
5. Re: Drools Guvnor problem
paulcoronel Dec 13, 2011 3:18 PM (in response to eaa)Hi,
to avoid this problem
Is there any way to save the bpmn2 process, from my own save button?
Drools Guvnor does this
Thanks in advance
-
6. Re: Drools Guvnor problem
tsurdilovic Dec 14, 2011 12:04 AM (in response to paulcoronel)>> Is there any way to save the bpmn2 process, from my own save button? <<
Yes, but it would involve some trickery:
1) First you have to get the JSON representation of the process via JavaScript:
window.frames[X].ORYX.EDITOR.getSerializedJSON()
where X is the number of the frame in your doc
2) Pass the JSON to designer to get it to convert it to BPMN2 (post):
localhost:8080/designer/uuidRepository?profile=jbpm&action=toXML&data=<YOUR JSON HERE>&pp=
3) Use the Guvnor rest api to create a new asset with its source being the BPMN2 you got back from Designer:
see this class as example on that...https://github.com/tsurdilo/process-designer/blob/master/src/main/java/com/intalio/web/server/TaskFormsServlet.java
Hope this helps
-
7. Re: Drools Guvnor problem
paulcoronel Jan 9, 2012 12:17 AM (in response to tsurdilovic)Thanks,
I have a new question. Now, i need to know the designer URL to create a new process, i tried:
http://localhost:8080/designer/editor/?locale=es_ES&profile=jbpm
but, shows some errors on the server
Can you help please
Thanks in advance -
8. Re: Drools Guvnor problem
tsurdilovic Jan 9, 2012 12:49 AM (in response to paulcoronel)Designer deffers creation of new assets and saving to Guvnor as that is the asset repository. For some reason I think this blog post will be
of help to you: http://blog.athico.com/2011/04/using-oryx-designer-and-guvnor-in-your.html
Hope this helps.