[rules-dev] Rule templates fed from objects

Wolfgang Laun wolfgang.laun at gmail.com
Fri Mar 27 15:39:14 EDT 2009


2009/3/25 Steven Williams <stevearoonie at gmail.com>

> Hi Wolfgang,
>
> Yeah sorry, I couldn't remember how far I took it. Unfortunately I haven't
> had a lot of time to take it further, so.... if you want to contribute
> anything you do back I will buy you a drink :-)
>

Where's your favourite watering hole? ;-)

The attachment contains:

org.drools.template.ObjectDataCompiler.java - NEW, extending
DataProviderCompile with a couple of methods for calling the template
compiler with collections of maps or objects providing the actual parameters
for substitution

org.drools.template.DataProviderCompiler.java - MODIFIED, because
closeStream is now protected

org.drools.template.objects - new package containing:
dorg.drools.template.objects.ObjectDataProvider.java - NEW, the
implementation

org.drools.template.DataProviderCompilerIntegrationTest.java - MODIFIED,
with additional unit tests, re-using the data of the old one

As facts are objects, it's now possible to write rules that fire on some
Fact backing an ObjectDataProvider, with the RHS calling the template
compiler. This could be used in a staging process, to set up rules in stage
1 that process the actual fact database in the next stage.

Regards
Wolfgang


> cheers
> Steve
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-dev/attachments/20090327/6d5d0ce6/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: templates-extension.tgz
Type: application/x-gzip
Size: 4208 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-dev/attachments/20090327/6d5d0ce6/attachment.tgz 


More information about the rules-dev mailing list