1 Reply Latest reply on Feb 1, 2015 8:15 AM by Kris Verlaenen

    Having rule Execution issue in singleton Runtime manager scenario.

    Narasimha Adusumalli Newbie



      i have a scenario like.. have created runtime Manager by using singleton strategies. and the runtime Environment contains 2 BPMN file in that one BPMN file contains BS rule task(called process-1)and another one does't contains BS rule Task(called process-2). after that have started the process by using Process-1 and inserted fact Object in kieSession by using Human Task output. then rule task successfully executed and used the updated fact object in my calling place to perform some Business logic based on rule Output. again have started the process by using Process-2 and inserted the fact object into session by using human  Task Output. but this process does't contains rule task.but still i am getting rule output of process-1.


      here the problem am facing,l the process -1 rule output still available kie session after executing process-2 also. because of KieSession holding both the process data. and in both the scenarios my fact Object will be same type of Object.


      kindly help on this how to handle this type of scenario.

        • 1. Re: Having rule Execution issue in singleton Runtime manager scenario.
          Kris Verlaenen Master

          If you use singleton approach, the ksession will keep all the data you insert into the session across invocations, and across sessions.  The data inserted by one process instance is also visible by the other process instance.  It's always recommended to clean up the working memory in case you are reusing the ksession.  Alternatively, you could for example use a ksession per process instance to avoid unwanted interactions between process instances as they would use a different working memory in that case.