[rules-users] firing specific rule

Mark Proctor mproctor at codehaus.org
Thu Oct 18 12:08:26 EDT 2007


Manukyan, Sergey wrote:
>
> Sergey,
>
>  
>
> In theory you can use AgendaFilters in combination with ruleflow.  
> Note however that the agenda filter will prevent certain other 
> activations from firing.  As a result, your ruleflow could be blocked 
> somewhere by not being able to execute certain activations:
>
>  * An ruleflow group will only continue if all its activations have 
> been completed.  Preventing one such activation from firing (using an 
> AgendaFilter) will prevent the ruleflow group from completing and thus 
> the ruleflow from continuing.
>
>  * Internally, the ruleflow implementation also uses rules for 
> executing a ruleflow, like for example when evaluating conditions in a 
> split node.  You should make sure you do not block these rules from 
> executing.
>
>  
>
> Please know that using AgendaFilters like this is discouraged.  It can 
> be used for testing and debugging purposes, but you should probably 
> not use it like this in production.  There are probably other ways to 
> do what you are trying to do here.
>
>  
>
>             What would be the other way to do it?
>
As kris stated at the moment if you are using ruleflow you can't agenda 
filters will break it. Use a semahore fact or something, to control 
execution manually.
>
>  
>
> If you really want to fire only one rule for a ruleflow group, I would 
> suggest you make your AgendaFilter more specific, so it does not block 
> rules from other ruleflow groups.  You can do this by making your own 
> implementation of an AgendaFilter, for example a 
> RuleNameInRuleFlowGroupEqualsAgendaFilter, which only blocks rules in 
> the same ruleflow group from firing if they do not have the right name.
>
>              
>
> Kris
>
>  
>
>     ----- Original Message -----
>
>     *From:* Manukyan, Sergey <mailto:SManukyan at lear.com>
>
>     *To:* rules-users at lists.jboss.org
>     <mailto:rules-users at lists.jboss.org>
>
>     *Sent:* Wednesday, October 17, 2007 11:13 PM
>
>     *Subject:* [rules-users] firing specific rule
>
>      
>
>     Folks,
>
>      
>
>     I have to restate the question as didn't find the answer anywhere
>     and have not get response to it in my previous email.
>
>      
>
>     Using 4.0.2.   So I have a set of rules, _each_ with a specific
>     *ruleflow-group *defined. And I have a rule flow file defined.
>     Altogether everything works fine.
>
>      
>
>     Now I need to fire a single specific rule from this rule set.
>     Using the RuleNameEqualsAgendaFilter didn't help, it didn't fire
>     the rule...
>
>      
>
>     How is it supposed to be done?
>
>      
>
>     Thanks,
>
>      
>
>     -Sergey
>
>      
>
>      
>
>      
>
>      
>
>     **********************
>     ** LEGAL DISCLAIMER **
>     **********************
>
>     This E-mail message and any attachments may contain
>     legally privileged, confidential or proprietary
>     information. If you are not the intended recipient(s),
>     or the employee or agent responsible for delivery of
>     this message to the intended recipient(s), you are
>     hereby notified that any dissemination, distribution
>     or copying of this E-mail message is strictly
>     prohibited. If you have received this message in
>     error, please immediately notify the sender and
>     delete this E-mail message from your computer.
>
>     ------------------------------------------------------------------------
>
>     _______________________________________________
>     rules-users mailing list
>     rules-users at lists.jboss.org
>     https://lists.jboss.org/mailman/listinfo/rules-users
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/20071018/89367542/attachment.html 


More information about the rules-users mailing list