3 Replies Latest reply on Oct 3, 2011 5:44 PM by rrpeterson

    Event to skip to a different node in the Process?

    rrpeterson

      Hi guys,

       

      I've got a process/process instance with several nodes, something like:
      start -> sendEmail -> 3-day timer -> send 2nd email -> 3-day timer -> send final email -> wait 3 days -> end

       

      If the user opens the email and clicks a link, I'd like to send an event to JBPM to move them into a 2nd process (or branch of this process).  The click could happen at any time/node within the process after the first sendEmail node.  Is it possible for an event to enact this type of behavior?

       

       

      Thanks in advance for any suggestions!

        • 1. Re: Event to skip to a different node in the Process?
          bob_flip

          Hi Ryan,

           

          You can create a HumanTask like a parallel branch for each timer. Then  user will complete the HumanTask, and process will moved to next node immediately.

           

          Rgds,

          Bob 

          • 2. Re: Event to skip to a different node in the Process?
            rrpeterson

            Thanks Bob, that does seem to make the most sense.  So in the previous example:

             

            start -> [sendEmail] -> [3-day timer] -> [send 2nd email] -> [3-day timer] -> [send final email] -> [3-day timer] -> end

                                                 |event|                                           |event|                                             |event|

                                                                                             [newServiceTask] -> [x-day timer] -> [etc..]

             

            Anytime the event gets triggered while in the timer states, they would know to proceed through to [newServiceTask] rather than continuing on the previous node path. 

             

            I'll give this a shot & report back, thanks!

            • 3. Re: Event to skip to a different node in the Process?
              rrpeterson

              I wound up using a diverging eventBasedGateway.

               

              Two nodes extend from the eventBasedGateway, the first is a timer, the second is an event.  Whichever occurs first invalidates the other path, and execution continues from that node onwards.