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.
Thank you Esteban, I'll be waiting for your solution
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.
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
>> Is there any way to save the bpmn2 process, from my own save button? <<
Yes, but it would involve some trickery:
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
I have a new question. Now, i need to know the designer URL to create a new process, i tried:
but, shows some errors on the server
Can you help please
Thanks in advance
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
Hope this helps.