[jboss-user] [JBoss jBPM] - unable to do graph navigation in jbpm using token.signal or
do-not-reply at jboss.com
Thu Jan 8 10:05:21 EST 2009
I have a process definition with a start state, end-state and a node in between. I have configured actionhandlers for the start state , node and the end
state. i am using the jbpm exceutioncontext from the execute() method to advance the token using either :
a) context.getNode().leave(context, namedTransition);
in the second case i am explicitly unlocking the current node using the token id as below:
long tokenId = context.getToken().getId();
Token currentToken = context.getToken();
currentToken.unlock("token[" +new Long(tokenId).toString()+"]");
the events which i am checking for are node-enter and node-leave events in the execute method which I am overriding in my ActionHandlers configured for these
start-state = node-leave
node = node-enter and node-leave
end-state = node-enter
start-state ---transition1---> node1 ---transition2 ----> end-state
For the above scenario everything works as expected.
However if i introduce one more node between the start and end states :
start-state ---transition1---> node1 ---transition2 ----> node2 ----transition3----> end-state
the process instance doesnt complete and in one case returns the token to the first node and in another returns the token to the second node. Thus the
process instance wont complete unless i explicitly keep calling the token.signal(transition) or the node.leave(transition) as stated above.
Can anyone help me resolve this ? I have tried task-nodes as well but the behaviour is erratic.
Is there something in the API I am missing ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4200366#4200366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4200366
More information about the jboss-user