[jboss-user] [JBoss jBPM] - Re: How to use FindTaskInstances in multiple transitions?

cristian_e do-not-reply at jboss.com
Thu Jun 28 10:03:46 EDT 2007


"MindTheGap" wrote : Ok, that's my point!
  | 
  | So what type of nodes i must use to have this kind of interface?
  | 
  | Fork node? ... using it, the token goes to B and C...and if the user choice B can i suspend/terminate the token in C?
  | 
Yes, you can. We have done this with the following steps:

- Capture the node-enter event for the fork's join. It will be activated when the first subtoken gets to the join.

- Set a context variable saying that the first token has arrived to the join. This can be whatever you want.

- Using this token, get a reference to all it's siblings (token.getParent().getChildren()).

- Cancel or end every sibling. If they are signalling, then at the join node-enter handler you have to check if the variable set when the first one entered is set. If it is, the previous steps should not be done again, and the token has to simply enter the node without doing anything more.

For the decision node case there are not subtokens, it's just the root token in this case that get redirected to either path. So you won't have B and C task instances simultaneously created, only one.


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

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



More information about the jboss-user mailing list