I'm new to jBpm but from what I've seen until this moment yes you can.
You just have to instanciate a ProcessInstance anywhere in your app
ProcessInstance processInstance = new ProcessInstance(processDefinition);
You can also use a Process State in your process definition. This puts another process into your process as a sub-process.
Ha, can you show me how to using process state.
give me a sample please!
have you taken a look at the documentation? The testcases? Searched the forum? There is enough info in there to get at least started. If you encounter problems then, get back to us and we'll try to help
Here is what it looks like in the XML:
<process-state name="David"> <sub-process name="david" /> <variable name="FirstName" /> <variable name="LastName" /> <transition name="" to="end1"></transition> </process-state>
Also see the User Guide (http://docs.jboss.com/jbpm/v3/userguide/) Sections 4.3.3 and 9.8.
Oops...Ronald posted while I was posting...I didn't give the poster a chance to learn his lesson I suppose.