3 Replies Latest reply on Apr 28, 2010 8:26 PM by rebody

    equivalent to ruleflow-group in drools

    lokr

      Hi,

      I'm comparing the drools-flow and jBPM.

      I find the two products pretty interesting, but, from my own point of view, there is one thing that really lacks in jBPM considering rules:

      an equivalent to the ruleflow-group attribute in the rules, and the associated element in the designer to define it.

       

      Is it something that is planned to be added in a next version?

       

      Apart from this, it's a great solution you've got here with jBPM, which is pretty easy to use pretty fast.

       

       

      Please tell me if I haven't been clear

        • 1. Re: equivalent to ruleflow-group in drools
          rebody

          Hi Manuel,

            What does ruleflow-group can do?  Does it equals as RulesActivity in jBPM-4.3?

          • 2. Re: equivalent to ruleflow-group in drools
            lokr

            Actually, ruleflow-group is a way to define which rules to activate for a given node. It works like this in drools:

            -you put a node with an argument defining a context (a ruleflow-group)

            -the next time the rule engine is summoned, it will only fire the rules with the given ruleflow-group.

             

            for example, when ruleflow-group is defined to "group-A" with a node, the next node that will fire rules will only fire like described below:

             

            rule "will be activated"

            ruleflow-group "group-A"

            when

                 eval(true)

            then

                 System.out.println("I'm activated");

            end

             

             

            rule "will not be activated"

            ruleflow-group "group-B"

            when

                 eval(true)

            then

                 System.out.println("I'm not activated");

            end

            • 3. Re: equivalent to ruleflow-group in drools
              rebody

              Hi Manuel,

                You could use CustomActivity to implement this feature.  In the CustomActivity of jBPM 4 we can use our class to implement any operations including rules.  It is very easy to use and you can try like this.

               

                <custom name="drools-group" class="sample.DroolsGroupActivity">

               

                And jBPM 4.3 has already provider some activities for Drools, you can find RuleDecisionActivity and RulesActivity in the Developer Guide.  Here are the links.

                http://docs.jboss.com/jbpm/v4/devguide/html_single/#rulesdecision