0 Replies Latest reply on May 12, 2006 4:18 PM by Nidhi Sobti

    Basic questions about jbpm

    Nidhi Sobti Newbie

      Hello friends,

      I am in the process of integrating jbpm 3.1 with my application. I have the following (basic) questions:

      1. What is it in JBPM that controls the transition of a process instance from one state to another? Also, what is the lifetime of this? When is it started and shut down? What keeps a track of all the instances in the workflow, and their status?

      2. I need to be able to create new process instances, and insert them into the workflow, one by one, in order, without waiting for them to complete or fail. I am doing the following for inserting each process instance :

      JbpmContext context = jbpmConfiguration.createJbpmContext();
      ProcessInstance instance = processDefinition.createProcessInstance();
      instance.signal();
      context.save(instance);
      context.close();


      However, I see that this class blocks until each process instance completes. How can I prevent this from happening?

      Also, if the process instance encounters an exception in the 'n'th stage, then the stack trace contains this class, and leaveNode() from the 1st to 'n'th stage. Is there any way to isolate the stages, so that one stage is not dependant on the coming stages.

      Does using 'async' for the nodes solve this problem? I am not using 'async' currently, as I am not sure how it works.

      3. Is it bad calling 'jbpmConfiguration.createJbpmContext()' often in an app using JBPM? I am using it each time to create a new process instance?

      4. If my app class (this is a thread) which inserts process instances into jbpm workflow dies, then what happens to the process instances which were executing and not completed yet? Does jbpm know that it has to suspend them? Now, if my thread starts again, will these instances be picked up and processed from where they left off, or do I need to add the logic into my app to do so?


      Thanks.