[rules-dev] Adding parameters to RulesTables

Michael Neale michael.neale at gmail.com
Mon Mar 12 20:43:37 EDT 2007


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.

Michael.

On 3/13/07, Terry Laurenzo <tlaurenzo at rcode.net> wrote:
>
> I added some logic to the decisiontables module to allow properties
> to be specified per RulesTable.  This is done by declaring a
> RulesTableConfig tag followed by properties that should apply to the
> following RulesTable.  I used this capability to allow declarations
> of code snippets that should be inserted before/after generated
> conditions and before/after the consequences on the right hand side.
> This allows me to create more complicated rule templates.
>
> For example, the declaration:
> ----
> RuleTableConfig
> LhsPreamble     ##LHS PREAMBLE
> LhsTrailer              ##LHS TRAILER
> RhsPreamble     ##RHS PREAMBLE
> RhsTrailer              ##RHS TRAILER
> ----
>
> produces the following DRL output:
>
> ----
> package Testing_table_configuration;
> #generated from Decision Table
> #From row number: 14
> rule "_14"
>
>         when
>                 ##LHS PREAMBLE
>                 Abc(column == "123")
>                 ##LHS TRAILER
>         then
>                 ##RHS PREAMBLE
>                 def.action;
>                 ##RHS TRAILER
> end
> ----
>
> The patch which includes these changes (against 3.0.5 source bundle)
> is attached.  I also added a test case spreadsheet to src/test/
> resources/data which is not included in the patch but is attached to
> this email.  For some reason I was unable to get the patch to apply
> cleanly from the command line but Eclipse took it just fine.
>
> Let me know if this is of interest and is a candidate for commit to
> SVN.  If so, I can update the patch to apply against the trunk.
>
> Terry Laurenzo
>
>
>
>
>
>
> _______________________________________________
> rules-dev mailing list
> rules-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20070313/9d6a4839/attachment.html 


More information about the rules-dev mailing list