3 Replies Latest reply on Sep 2, 2014 4:05 AM by salaboy21

    complete task api of Human task service jBPM5

    mayankjain

      Hi everyone,

       

      I have one doubt on complete task api provided by jBPM. I need some clarity on that.


      When we invoke the complete task api, how the internal process system works? I mean after invoking the complete task api, It will reach to safe state than only will return the call back ? or It will execute as a separate thread which will just complete the human task irrespective to wait for executing the next sequence of flow?

       

      Any help will be appreciated.

       

      Greetings

        • 1. Re: complete task api of Human task service jBPM5
          mdegan

          Hi,

           

          Based on my understanding, the Human Task service is an asynchronous service that gets the tasks delegated to it from the JBPM process engine. Whenever a Human Task node is reached in the process flow, a safe point is reached. At this point the HTWorkItemHandler will register a task with the HT service and wait till HT service signals back on task completion. So effectively, the JBPM engine is no longer executing anything till it hears back from the HT service. Once you invoke the complete task call, HT service picks up the result map and sends a signal back to the JBPM engine on task completion. At that instance, the engine resume execution of the rest of the process till it reaches another safe point.

           

          Regards,

          Manny

          • 2. Re: complete task api of Human task service jBPM5
            mayankjain

            Hi Manny,

             

            Thanks to replay. My understanding is also quite same. In my scenario, I have three tasks which need to be executed on completion of a human task. I tried completing human task with HT service and it gives back the control until it executes all other tasks and reaches another safe point which is end process event in my case.

             

            Greetings,

            Mayank

            • 3. Re: complete task api of Human task service jBPM5
              salaboy21

              Manny's answer is accurate and correct, so you can please mark the question as answered?