[rules-users] firing specific rule

Manukyan, Sergey SManukyan at lear.com
Thu Oct 18 11:16:33 EDT 2007


Kris,

 

It looks like whatever name I choose for RuleNameEqualsAgendaFilter - it
doesn't fire any rules. It may be the name of my rule I want to fire or
some bogus name, just the fact that I am using it - make all rules not
fire.

 

By the way the RuleNameEqualsAgendaFilter("rule name") -  makes sure
that "rule name" - is NOT fired? Or makes sure it IS fired?

 

-Sergey

 

 

________________________________

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Kris Verlaenen
Sent: Thursday, October 18, 2007 9:08 AM
To: Rules Users List
Subject: Re: [rules-users] firing specific rule

 

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.

 

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 

	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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20071018/8c8f964e/attachment.html 


More information about the rules-users mailing list