-
1. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
saraswati.santanu Nov 13, 2009 1:10 AM (in response to mike_burton)There is no such matching class in jbpm4. Maybe org.jbpm.pvm.internal.model.Activity (or org.jbpm.pvm.internal.model.ActivityImpl) and org.jbpm.api.activity.ActivityBehaviour combination can be thought of as a closer match, but no way they can be called the same.
I believe Node is typically for graph based process models. Activity is more generic. -
2. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
kukeltje Nov 13, 2009 3:30 AM (in response to mike_burton)What are you trying to achieve?
-
3. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
mike_burton Nov 13, 2009 4:59 PM (in response to mike_burton)I am trying to create the process definition xml file in jBPM 4.2 programatically and am able to create it using DOM4j.
I guess we can achieve this in jBPM 3.2, using ProcessDefinition class by getting nodes, transitions etc..
Just i am curious to know is there same kind of classes availble in jBPM 4.2 also to create process defintion xml File.
Can anyone help me in parsing the process definition xml file which is generated programtically in jBPM4.2. Is there any class in jBPM 4.2 to parse this process definition xml file?
Please guide me
I am new to jBPM
Thanks! -
4. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
saraswati.santanu Nov 14, 2009 12:08 AM (in response to mike_burton)org.jbpm.jpdl.internal.xml.JpdlParser is the cental class which does the parsing. And there are binding classes which parse the individual nodes. For example, there is "org.jbpm.jpdl.internal.activity.StartBinding" for parsing start node. You will see the full list in jbpm.jpdl.bindings.xml.
Once you generate the xml, you typically should not need to parse it by calling JpdlParser, NewDeployment.deploy() method does it all for you. -
5. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
mike_burton Nov 18, 2009 12:05 PM (in response to mike_burton)Thanks Santanu.
I am able to deploy my xml using method deploy() in NewDeployment class.
Is there any way to map this xml to ProcessDefinition class in jBPM 4.x.
Thanks in advance for your valuable reply.. -
6. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
saraswati.santanu Nov 18, 2009 4:38 PM (in response to mike_burton)ProcessDefinition has a deployment (refer to ProcessDefinition.getDeploymentId()). Deployment id is retrieved from process definition. Use DeploymentQuery to find the Deployment using the id. You can get the xml from this deployment. However the bad part is you have to type cast Deployment to DeploymentImpl to be able to access the xml resources. You need to use getResource(String) method there of DeploymentImpl.
-
7. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
mike_burton Nov 19, 2009 12:20 PM (in response to mike_burton)Thanks for your reply
I am not sure how to get ProcessDefinition (like from which class etc..). But i am able to get the deployments by using the below code.
String lDeploymentID = lRepositoryService.createDeployment().setName(workflowname).addResourceFromString("xmlstring.jpdl.xml", lWorkflowXML).deploy();
List deployments = RepositoryService.createDeploymentQuery().deploymentDbid(Long.parseLong(lDeploymentID)).list();
Is this the correct way to get the specific deployment from db?
Also how can i get the ProcessDefinition object once deploy the xml string? -
8. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
saraswati.santanu Nov 19, 2009 1:24 PM (in response to mike_burton)String deploymentId = repositoryService.createDeployment().addResourceFromString("xmlstring.jpdl.xml", workFlowXml).deploy(); //now we query the process definition ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().deploymentId(deploymentId).uniqueResult();
I think the way you are getting deployment is correct. -
9. Re: [jBPM-3.2] - org.jbpm.graph.def.Node Classs
mike_burton Nov 20, 2009 11:39 AM (in response to mike_burton)Thanks for all your help. The code worked for me.