[rules-users] Agenda Groups and Salience

Michael Anstis michael.anstis at gmail.com
Fri Mar 18 10:43:06 EDT 2011


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> 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
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110318/00b6b41b/attachment.html 


More information about the rules-users mailing list