2 Replies Latest reply on Jan 7, 2013 4:54 PM by xmithj

    Problem with concurrent processes that include a rule-group?

    xmithj

      I am using jbpm 5.3.0.Final, and I am facing problems when running concurrent processes that include a rule-group (rule node).

      I have a fairly simple business process with one rule-group (Guvnor TaskType=Business Rule). The rule-group does validations on process variables. To provide separation between facts from different requests, each processing request creates its own stateful knowledge session which in turns creates its own business process. Everything works well with one process execution (one request at a time).

      When 2 almost concurrent requests are tried (each one running in its own thread), the first one reaching the rule-group leave an entry/record inside the EVENTTYPES table (containing the businessProcessId and the ruleflow group's name), and when the second business process reaches the rule-group it gets as event the one stored in the EVENTTYPES table. From that moment onwards, the second thread continues its execution on the first business process. The end result is, the first business process get executed twice.

      Removing the rule-group makes the concurrent requests to work and complete successfully.

      This seems very similar to the open Jira issue: JBRULES-3108

      What is the intended behaviour of the EVENTTYPES table, and why the rule-group leaves a record in that table (at least until it reaches a long running state)?

      Why this event is passed to my second thread, distracting it from carry on and complete the second instance of the business process?

       

      Thanks in advance for any help.