[jboss-user] [JBoss jBPM] - Re: Cange swimlane at runtime

pgros do-not-reply at jboss.com
Tue Dec 2 10:00:59 EST 2008


When i create my process instance i set the var "SWIMLANE" to "Unknown"

i have following nodes

startstate -> node -> tasknode1 -> tasknode2

"node" sets var "swimlane" to "test"

then i overrided the enter() function of tasknode as following


  |   @Override
  | 	public void enter(ExecutionContext executionContext) {
  | 		// TODO Auto-generated method stub
  | 		super.enter(executionContext);
  | 		
  | 		
  | 		
  | 		for ( TaskInstance ti : (Collection<TaskInstance>)getTaskMgmtInstance(executionContext.getToken()).getTaskInstances()) {
  | 			ti.setActorId(executionContext.getVariable("SWIMLANE").toString());
  | 			System.out.println("Set " + ti.getName() + " actor to " + executionContext.getVariable("SWIMLANE").toString());
  | 		} 
  | 	}
  | 

Output:

Set node1task actor to Unknown
Set node2task actor to Test



but node1task should have been set to test, too... 

seems that the variable isn't set fast enough or something like that, how can it be? ... i didn't set any asynchonous nodes

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

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



More information about the jboss-user mailing list