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(a)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(a)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(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-dev
>
>
--
-------------------------------------------------------------------
Stevie Williams
Does something with computers
_______________________________________________
rules-dev mailing list
rules-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev