1 Reply Latest reply on Aug 7, 2012 10:46 AM by jsvitak

    java threads creation during workflow/process

    jerishsunny

      Hi,

       

      I am trying to create a new jbpm based application. I would like to know the following questions:-

      1) When there is multiple workflow invocation, will there be one to one java thread created.

      2) will jbpm be executed as a separate process from JBoss.

        • 1. Re: java threads creation during workflow/process
          jsvitak

          Hello,

          I am not 100% sure, but as far as I know:

           

          The jBPM doesn't start its own thread, it just borrows the calling thread and evaluates the business process. When it enters timer, human task or waiting service task, then it starts new threads for each of these items. When these items end their waiting (time elapsed, response arrived) then the engine starts again. So after you call method startProcess, then the engine finishes what is possible and returns, but the business process itself continues. For example that's why you should put every long time computation in service tasks instead of script tasks.

           

          So the jBPM doesn't start a separate thread or OS process dedicated for the whole lifecycle of the business process. If I am wrong, then I hope that someone will me correct me.

           

          Regarding your 2) - I don't understand your question. jBPM engine is usually embedded inside your own application. You can also use jbpm-console deployed on JBoss AS and start there business process instances remotely.

           

          Hope this helps