9 Replies Latest reply on Jan 24, 2012 12:54 PM by salaboy21

    jBPM 5.2 Rule Task

    gboro54

      I am currently using jBPM 5.2 with Drools core 5.3. I have noticed that when I am using task nodes after executing rules, the process moves ahead before all the activations have been completed evaluated. Why is this occuring?  I have other task down the pipeline which depend on the rules finishing execution before moving on. Is there a configuration or property I am missing?

        • 1. Re: jBPM 5.2 Rule Task
          vchmakov

          Hi,

           

          Perhaps you can start with reading of this thread: https://community.jboss.org/thread/177660?tstart=0. There are also some useful links inside.

           

          Cheers!

           

          Vladimir

           

          • 2. Re: jBPM 5.2 Rule Task
            salaboy21

            That's the default behavior. The evaluations are being done as soon as the information goes into the engine, then the activated rules will only fire if they belong to a ruleflow group and that ruleflow group is activated by your process.

            Cheers

            • 3. Re: jBPM 5.2 Rule Task
              gboro54

              Why would a task node be executed before all the rules in the rule group have finishing executing. I understand that activations get determined when facts are inserted but why wouldn't the rule task node wait until all rules have finished processing before moving on to the next node?

              • 4. Re: jBPM 5.2 Rule Task
                salaboy21

                Take a look at the documentaiton. There is a difference between a rule being evaluated, activated and fired.

                Cheers

                • 5. Re: jBPM 5.2 Rule Task
                  gboro54

                  I am not having an issue with the drools aspect but the jBPM aspect. The next task node after my first rule-task has been completed needs information inserted into the context by the rules. However the Task node is being ran before the firing of all the rules has completed. This seems like odd behavior as I imagine what I am describing is a pretty typically use case. I want to ensure my next node is not executed until the first rule group has completed. Is there a way to accomplish this?

                  • 6. Re: jBPM 5.2 Rule Task
                    gboro54

                    From the documentation:    

                    {quote}. If the ruleflow group was already active, the ruleflow group will remain active and execution will only continue if all active rules of the ruleflow group has been completed.{quote}

                     

                    I have a very simple use case where I have 2 rules. One is active when the rule-group node is reached and the other is activiated when an object from rule 1 gets inserted. This should keep the process at the rule task node until completion but it seems to me it is not doing this at all. I have a logger on the session, which I see an activation created but before the activation fired event occurs the process has moved on to the next node(which right now is just logging when it is reached). This is either a but or I am missing a configuration somewhere.

                    • 7. Re: jBPM 5.2 Rule Task
                      gboro54

                      Hmmm...the correct answer would be ensure someone did not comment out your ruleflow-group tag in your rules fire. Should have checked that first. Sorry for the confusion and thaks for hte help...

                      • 8. Re: jBPM 5.2 Rule Task
                        salaboy21

                        Exactly, if you have one active rule the ruleflowgroup will stop until you call the fire all rules method..

                        If you don't have any activated rule that belongs to the ruleflowgroup, the rule-task will automatically continue to the next node.

                        Cheers

                        1 of 1 people found this helpful
                        • 9. Re: jBPM 5.2 Rule Task
                          salaboy21

                          We are assumming that you are asking questions about a code that you can check we can not ask for each question if you are sure about what you are asking and if all the lines in your code are uncommented..

                          Cheers