[rules-users] how to stop rule execution
Travis_Smith at bnz.co.nz
Travis_Smith at bnz.co.nz
Wed Feb 16 18:17:50 EST 2011
Hi,
This is perhaps not the performance hit you think it is as the rules are
evaluated as they are loaded. The Rete algorithm will evaluate that the
rule is not null and trigger.
Another consideration is that you may need to use a flatter fact-model if
you're drilling down with 'from' operators and needing to trap for nulls.
Aside from that, if you use Rule Flow Groups and a Rule Flow as Michael
Anstis suggested:You can use a Split Connector to branch around that
section of ruleflow, and a Join Connector to continue, connected either to
the next ruleflow step, or to a Stop.
Regards,
-Trav
Travis Smith
Analyst Programmer
Development Centre
BNZ
DDI: +644 4746356 (Or Ext 76356)
Sathya Prakash <prakashagarval at gmail.com>
Sent by: rules-users-bounces at lists.jboss.org
17/02/2011 11:51 a.m.
Please respond to
Rules Users List <rules-users at lists.jboss.org>
To
Mauricio Salatino <salaboy at gmail.com>, michael.anstis at gmail.com
cc
Rules Users List <rules-users at lists.jboss.org>
Subject
Re: [rules-users] how to stop rule execution
I got great Idea by this discussion.
If there is no way of stopping rules then I can do this null condition
check before executing rules. Adding one action in JBoss ESB will solve
problem.
Please suggest me.
Many Thanks in advance.
Regards,
Sathya Prakash.
On Thu, Feb 17, 2011 at 2:39 AM, Sathya Prakash <prakashagarval at gmail.com>
wrote:
Thanks for your suggestion..
But let us assume i have 100 rules based on single response. When response
is null then if i am doing null check in all rules then it degrades the
performance. My application hits are million per day. if 1 % percent
fails think about the impact.
Regards,
Sathya Prakash.
On Thu, Feb 17, 2011 at 2:26 AM, Mauricio Salatino <salaboy at gmail.com>
wrote:
you can do something like:
rule "Error Check"
salience 100
when
error condition check
then
System.Out.Println("Response has errors");
XXXXXXXXXXXXXXXXXXXXXXXX to exit from rule execution
insert(Stop())
end
rule "Rule-01"
salience 99
when
not(Stop())
repsonse.getxx()
then
end.
2011/2/16 Sathya Prakash <prakashagarval at gmail.com>
Hi,
How to stop rule execution in technical rule,
Example
rule "Error Check"
salience 100
when
error condition check
then
System.Out.Println("Response has errors");
XXXXXXXXXXXXXXXXXXXXXXXX to exit from rule execution
end
rule "Rule-01"
salience 99
when
repsonse.getxx()
then
end.
if first rule then part executed means the response is error hence we
should not execute second.
Is there any way to exit rule execution.
Regards,
Sathya Prakash.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
--
Cheers,
Sathya Prakash.
సత్య ప్రకాష్.
--
Cheers,
Sathya Prakash.
సత్య ప్రకాష్.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
CAUTION - This message may contain privileged and confidential information
intended only for the use of the addressee named above. If you are not the
intended recipient of this message you are hereby notified that any use,
dissemination, distribution or reproduction of this message is prohibited.
This email was sent by the Bank of New Zealand. You can contact us on
0800 ASK BNZ (0800 275 269). Any views expressed in this message are those
of the individual sender and may not necessarily reflect the views of Bank
of New Zealand.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110217/780b2532/attachment.html
More information about the rules-users
mailing list