5 Replies Latest reply on Mar 6, 2017 3:44 PM by Somnath Bhattacharjee

    PerProcessInstanceStrategy and SingletonSessionStrategy in jBPM

    rahul7163 Newbie

      Hello All,


      I come across the situation where i have started the process instance using the Singleton Session Strategy and taken the RuntimeEngine object like below:

      RuntimeEngine engine = runtimeManager.getRuntimeManager(EmptyContext.get())


      After this i moved from SingletonSessionStrategy to PerProcessInstance session strategy. Now, when i am trying to get the RuntimeManager instance using below statement:

      RuntimeEngine engine = runtimeManager.getRuntimeManager(ProcessInstanceIdContext .get(500))      // here 500 is my processInstanceId


      I am getting below exception:


      org.kie.internal.runtime.manager.SessionNotFoundException: No session found for context 500


      Can't i use the process created using Singleton session strategy with Per process instance strategy? Can someone tell me if it is possible?