Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JBoss User Help »

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

scott.stark@jboss.org

2007-06-15


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
_______________________________________________
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user
©2008 junlu.com - Jax Systems, LLC, U.S.A.