0 Replies Latest reply on Nov 21, 2016 6:45 AM by Lalit Patel

    how to use "per process instance" runtime strategy with Jbpm 6.4 in spring framework

    Lalit Patel Newbie

      Dear All,


      I have a business process with multi instance human task subprocess. Basically, it is leave approval process where one or many person may be involve to approve an employee leave.leave_application_process.png

      Here employee apply for leave for one or more people sign it to get task done.With Singleton strategy everything is running fine.Now I want to migrate it to "per process instance" runtime strategy. For that I modified code and added following code


      this.kieSession = this.runtimeManager.getRuntimeEngine(ProcessInstanceIdContext.get()).getKieSession();



      I have following doubts:-


      1. Is creation of Kie Session is required only at the time starting of process ?

      2. How to extract process_instance_id for accessing kie session in future while signing the leave ?

      3. What is best approach to solve the above problem ?

      4. Is "per process instance" runtime strategy is enough or should I nee move to "per request" runtime strategy ?

      5. What is exact difference between Singleton and "per process instance" runtime strategy ?

      6. Which one should I use if I have around 200 simultaneous user accessing my application ?


      Thanks and Regards

      Lalit Patel