[jboss-user] [JBoss jBPM] - End a path of execution

pattchen do-not-reply at jboss.com
Fri Jun 15 04:30:09 EDT 2007


hi,
I would like to know how to end a path of execution in jBPM. In fact, i have a path of execution which should end if a certain condition is evaluated to true, so that others activities will not take place.

I've tried these solutions:
1.
if(condition){
  |        executionContext.getToken().end;   
  | }
  | else{
  | executionContext.leaveNode();
  | }

2.
if(condition){
  |         Node endNode = executionContext.getProcessDefinition().findNode("end");        
  |         executionContext.getToken().setNode(endNode);   
  | }
  | else{
  | executionContext.leaveNode();
  | }

3.
if(condition == false){
  | executionContext.leaveNode();
  | }

all work, but I feel that there is a difference because solutions 1 and 2 explicitly end the path of execution while the third just behaves as a state node.

Can someone explain me the difference, and which is the right solution to resolve my problem?

Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4054635#4054635

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4054635



More information about the jboss-user mailing list