<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Santoshi, Vishal wrote:
<blockquote
 cite="mid:B0176B19AD215F4DA7E9EAC74EF4B0D6017B2C4D4E@EXCHNG5.noam.gallup.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <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]-->
  <div class="Section1">
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Thank u
for replying.<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">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: rgb(31, 73, 125);">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: rgb(31, 73, 125);">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: rgb(31, 73, 125);">It also
allowed me to identify
my Consequences with enhancements.<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">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: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&lt;rule-set
name="qbank"<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xmlns=<a class="moz-txt-link-rfc2396E" href="http://drools.org/rules">"http://drools.org/rules"</a><o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xmlns:g="g"<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xmlns:xs=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a><o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
xs:schemaLocation="<a class="moz-txt-link-freetext" href="http://drools.org/rules">http://drools.org/rules</a> rules.xsd<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a class="moz-txt-link-freetext" href="http://doctype.gallup.com/schema/g">http://doctype.gallup.com/schema/g</a> grules.xsd"&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&lt;rule
name="reset_next_page_to_current_page"
salience="998"&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;g:conditions&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&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: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/g:conditions&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;g:actions&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;g:assign src="jndi://rules.setNextPageToCurrentPage"&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&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: rgb(31, 73, 125);">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/g:actions&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&lt;/rule&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">,<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">,<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">,<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">&lt;/rule-set&gt;<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">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.</span></p>
  </div>
</blockquote>
With DSLs the only control you have is what the dsl representation
generates. You an do the above in drools trunk, but you'll have to
figure out how to do it yourself. Constructing rules manually through
an api is non trivial. I'd almost say why not parse your XML and
generate a DRL from it?<br>
<br>
<br>
<blockquote
 cite="mid:B0176B19AD215F4DA7E9EAC74EF4B0D6017B2C4D4E@EXCHNG5.noam.gallup.com"
 type="cite">
  <div class="Section1">
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">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: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);">Is that
even possible?<o:p></o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <p class="MsoNormal"><span style="color: rgb(31, 73, 125);"><o:p>&nbsp;</o:p></span></p>
  <div>
  <div
 style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
  <p class="MsoNormal"><b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">From:</span></b><span
 style="font-size: 10pt; font-family: &quot;Tahoma&quot;,&quot;sans-serif&quot;; color: windowtext;">
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev-bounces@lists.jboss.org">rules-dev-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-dev-bounces@lists.jboss.org">mailto:rules-dev-bounces@lists.jboss.org</a>] <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: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">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 moz-do-not-send="true"
 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: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">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 align="center" size="4" width="90%">

  </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 moz-do-not-send="true" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><o:p></o:p></pre>
  <pre><a moz-do-not-send="true"
 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: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"><o:p>&nbsp;</o:p></span></p>
  </div>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
  </pre>
</blockquote>
<br>
</body>
</html>