2 Replies Latest reply on Feb 22, 2011 4:31 AM by odelyaholiday

    Cancel timer node jbpm5.0

    odelyaholiday

      What is the way to cancel timer node in JBPM5.0?

       

      How can I retrieve it and cacnel it?

        • 1. Cancel timer node jbpm5.0
          krisverlaenen

          You can cancel a timer if you know the timer instance id and ask the timer manager to cancel that timer instance.

           

          In general however, it isn't trivial to get access to this information without diving into the details.  That is why there is a best practice guideline that helps you managing cases where you need to cancel a timer: instead of trying to cancel the timer instance directly, you just cancel the node / sub-process that the timer is defined in, which will also cancel the timer instance.

           

          For example, if you have a boundary timer event, canceling the node that the boundary event was linked to will also cancel the timer.  Similarly, if you use a sub-process that contains the timer, completing or aborting that subprocess will also cancel the contained timer instances.

           

          Kris

          • 2. Re: Cancel timer node jbpm5.0
            odelyaholiday

            If I am using sub process, it has id as number. can I change the number to String? the designer is disabled for this option.

             

            So how will I stop this process?Which name shall I use?

             

            Please see the attached image from the workflow - what I need is to create timer once the application starts. If something happens during the workflow - I have to cacnel the timer. otherwise the timer will be invoked and stop the process