[rules-dev] A dazzling feature - not in Drools!

Mark Proctor mproctor at codehaus.org
Sun Aug 29 16:13:41 EDT 2010


  On 29/08/2010 16:42, Wolfgang Laun wrote:
> I *would* have added something on dynamic salience when I went over 
> the Expert manual, in 2008 (?) - if I'd only known it. Blogging is 
> fine - but it just isn't Documentation, with a capital 'D'.
>
> This is also a nice case in point why I'm reluctant to invest work in 
> maintaining Drools documentation: From where the heck would I get to 
> know what's missing or obsolete or wrong? In some areas, I have 
> gathered sufficient experience, but there are vast areas where I'm 
> anything between spottily witted to downright ignorant. Also, there's 
> some furious hacking going on all the time (I presume), and how would 
> one rein that it to get to know what's happening?
Things do go into release notes, even if minimal:
https://hudson.jboss.org/hudson/job/drools/lastSuccessfulBuild/artifact/trunk/target/docs/drools-introduction/html_single/index.html


      2.3.2. Core Engine Enhancements

* Dynamic salience for rules conflict resolution

What's needed is  for someone to update docs more based on release notes.

Mark

>
> Anyway, right now I'm collecting a loose set of How-tos, as a 
> by-product of current work, and for areas where I deem it useful. See 
> http://members.inode.at/w.laun/ and scroll down to "Rule Based 
> Programming" / "Drools" / "Selected Topics".
>
> -W
>
> On 27 August 2010 02:21, Mark Proctor <mproctor at codehaus.org 
> <mailto:mproctor at codehaus.org>> wrote:
>
>     On 27/08/2010 00:05, Michael Neale wrote:
>>     Hahaha - yes - that is what I was thinking.
>>
>>     Dyanmic salience was added some time back - but its one of those
>>     "did it and forgot about it" things.
>>     Also - historically salience has been "abused" more than "used" -
>>     so perhaps there is less excitement to talk about what you can do
>>     with it.
>>
>>     But the case wolfgang mentioned is a good one - if you know you
>>     need it you can probably safely use it.
>     http://blog.athico.com/2007/05/dynamic-salience-expressions.html
>
>>
>>     On Thu, Aug 26, 2010 at 11:21 PM, Edson Tirelli <tirelli at post.com
>>     <mailto:tirelli at post.com>> wrote:
>>
>>             Wolfgang,
>>
>>             Not sure I understand what you mean, but Drools supports
>>         dynamic salience:
>>
>>         rule "fire in rank order 1,2,..."
>>               salience( -$rank )
>>         when
>>               Element( $rank : rank,... )
>>               ...
>>         then
>>              ...
>>         end
>>
>>             Edson
>>
>>
>>         2010/8/26 Wolfgang Laun <wolfgang.laun at gmail.com
>>         <mailto:wolfgang.laun at gmail.com>>
>>
>>             Just FYI, but who knows ;-)
>>
>>             Our proprietary vintage RBS has a feature is (admittedly)
>>             rarely used
>>             but could come in handy, every now and then.
>>
>>             Given this class
>>
>>               class Element {
>>                   int rank; // rank > 0
>>               }
>>
>>             and to fire a rule in ascending rank order, you can write
>>             (using
>>             modified Drools syntax)
>>
>>             rule "fire in rank order 1,2,..."
>>             when
>>                   Element( $rank : rank,... )
>>                   // ...
>>             salience -$rank    ### <=
>>             then
>>                  // ...
>>             end
>>
>>             The dynamically set salience does all the work. (Of
>>             course, you can
>>             achieve the same order
>>             in Drools easily enough.)
>>
>>             This is possible since salience is a value that must be
>>             carried over
>>             into the activation.
>>             There is at least one other rule attribute that shares
>>             this property,
>>             but I'm not sure
>>             whether anything useful can be done with dynamic agenda
>>             groups.
>>
>>             Cheers
>>             -W
>>             _______________________________________________
>>             rules-dev mailing list
>>             rules-dev at lists.jboss.org <mailto:rules-dev at lists.jboss.org>
>>             https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>>
>>
>>
>>         -- 
>>           Edson Tirelli
>>           JBoss Drools Core Development
>>           JBoss by Red Hat @ www.jboss.com <http://www.jboss.com>
>>
>>         _______________________________________________
>>         rules-dev mailing list
>>         rules-dev at lists.jboss.org <mailto:rules-dev at lists.jboss.org>
>>         https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>>
>>
>>
>>     -- 
>>     Michael D Neale
>>     home: www.michaelneale.net <http://www.michaelneale.net>
>>     blog: michaelneale.blogspot.com <http://michaelneale.blogspot.com>
>>
>>
>>     _______________________________________________
>>     rules-dev mailing list
>>     rules-dev at lists.jboss.org  <mailto:rules-dev at lists.jboss.org>
>>     https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>     _______________________________________________
>     rules-dev mailing list
>     rules-dev at lists.jboss.org <mailto:rules-dev at lists.jboss.org>
>     https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20100829/ef87cdb5/attachment.html 


More information about the rules-dev mailing list