3 Replies Latest reply on Feb 22, 2012 4:09 AM by eaa

    Does jBPM5 Start Process and Event handling block current thread?

    rohit_r

      When we start a new process or send an event back to jBPM engine, does the current thread get blocked till we reach async node or end of process?

       

      Thanks

      Rohit

        • 1. Re: Does jBPM5 Start Process and Event handling block current thread?
          eaa

          Every time you interact with a process: start it, signal it, complete a work item, etc., you are using the calling thread to do it. Each of those methods will execute all the possible nodes using the current thread until it reaches a wait-state or the end of the process.

           

          Best Regards,

          • 2. Re: Does jBPM5 Start Process and Event handling block current thread?
            rohit_r

            Thanks for the reply.

             

            In jbpm3 there was an option to process a node asyncrhonously. These async nodes were picked up by some scheduled service provided by jBPM engine for processing. In jBPM5 if we do not want to block the thread starting the process, is there some task node level config that we can use? Or is it recommended that the thread starting the process itself should be in a separate thread from rest of the application (either via JMS or simple java threading).

             

            Thanks.

            Rohit

            • 3. Re: Does jBPM5 Start Process and Event handling block current thread?
              eaa

              There is not such mechanism in jbpm5 as far as I know. You can create something similar usign asynchronous work item handlers, but you still need to create the scheduler that picks up those processes.

              A common practice, as you said is to communicate with process instances using a JMS queue. This way you not only have asynchronous processing, but you also gain some fail-safe features as well.

               

              Best Regards,