[jboss-user] [jBPM] - Re: Drools Guvnor problem
Tihomir Surdilovic
do-not-reply at jboss.com
Wed Dec 14 00:04:31 EST 2011
Tihomir Surdilovic [http://community.jboss.org/people/tsurdilovic] created the discussion
"Re: Drools Guvnor problem"
To view the discussion, visit: http://community.jboss.org/message/641433#641433
--------------------------------------------------------------
>> 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 https://github.com/tsurdilo/process-designer/blob/master/src/main/java/com/intalio/web/server/TaskFormsServlet.java
Hope this helps ;)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641433#641433]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111214/4462ec0b/attachment.html
More information about the jboss-user
mailing list