[rules-dev] Rule templates fed from objects

Steven Williams stevearoonie at gmail.com
Wed Mar 25 18:10:55 EDT 2009


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 :-)

cheers
Steve


2009/3/25 Wolfgang Laun <wolfgang.laun at gmail.com>

> Hello Steve,
>
> well, hm, yes, I'd seen from the source that it's possible to pass in
> arrays of strings as actual parameters. But I'd thought of pushing this just
> one small step further.
>
> From a TemplateContainer created from a template .drl file (no column data
> yet) you could learn the column names. These names should correspond to
> fields in a Bean. Access a Bean Object collection, retrieving the values (by
> reflection) to expand the templates into actual rules.
>
> Since there is a public Column[] getColumns in TemplateContainer, it's no
> big deal to implement it in an application, so I won't insist ;-)
>
> Regards
> Wolfgang
>
>
> 2009/3/25 Steven Williams <stevearoonie at gmail.com>
>
>> Hi Wolfgang,
>>
>> This has already been done - take a look at the tests in the templates
>> project. I think I also put some in the examples project.
>>
>> cheers
>> Steve
>>
>> 2009/3/25 Wolfgang Laun <wolfgang.laun at gmail.com>
>>
>>> Actual parameters for Rule Templates are currently supposed to come from
>>> decision tables, actually spreadsheets.
>>>
>>> It would not be too difficult to extend the current API so that rule
>>> instantiation takes the actual parameters from an object.
>>>
>>> What do you think?
>>>
>>> -WL
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> rules-dev mailing list
>>> rules-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>>
>>>
>>
>>
>> --
>> -------------------------------------------------------------------
>> Stevie Williams
>> Does something with computers
>>
>> _______________________________________________
>> rules-dev mailing list
>> rules-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-dev
>>
>>
>
> _______________________________________________
> 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/20090326/c4661fad/attachment.html 


More information about the rules-dev mailing list