[rules-users] Agenda Groups and Salience

Dean Whisnant dean at basys.com
Tue Mar 22 10:27:10 EDT 2011


I've done it both with setting the value and forcing salience to evaluate in a certain order and using the update a value with and without salience.

It's odd because when I was doing this on a standalone machine in Eclipse it all seemed to work fine, but now that I've moved rules into Guvnor I'm having issues with it.  Could there be something I did in calling agenda groups that could have removed the working of salience?

Also, I was using no-loop to make sure I didn't run the same rule over and over.  It only effects things if the rule has fired for one specific instance, correct?

Thank you!

From: rules-users-bounces at lists.jboss.org [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Michael Anstis
Sent: Friday, March 18, 2011 10:43 AM
To: Rules Users List
Subject: Re: [rules-users] Agenda Groups and Salience

Do you inform the engine that values have changed in your RHS:-

then
    modify( incomingClaim ) {
       setMedicare(true);
    }
    ...
end
On 18 March 2011 14:16, Dean Whisnant <dean at basys.com<mailto:dean at basys.com>> wrote:
Hello,

Are there any conflicts in 5.1 between using salience and agenda groups?

I have three sets of rules 1) base software, 2) Trading Partner Specific, 3)  Customer Specific.

These three sets are split into different Guvnor packages and all of #1 have an agenda group of "base", all of #2 have an agenda group of "tradingpartner" and all of #3 have no agenda group assigned.

We load all the rules to the knowledge session, letting it know to fire them in that order.

In my #1 set I have a few hundred rules.  About 10 of those rules it matters what individual order they fire in so I was setting up salience for them as well.

Rule #1 has a salience of 21000 and it's job is to see if this is the first line item of a claim and if so to instantiate a new object, hasCOB.

Rule #2 has a salience of 20900 and checks to see if the incoming claim is medicare and if so, sets a Boolean, hasMedicare, to true and then does some output so I know if it set it

Rule #3 has a salience of 20900 and checks to see if the incoming claim is other insurance and if so, sets a Boolean, hasOther, to true and then does some output so i know if it set it

Rule #4 has a salience of 20800 and looks to see if there is a hasCOB object with hasMedicare = to true and then does output so I know if it worked

Rule #5 has a salience of 20800 and looks to see if there is a hasCOB object with hasOther = to true and then does output so I know if it worked

So I run a sample file through that hasCOB and should set hasOther to true.

Rule #1 fires and creates hasCOB
Rule #3 fires and sets hasOther to true and gives me output
Rule #5 doesn't fire???

Whether or not salience is the best method to accomplish this, shouldn't this work?  DO you see a better way to accomplish this?  Rules 4 and 5 are dummy rules here for testing, but what comes next is calculations based upon the existence of hasOther and/or hasMedicare.

I'm at a loss here and any thoughts/help would be welcomed...

Thank you!

Dean
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org<mailto:rules-users at lists.jboss.org>
https://lists.jboss.org/mailman/listinfo/rules-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110322/f78e7cd0/attachment.html 


More information about the rules-users mailing list