[rules-users] Intercept event handling / why rule salience does not affect execution order?

Esteban Aliverti esteban.aliverti at gmail.com
Fri Oct 26 12:05:36 EDT 2012


There was a similar thread a couple of days ago:
http://drools.46999.n3.nabble.com/Why-does-it-seem-like-salience-is-being-ignored-td4018669.html
The issue is related to the use of fireUntilHalt(). According to Edson,
with fireUntilHalt() as soon as an activation is created it is fired (if
the agenda is idle).

Best Regards,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Blog @ http://ilesteban.wordpress.com


On Fri, Oct 26, 2012 at 5:46 PM, jpullmann <
jaroslav.pullmann at fit.fraunhofer.de> wrote:

>
>  Wolfgang,
>
>   here comes an Eclipse/Maven project with simplified sources. I'd expect
> to
>  see messages from higher ranked intercepting rules for any of the events
> sent,
>  which is not the case...
>
> rule "Intercept context creation"
>     salience 10
>     when
>         $start : StartCommand() from entry-point "events/context"
>         not( Context( name == $start.name ) )
>     then
>         System.out.println("Context "+$start.getName()+" to be created");
> end
>
> rule "Intercept context removal"
>     salience 10
>     when
>         $end : EndCommand() from entry-point "events/context"
>         Context( name == $end.name )
>     then
>         System.out.println("Context "+$end.getName()+" to be removed");
> end
>
>                 Context Context_0 to be created
>                 Context Context_0 to be removed
>                 Context Context_1 to be removed --
>                 Context Context_2 to be removed --
>                 Context Context_3 to be removed --
>                 Context Context_4 to be created
>                 Context Context_4 to be removed --
>
>   Best regards
>    Jaroslav
>
>
>
> Example.zip <http://drools.46999.n3.nabble.com/file/n4020513/Example.zip>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Intercept-event-handling-why-rule-salience-does-not-affect-execution-order-tp4020506p4020513.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> 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/20121026/7ddc14da/attachment.html 


More information about the rules-users mailing list