[jboss-user] [JBoss jBPM] - How to end TaskInstance in a ActionHandler

freak182 do-not-reply at jboss.com
Thu Jun 4 07:33:23 EDT 2009


Hello,

I get the TaskInstance in ActionHandler like this:


  | final Collection<TaskInstance> tasks = context.getTaskMgmtInstance().getTaskInstances();
  | 
  | for(TaskInstance inst : tasks){
  | 			inst.end();
  | 		}
  | 

also i try this....


  | final Collection<TaskInstance> tasks = context.getTaskMgmtInstance().getTaskInstances(); 
  | 		final Token token = context.getToken();
  | 		
  | 		token.signal();
  | 		for(TaskInstance inst : tasks){
  | 			
  | 			inst.end();
  | 		}
  | 		
  | 		context.getJbpmContext().save(token.getProcessInstance());
  | 
  | 
  | 

..the above code works but is does not route the next task to the intended transition ("to approver B").The transition was taken is the default transition. I even force the the transition with this>


  | 
  | private String timeoutTransition;
  | 
  | ................................
  | 
  | final Collection<TaskInstance> tasks = context.getTaskMgmtInstance().getTaskInstances(); 
  | 		final Token token = context.getToken();
  | 		
  | 		token.signal(timeoutTransition);
  | 		for(TaskInstance inst : tasks){
  | 			
  | 			inst.end(timeoutTransition);
  | 		}
  | 		
  | 		context.getJbpmContext().save(token.getProcessInstance());
  | 
  | 
  | 

the above code give me CuncurrentModificationException...any ideas?

Thanks a lot.
Cheers.


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

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



More information about the jboss-user mailing list