2 Replies Latest reply on Feb 16, 2012 4:29 AM by sebb

    Pause a process instance

    Shobhit Tyagi Master

      Hi,

       

      How can we pause a process instance. All I could find was an API to resume it. But nothing about pause. Also if it is possible to do that then what is the impact on timers?

       

      Regards.

        • 1. Re: Pause a process instance
          Shobhit Tyagi Master

          Adding to this query, is suspended state same as paused state? Plus again, how do I change the state of a process from active to suspended?

           

          Regards.

          • 2. Re: Pause a process instance
            sebb Newbie

            You cant really pause a process instance like you may know it from bpel engines. I asked a smiliar question a while back and the solution was to create an AbstractWorkItem which holds a pause flag. This way you can pause your process instance by blocking the execution of all workitems when the pause flag is set. But it wont work with timers :/ Maybe I'll find my thread and can add further info to your paused/suspended state question, because it was explained there.

             

            Edit: I just found my thread (https://community.jboss.org/thread/177360):

             

            Esteban Aliverti schrieb:

            • ksession.signalEvent() -> if the process is suspended in a event
            • ksession.getWorkItemManager().completeWorkItem() -> if the process is suspended in an async Task
            • using Human Task Client API -> if the process is suspended in a Human Task
            • ksession.fireAllRules() -> if the process is suspended in a Rule Task node.

             

            A little hint since you waited ages for an answer: Maybe you should post your questions in the "jbpm" rather than the "jbpm development" section.