4 Replies Latest reply on Jan 23, 2012 6:31 AM by sridhar532

    JBPM Business Rule Task clarifications

    jbpm_new

      Hi Everyone,

       

       

                   I want to use a Business Rule Task after a start node and I want to route my flow to different nodes based on the conditiones  evaluated in the drool file of the rule task, But as per the documentation the Business Rule Task can have only one incoming and one outcoming connection, I want to know how it can be done.

       

      Also, Please educate me on the EventListener methods, such as beforeNodeLeft, beforeNodeTriggered etc.

       

                   Please provide an example wherein we are using the EventListener methods. and Routing condition based on the rule file evaluation. Also when i use the ksession.fireAllRules method, all rules are getting fired, so i want to know is there any alternate solution to fire rules without explicitly mentioning ksession.fireAllRules method.

       

       

      Thanks

       

      Mahesh

        • 1. Re: JBPM Business Rule Task clarifications
          sridhar532

          Hi All,

           

          I facing the similar problem. Does anyone have a solution for the above problem. Thanks

          • 2. Re: JBPM Business Rule Task clarifications
            eaa

            You will need to put a gateway after the Rule Task so you can decide which path to follow. Inside your rules yo will need to set 1 or more process variables, then you can us those variables in the gateway to make a decision.

            Regarding ksession.fireAllRules(), there is another way to do this, but at the moment that other way (ksession.fireUntilHalt()) causes some other problems related to timers and persistence. So, my advice would be to continue using ksession.fireAllRules().

            • 3. Re: JBPM Business Rule Task clarifications
              jbpm_new

              Hi Esteban,

               

              Thanks for your Reply. I saw in one another post that We can use AgendaEventListener in our Session with 

              afterRuleFlowGroupActivated event for our Business Rules. Is that a good approach ?. Please let me know Thanks

              • 4. Re: JBPM Business Rule Task clarifications
                sridhar532

                Hi Esteban,

                 

                Also when we use AgendaEventListener and use afterRuleFlowGroupActivated event for existing Sessions , the Business Rules are not getting Triggered in the Process. It works only when we are launching with new StatefulKnowldegeSessions.