Node to decision to node-task exception
weliwarmer Aug 30, 2005 6:13 AMHi,
I have a process that runs some Java, makes a decision on the results and either ends or loops via a node-task.
The node-task is intended for the user to display a jsp page and they can confirm the error before retrying the original node.
Like this....
<process-definition name="tims-test"> <start-state name="start"> <transition name="tr1" to="Start Remote Farm Job"></transition> </start-state> <node name="Start Remote Farm Job"> <event type="node-enter"> <action class='workflow.jbpm.actions.SetPageHandler'> <page>remote.jsp</page> </action> <action class='workflow.jbpm.actions.FarmStartJobHandler'> <propertiesfile>farm.properties</propertiesfile> </action> </event> <transition name="tr1" to="Was Remote Job Successful"></transition> </node> <decision name="Was Remote Job Successful"> <handler class="workflow.jbpm.delegators.RemoteResponseDecisionHandler" /> <transition name="success" to="Processing Complete"></transition> <transition name="fail" to="Remote Job Failed"></transition> </decision> <node-task name="Remote Job Failed"> <event type="node-enter"> <action class='workflow.jbpm.actions.SetPageHandler'> <page>error.jsp</page> </action> </event> <transition name="Re-run Remote Job" to="Start Remote Farm Job"></transition> </node-task> <end-state name="Processing Complete"></end-state> </process-definition>
Problem is that the transition to the node-task fails with an exception. If this is changed to a state element instead of node-task, the process works as expected.
10:49:20,086 ERROR GraphElement : action threw exception: null java.lang.NullPointerException at org.jbpm.graph.def.Transition.fireSuperStateEnterEvents(Transition.java:103) at org.jbpm.graph.def.Transition.take(Transition.java:82) at org.jbpm.graph.def.Node.leave(Node.java:349) at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:101) at org.jbpm.graph.node.Decision.execute(Decision.java:94) at org.jbpm.graph.def.Node.enter(Node.java:284) at org.jbpm.graph.def.Transition.take(Transition.java:92) at org.jbpm.graph.def.Node.leave(Node.java:349) at org.jbpm.graph.def.Node.leave(Node.java:313) at org.jbpm.graph.exe.ExecutionContext.leaveNode(ExecutionContext.java:85) at workflow.jbpm.actions.StartRemoteJobHandler.execute(StartRemoteJobHandler.java:79) at org.jbpm.graph.def.Action.execute(Action.java:79) at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:186) at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.java:149) at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:133) at org.jbpm.graph.def.Node.enter(Node.java:274) at org.jbpm.graph.def.Transition.take(Transition.java:92) at org.jbpm.graph.def.Node.leave(Node.java:349) at org.jbpm.graph.node.StartState.leave(StartState.java:73) at org.jbpm.graph.exe.Token.signal(Token.java:127) at org.jbpm.graph.exe.Token.signal(Token.java:92)
Anyone have any ideas to what I have missed to casue a transition to a node-task to fail?
Thanks,
Tim