<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
p.bulletedlist, li.bulletedlist, div.bulletedlist
        {mso-style-name:bulletedlist;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor=white lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I’m not sure your use case, but I will answer what I think
you are asking. We had the need of turning on/off rules per time the rules were
fired. So different data may need different rules to fire, and simply too
dynamic to build rules around. It is as simple as a manager may choose to
override a price that has been returned by the engine. To do this we made sure
all rules have unique names with a number. So it could be foo-bar-123,
foo-bar-124. The transaction ID and the rule ID can then be stored in a
database to persist the override, so transaction ID 987. When the rules fire
for a transaction you check to see if overrides exist and filter out and rules
that should be overridden. The rules still fire, they are just ignored. For us
this has worked well in an environment where we want all transactions to potentially
be overridden and ignored. There may be a more elegant way to do this purely in
the rule, but I haven’t seen it.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>On a side note, it would be awesome if the BRMS had a way to
store/generate unique IDs for each rule, that could be easily returned/fetched
when a rule fired.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>-Michael<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:
"Tahoma","sans-serif";color:windowtext'> rules-users-bounces@lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] <b>On Behalf Of </b>Ravi
Krishnamurthy<br>
<b>Sent:</b> Tuesday, September 02, 2008 2:37 PM<br>
<b>To:</b> Rules Users List<br>
<b>Subject:</b> Re: [rules-users] Turning on and off a particular rule<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Pallav:<br>
the enabled keywork works.<br>
<br>
In order to do this, the rules need to be updated at runtime. Wondering if
there is any other way other than updating the rules to get this behavior
during runtime.<br>
<br>
Thanks,<br>
Ravi<br>
<br>
Ravi wrote: <o:p></o:p></p>
<div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Thanks
Shyam, will try it out.</span><o:p></o:p></p>
</div>
<div id=divRpF653285>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center>
</div>
<p class=MsoNormal style='margin-bottom:12.0pt'><b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> <a
href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
[<a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>]
On Behalf Of Shyam, Pallav (MSCIBARRA) [<a
href="mailto:Pallav.Shyam@mscibarra.com">Pallav.Shyam@mscibarra.com</a>]<br>
<b>Sent:</b> Monday, September 01, 2008 12:49 PM<br>
<b>To:</b> <a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<b>Subject:</b> Re: [rules-users] Turning on and off a particular rule</span><o:p></o:p></p>
</div>
<div>
<div>
<p><span style='font-size:10.0pt'>To turn off a rule write<br>
enabled false<br>
<br>
on the line after the rule name.<br>
<br>
Pallav<br>
<br>
----- Original Message -----<br>
From: <a href="mailto:rules-users-bounces@lists.jboss.org">rules-users-bounces@lists.jboss.org</a>
<a href="mailto:rules-users-bounces@lists.jboss.org"><rules-users-bounces@lists.jboss.org></a><br>
To: Rules Users List <a href="mailto:rules-users@lists.jboss.org"><rules-users@lists.jboss.org></a><br>
Sent: Tue Sep 02 02:20:27 2008<br>
Subject: [rules-users] Turning on and off a particular rule<br>
<br>
Hello:<br>
Wondering if it is possible to enable or disable a rule after the rules are
defined in a project.<br>
<br>
Thanks,<br>
Ravi</span><o:p></o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center>
</div>
</div>
<p class=bulletedlist><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:gray'>NOTICE: If received in error, please destroy and notify sender.
Sender does not intend to waive confidentiality or privilege. Use of this email
is prohibited when received in error.</span><o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>