[jboss-user] [jBPM] - Re: How to Save jBPM 5.1 Process Definition Created via API?

Estelle Guallar do-not-reply at jboss.com
Tue Dec 6 03:27:40 EST 2011


Estelle Guallar [http://community.jboss.org/people/jbpm2011] created the discussion

"Re: How to Save jBPM 5.1 Process Definition Created via API?"

To view the discussion, visit: http://community.jboss.org/message/639975#639975

--------------------------------------------------------------
Thank you for your answer 

My principal object is to save in the file processdefinition.xml i didn't use the same method of you here is my code : 

*import org.jbpm.bpmn2.xml.XmlBPMNProcessDumper;*
*import org.jbpm.graph.def.ProcessDefinition;*
*import org.jbpm.workflow.core.impl.WorkflowProcessImpl;*


*public class ProcessTest*
*{*
*public static void main(String[] args)*

*   {* 
*      System.out.println("Start ");*



*      ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("processdefinition.xml");*
*    System.out.println("before modification");* 
*    System.out.println(processDefinition.getName());*
*    processDefinition.setName("My second name");*
*    System.out.println("before modification");* 
*    System.out.println(processDefinition.getName());*

*   // now i try to persist this modification in my processdefinition.xml*

*    WorkflowProcessImpl process= new WorkflowProcessImpl();*
*    process.getMetaData();*
*    //process.getMetaData("processdefinition.xml");*

*    System.out.println(XmlBPMNProcessDumper.INSTANCE.dump(process, XmlBPMNProcessDumper.NO_META_DATA));*

*    System.out.println(processDefinition.getName());*


   This is my class but i didnt knew why we are not using the same syntax, we have two different code but we are using the same API and i guess the same object.

   I will explain to you: I have the processdefinition.xml file i want to save any changes related to the process in this file so do you have any ideas or any suggestion  

Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/639975#639975]

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/20111206/5a2d21f9/attachment.html 


More information about the jboss-user mailing list