I suggest this is one for the JBoss Rules team to clarify. Can they please provide a little more narrative as to the (expected) operation of activation-group?
If your understanding is correct this sounds like a bug - a workaround for which will be to have a "processed" flag on each Order and have the RHS of each rule set the flag. All LHS's would need to include a pattern to check the Order has not been processed - but I guess you knew this. At least the problem has been clarified ;-) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bynum, Joe Sent: 26 April 2007 15:12 To: Rules Users List Subject: RE: [rules-users] activation-group There are multiple orders with flowId == 1798. If I remove the activation-group I believe that 2 orders are processed by the rule with their specific stage as well as the last rule and any orders that don't meet the stage criteria will trigger the last rule. Without the activation-group all orders are processed, some multiple times. My understanding of the manual is that if I have X number of rules that belong to the activation-group with various salience values that each Order will be processed by the rules and the one with the highest salience will be fired and the rest will be ignored. Once that's complete the next order will come through and repeat the process. What I'm experiencing is that the first order to trigger any rule in that activation-group will disable the entire activation group and no further orders will be processed. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael (M.) Sent: Thursday, April 26, 2007 6:45 AM To: Rules Users List Subject: RE: [rules-users] activation-group Do you have multiple Orders with a flowId == 1798? What if you remove the activation-group (for testing) do multiple Orders get processed (all be it, possibly, each one multiple times)? If not it could point towards a problem with either the implementation or understanding of activation-groups (from the manual):- Rules that belong to the same named activation-group will only fire exclusively. In other words, the first rule in an activation-group to fire will cancel the other rules activations (stop them from firing). The Activation group attribute is any string, as long as the string is identical for all the rules you need to be in the one group. Does this mean one rule in the activation group will fire for all asserted facts or one in the group per asserted fact? I've not used activation-groups so my questions aren't necessarily aimed at you Joe. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bynum, Joe Sent: 25 April 2007 18:10 To: Rules Users List Subject: RE: [rules-users] activation-group I'm not making any changes to the orders at all if that's what you're thinking. [when]workflow in stage "{value}"=order : Order( stages contains "{value}" ) [when]order is {value}=order: Order( id == {value} ) [when]flowid is {value}=order: Order( flowId == {value} ) [when]workflow in stage "{value}"=order: Order( stages contains "{value}" ); [then]assign prov plan=OTISHelper.assignProvPlan( order.getDocumentNumber(), order.getProvPlanName() ); [then]complete task "{value}"=OTISHelper.completeProvPlanTask( order.getDocumentNumber(), "{value}", "JAVATEAM", "JWB_TEST" ); [when]workflow isnt in stage "{value}"=order: Order( stages excludes "{value}" ); [when]has provplan=order : Order( provPlanName != "" ) [when]order type isnt "{value}"=order : Order( orderType != "{value}" ) -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael (M.) Sent: Wednesday, April 25, 2007 10:06 AM To: Rules Users List Subject: RE: [rules-users] activation-group Any chance you can post your DSL too? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bynum, Joe Sent: 25 April 2007 14:39 To: Rules Users List Subject: RE: [rules-users] activation-group Anyone have any idea what I'm doing wrong? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bynum, Joe Sent: Monday, April 23, 2007 1:50 PM To: Rules Users List Subject: RE: [rules-users] activation-group I've read the manual but as I stated below only the first order seems to trigger a rule. The other orders are completely ignored. I would expect one rule in the group to trigger for each order. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of JLL Sent: Monday, April 23, 2007 11:38 AM To: [email protected] Subject: Re: [rules-users] activation-group from documentation 3.5.3.5. activation-group default value N/A type : String Rules that belong to the same named activation-group will only fire exclusively. In other words, the first rule in an activation-group to fire will cancel the other rules activations (stop them from firing). The Activtion group attribute is any string, as long as the string is identical for all the rules you need to be in the one group. NOTE: this used to be called Xor group, but technically its not quite an Xor, but you may hear people mention Xor group, just swap that term in your mind with activation-group. JLL Bynum, Joe wrote: > > All, > > I'm trying to setup three rules to process orders as a test case. The > first two rules look for specific conditions and the third one is the > default rule. I only want a single rule to fire for each order that I > pass into the engine. I gave all three rules the same activation-group. > The first two rules have a salience of 10 and the third rule has the > default salience value. The problem that I'm experiencing is that > only one order is processed and the rest are skipped. > > Here's a snippet from the rules file: > > rule "837621 - Stage 5" > > activation-group "Harris" > > salience 10 > > when > > flowid is 1798 > > workflow in stage "5" > > then > > assign prov plan "Harris Gtwy-ChXchange-New Loop" > > complete task "FAC VER" > > end > > rule "828257 - New Order" > > activation-group "Harris" > > salience 10 > > when > > flowid is 1798 > > workflow in stage "1" > > then > > assign prov plan "Harris Gtwy-ChXchange-New Loop" > > end > > rule "1798 Default" > > activation-group "Harris" > > salience 0 > > when > > flowid is 1798 > > then > > assign prov plan "Harris Gtwy-ChXchange-New Loop"= > > end > > Any Ideas? > > > > > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > > -- View this message in context: http://www.nabble.com/activation-group-tf3631850.html#a10142866 Sent from the drools - user mailing list archive at Nabble.com. _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
