2 Replies Latest reply on Sep 4, 2006 5:27 AM by shan weiZhong

    question on Fork&Join

    Lin Jin Newbie

      I have 3 swimlane "applyer"."manager","boss"
      My simple process acts like this
      when applyer applies an activity,either manager or boss can check the applyer's request and make a decision,as soon as one make the decision ,
      the process flows to the end
      so I fork two transition use the fork tag,one transition to the boss decision,
      the other flow to the manager decision,so what should I do in the join node
      I have try to act like this ,but I failed

      <action event-type="node-enter">




      public class JoinActionHandler implements ActionHandler {

      public void execute(ExecutionContext ec) throws Exception {
      Token currentToken = ec.getToken();
      Token parentToken = currentToken.getParent();
      Map tokenMap = parentToken.getChildren();
      Iterator it = tokenMap.values().iterator();
      while(it.hasNext()) {
      Token token = (Token)it.next();
      token.end();
      }
      parentToken.signal();
      }

      }

        • 1. Re: question on Fork&Join
          shan weiZhong Newbie

          I have the same problem,but I want the current token continue,and the other tokens end?
          This is easier to do,but the other problem is that the taskInstances of the ended token can not be automatically canceled.
          Can I only manually do this?if I manually do this,I find both taskInstance.cancel() and taskInstance.end() can not be used,because they will call the related event and action.Only taskInstance.setEnd(Date) can use?

          I think that should offer a method like cancel which only cancel task but not to do related event and action.This is needed in the business.

          • 2. Re: question on Fork&Join
            shan weiZhong Newbie

             

            "mrshan" wrote:
            I have the same problem,but I want the current token continue,and the other tokens end.
            This is easier to do,but the other problem is that the taskInstances of the ended token can not be automatically canceled.
            Can I only manually do this?if I manually do this,I find both taskInstance.cancel() and taskInstance.end() can not be used,because they will call the related event and action.Only taskInstance.setEnd(Date) can use?

            I think that should offer a method like cancel which only cancel task but not to do related event and action.This is needed in the business.