<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)">
<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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Arial Narrow";
        panose-1:2 11 6 6 2 2 2 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.EmailStyle20
        {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='color:#1F497D'>This is a feature request, or if
the feature already exists, a request that somebody let me know :)<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>I have a set of rules that
heavily depend on regular expressions to operate. The regular expression is
matched on the LHS of the rule, and then passed to another object for
additional processing in the RHS of the rule. We’re looking at a
few hundred rules here. Here’s the problem – because of
needing to use the regexes twice, I have stored them in a separate container
class as public static final String variables; however what we really want to
do is to be able to make a modification to either the regex or the rules
themselves, hot deploy the changes to the rule, and have everything work.
We specifically do not want to have to try hot-deploying or re-compiling
classes due to the potential issues that can arise. As it stands now it’s
looking like we are going to have to endure a pretty heavy maintenance burden
by changing the rule, hot deploying, then later in the evening redeploying the
java code and rebooting the server whenever we make a change.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>The ideal solution for this
problem would be if we could set package-scoped variables in the .drl file,
outside of the rules. For example, at the top of the drl file, below the
import statements, if we could write something like the following:<br>
<br>
<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>let String THIS_STRING = “this
regular expression”;<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>and then in the background when
the rule classes are generated, have them be declared as static final/constant
variables. This way they could be used on either side of the rule, but if
a change is made the RuleAgent will see that and overwrite the old version of
the rule package and fact processing would be able to continue uninterrupted.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>If anybody has any suggestions on
a work around, I would be appreciative.<o:p></o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='color:#1F497D'>Oh, and thanks to everybody for
helping me get the RuleAgent to work :)<o:p></o:p></span></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><b><span
style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";color:gray'>___________________________________________________<br>
Brian Trezise<br>
Staff Software Engineer<br>
IntelliData, Inc<br>
</span></b><span style='font-size:10.0pt;font-family:"Arial Narrow","sans-serif";
color:gray'>3173 s. uravan way<br>
aurora, colorado 80013<br>
T: 720.524.4864<br>
brian.trezise@intellidata.net<o:p></o:p></span></p>
</div>
</div>
</body>
</html>