finally I will do that :
| <?xml version="1.0" encoding="UTF-8"?> | | <process-definition xmlns="urn:jbpm.org:jpdl-3.1" | name="super-process"> | | <swimlane name="tester"> | <assignment expression="user(ernie)" /> | </swimlane> | | <start-state name="start"> | <task name="start-task" swimlane="tester"> | <controller> | <variable name="an-other-sub-process.counter" /> | </controller> | </task> | <transition name="" to="an-other-sub-process" /> | </start-state> | | <decision name="an-other-sub-process"> | <handler class="com.traceone.bpm.ext.decision.CounterDecision" /> | <transition name="no" to="join" /> | <transition name="yes" to="my-fork" /> | </decision> | | <fork name="my-fork"> | <transition to="sub-process-state" /> | <transition name="to-an-other" to="an-other-sub-process" /> | </fork> | | <process-state name="sub-process-state"> | <sub-process name="sub-process" /> | <transition to="join" /> | </process-state> | | <join name="join"> | <transition to="end" /> | </join> | | <end-state name="end" /> | | </process-definition> | | public class CounterDecision implements DecisionHandler { | | public String decide(ExecutionContext executionContext) throws Exception { | Decision decision = (Decision) executionContext.getNode(); | String varName = new StringBuffer(decision.getName()).append(".counter").toString(); | String tmp = (String) executionContext.getVariable(varName); | int counter = Integer.parseInt(tmp); | String transition = counter > 0 ? "yes" : "no"; | executionContext.setVariable(varName, String.valueOf(--counter)); | return transition; | } | | } | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3954374#3954374 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3954374 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user