<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;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 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'>Thank u for replying.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Mike I had created using drools
2.x&nbsp; drl that looked like the one below.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>As is evident the
ConditionFactory and ConsequenceFactory concept in drools2.x allowed me to
parse the conditions tag ( a sunsequent conditon tags ) as I had a good control
on parsing the drl file.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>As also is evident that my
condition was an expression , whose lexing , parsing and execution could be
controlled by my code. The execution was of course based on a session object
that was asserted in the working memory. <o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>It also allowed me to identify
my Consequences with enhancements.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>The result of the parsing was a customized
Condition object or a Consequnce Object , whose execution ( conditional when &nbsp;as
well a than ) was controlled through my code .<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&lt;rule-set name=&quot;qbank&quot;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xmlns=&quot;http://drools.org/rules&quot;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xmlns:g=&quot;g&quot;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xs:schemaLocation=&quot;http://drools.org/rules rules.xsd<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
http://doctype.gallup.com/schema/g grules.xsd&quot;&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&lt;rule name=&quot;reset_next_page_to_current_page&quot;
salience=&quot;998&quot;&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;g:conditions&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;g:condition&gt;isBackButtoned() eq &#8216;true&#8217;&lt;/g:condition&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/g:conditions&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;g:actions&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;g:assign src=&quot;jndi://rules.setNextPageToCurrentPage&quot;&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/g:assign&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/g:actions&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>&lt;/rule&gt;<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'>,<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'>&lt;/rule-set&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>My question is , whether I would
be able to use templating via DSL to achieve the same level of granular control,
where the &#8220;when&#8221; and the &#8220;than&#8221; can be controlled by my
code.<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>I am open to restructuring the
code ( ditching it and rewriting it ) provided I can get the same granular
control over execution , both during parsing (RuleSet creation) and execution (
Tuple based invoke() and isAllowed() ) .<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'>Is that even possible?<o:p></o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</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-dev-bounces@lists.jboss.org
[mailto:rules-dev-bounces@lists.jboss.org] <b>On Behalf Of </b>Mark Proctor<br>
<b>Sent:</b> Monday, May 19, 2008 10:13 AM<br>
<b>To:</b> Rules Dev List<br>
<b>Subject:</b> Re: [rules-dev] SMF drools 4.x<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Santoshi, Vishal wrote: <o:p></o:p></p>

<p class=MsoNormal>I am old school drools 2.x &nbsp;and had created based on
the HOUSE example created by own SMF DSL based on drools 2.x.<o:p></o:p></p>

<p class=MsoNormal>Than had to take a sabbatical from that project.<o:p></o:p></p>

<p class=MsoNormal>As of today, I have been asked to resurrect that project and
not a whole lot of drools 2.x has made it to 4.x and of course would like to
remain current.<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>You
should look at the sentence templating via the DSL stuff. <br>
<br>
<o:p></o:p></span></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal>My implementation had an expression engine ( SableCC ) that
I had fused in with a &nbsp;customized Semantic Module.<o:p></o:p></p>

<p class=MsoNormal>I can get more information out for u , if there is a way to
resuse some code.<o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal>Any pointers as to how to go about doing this will be highly
appreciated.<o:p></o:p></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<p class=MsoNormal><a
href="http://blog.athico.com/2007/12/drools-extensible-process-definition.html">http://blog.athico.com/2007/12/drools-extensible-process-definition.html</a>
seems to be an attempt to explain how the port can take place, but does not
seem to have a lot of <o:p></o:p></p>

<p class=MsoNormal>concreteness around it.<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'>Nope
nothng more on that, and while it does work for the rules xml, I wouldn't
recommend it, try the DSL approach first. If you do need to find out more on
the XML stuff, you'll need to look at the impl itself for processes and figure
out how to apply it to rules.<br>
<br>
<o:p></o:p></span></p>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

<pre><o:p>&nbsp;</o:p></pre><pre style='text-align:center'>

<hr size=4 width="90%" align=center>

</pre><pre><o:p>&nbsp;</o:p></pre><pre>_______________________________________________<o:p></o:p></pre><pre>rules-dev mailing list<o:p></o:p></pre><pre><a
href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><o:p></o:p></pre><pre><a
href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a><o:p></o:p></pre><pre>&nbsp; <o:p></o:p></pre>

<p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>