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/co...
https://github.com/tsurdilo/process-designer/blob/master/src/main/java/co...
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&...]