Please somebody gives for users right information about correct configuration for working with sub-processes. In docs this information very briefly!
I get the following exception:
org.jbpm.JbpmException: can't create a process instance when processDefinition is null org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:109) org.jbpm.graph.exe.ProcessInstance.<init>(ProcessInstance.java:91) org.jbpm.graph.exe.Token.createSubProcessInstance(Token.java:612) org.jbpm.graph.node.ProcessState.execute(ProcessState.java:157) org.jbpm.graph.def.Node.enter(Node.java:318)
Deploying sub-process before deploying main-process doesn't solve problem: the same error I've got.
This doesn't help too:
<jbpm-configuration> <bean name="jbpm.sub.process.resolver" class="org.jbpm.graph.node.DbSubProcessResolver" /> </jbpm-configuration>
And when I can use binding?
<process-state name="ext_tx_execution" binding="late"> <sub-process name="ext_tx_execution" /> <variable name="a" access="read,write" mapped-name="aa" /> <variable name="b" access="read" mapped-name="bb" /> <transition name="" to="end"></transition> </process-state>
This code gives an exception:
org.jbpm.jpdl.JpdlException: [[ERROR] line 32: cvc-complex-type.3.2.2: Attribute 'binding' is not allowed to appear in element 'sub-process'.] org.jbpm.jpdl.xml.JpdlXmlReader.readProcessDefinition(JpdlXmlReader.java:173) org.jbpm.jpdl.par.JpdlArchiveParser.readFromArchive(JpdlArchiveParser.java:51) org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:81)
Maybe there is other invisible for me things for solving this problem? Maybe if you would write instructions or examples for deploying sub-processes, it will be very good help for users!! And maybe do you have ready examples with working sub processes?
When main-process meets <proccess-state> the process engine should take the provided (by name) process and find in DB the process which will be invoked as a sub-process? Why is the findLatestProcess method used? How does the execution depend on version of the main process and sub?
Thanks in advance.