I have a simple example usage of the ProcessState node, where a parent process contains a reference to a child process via a ProcessState node. The process definitions are stored in a relational database.
The child process actually executes successfully (I have a single node with an ActionHandler that prints the node name to System.out).
However, I receive a NullPointerException in the ProcessState.leave() method - the executionContext.getSubProcessInstance() method call (first line in the method) returns null, and the next line then attempts to invoke a method on this null reference.
I see from the debugger that the executionContext object in the ProcessState.execute() method is different from the executionObject I later see in the ProcessState.leave() method - though in both methods the subProcessInstance member of the executionContext object is null.
Here are my two process definitions:
<action name="action" config-type="bean" class="SysoutActionHandler">
Any ideas? Given my limited analysis of the ProcessState.java code and related classes, I do not see how this can actually work - am I seeing a bug?
Please post a JUnit test demonstrating this behaviour... We cannot see what the real problem is just by seeing your processdefinition...