[rules-users] Finally block equivalent in Drools

Mark Proctor mproctor at codehaus.org
Fri Aug 3 17:53:35 EDT 2007


This can be achieved with Agenda Groups. Put your main application into 
its own agenda-group and then the "exit" rule leave in the MAIN 
agenda-group. then when your application agenda-group has finished it 
will pop and evaluate anything that is left in MAIN.

Mark
Dr. Gernot Starke wrote:
> Try a catchall-rule like the following:
>
> rule "catchall"
> when
>     eval (true )
> then
>     System.out.println("catchall");
>     // your catchall code goes here
> end
>
>
> The LHS (condition part) of this is always true, therefore this rule 
> will always be scheduled for execution. IMHO it should always
> fire last due to the prioritization-strategy (complex rules first...)
>
> hope it helps,
> Gernot
>
> http://rbs.gernotstarke.de
>
>
> Am 03.08.2007 um 21:12 schrieb McShiv:
>
>>
>> Is there anyway to make sure that a particular rule gets fired before 
>> exiting
>> in Drools 3.0.6 & 4.0?
>>
>> Some thing synonyms to the finally block in java.
>>
>> Thanks in Advance.
>> -- 
>> View this message in context: 
>> http://www.nabble.com/Finally-block-equivalent-in-Drools-tf4214256.html#a11989235 
>>
>> Sent from the drools - user mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
> Dr. Gernot Starke
> Doing IT Right
>
> ---
> Willi-Lauf Allee 43, D-50858 Köln
> gs at gernotstarke.de,
>  +49 (0) 177 - 728 2570
> http://www.gernotstarke.de
> Blog: http://it-and-more.blogspot.com
> ****************************************
> Das freie Portal für Software-Architekten:
> http://www.arc42.de
>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>




More information about the rules-users mailing list