Thanks ! - I think Steven Williams was working on something similar, but from a different angle - I will get him to take a look at it to see how we could incorporate it.<br><br>Michael.<br><br><div><span class="gmail_quote">
On 3/13/07, <b class="gmail_sendername">Terry Laurenzo</b> &lt;<a href="mailto:tlaurenzo@rcode.net">tlaurenzo@rcode.net</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I added some logic to the decisiontables module to allow properties<br>to be specified per RulesTable.&nbsp;&nbsp;This is done by declaring a<br>RulesTableConfig tag followed by properties that should apply to the<br>following RulesTable.&nbsp;&nbsp;I used this capability to allow declarations
<br>of code snippets that should be inserted before/after generated<br>conditions and before/after the consequences on the right hand side.<br>This allows me to create more complicated rule templates.<br><br>For example, the declaration:
<br>----<br>RuleTableConfig<br>LhsPreamble&nbsp;&nbsp;&nbsp;&nbsp; ##LHS PREAMBLE<br>LhsTrailer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##LHS TRAILER<br>RhsPreamble&nbsp;&nbsp;&nbsp;&nbsp; ##RHS PREAMBLE<br>RhsTrailer&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##RHS TRAILER<br>----<br><br>produces the following DRL output:
<br><br>----<br>package Testing_table_configuration;<br>#generated from Decision Table<br>#From row number: 14<br>rule &quot;_14&quot;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;when<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##LHS PREAMBLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Abc(column == &quot;123&quot;)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##LHS TRAILER<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##RHS PREAMBLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;def.action;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;##RHS TRAILER<br>end<br>----<br><br>The patch which includes these changes (against 3.0.5
 source bundle)<br>is attached.&nbsp;&nbsp;I also added a test case spreadsheet to src/test/<br>resources/data which is not included in the patch but is attached to<br>this email.&nbsp;&nbsp;For some reason I was unable to get the patch to apply
<br>cleanly from the command line but Eclipse took it just fine.<br><br>Let me know if this is of interest and is a candidate for commit to<br>SVN.&nbsp;&nbsp;If so, I can update the patch to apply against the trunk.<br><br>Terry Laurenzo
<br><br><br><br><br><br><br>_______________________________________________<br>rules-dev mailing list<br><a href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-dev">
https://lists.jboss.org/mailman/listinfo/rules-dev</a><br><br><br></blockquote></div><br>