[rules-users] How to validate literal values on the LHS of rules.

Michael Anstis michael.anstis at gmail.com
Sat Mar 5 17:53:07 EST 2011


I'm a little confused, are you using spreadsheet Decision Tables or
spreadsheets to simply hold data for Rule Templates?

I glean that you have a spreadsheet containing parameters used in Templates
and you'd like to validate these parameters.

Could you please clarify?

Thanks

On 5 March 2011 14:19, groovenarula <gnarula1 at la-z-boy.com> wrote:

> Hello all,
>
> In my use case, I am planning on using decision tables to implement rules
> that contain product information (product attributes - like product grade,
> product style etc). I've managed to put together the spreadsheet and have
> been successful in generating different set of rules (using rule templates)
> from this spreadsheet. The spreadsheet with contain basic product
> information that product fact will be matched against.
>
> e.g. The spreadsheet will contain columns of product grade and product
> styles that when translated into rules, the LHS would look something like
>
>     Product ( grade == "010", style == "515" )
>
> Where the '010' and '515' would come from a spreadsheet (decision table)
> that the user's provide.
>
> Now here's the challenge. I need to also provide a means for the user to
> validate the "010" and "515". The available product grade and styles are
> available in a database table. So I should be able to use that to build
> second set of rules (templates). So I'm thinking, if there's a way to
> convert the user supplied spreadsheet and make it a table of 'facts' of the
> validation rules, I should be able to verify the value "010" "515" against
> the database.
>
> Is that the best way to go about this ? If so, can someone please point me
> to a way to load facts from a spreadsheet ? I have looked around and found
> that there is a jxls project that allows loading of JavaBeans from values
> in
> spreadsheet. But it requires xml files to be configured. I really like the
> way rule templates work (by simply state substitution variables in the
> template itself - thereby avoiding the whole need to configuration xml
> files). I think if there's a way to load facts using templates from a
> spreadsheet, I should be able to use that concept to validate the values in
> my rules.
>
> So is it possible to do the above ? Also is there a better way ?
>
> Any insight would be appreciated.
>
> Thanks in advance,
> Gurvinder
>
>
>
>
> --
> View this message in context:
> http://drools-java-rules-engine.46999.n3.nabble.com/How-to-validate-literal-values-on-the-LHS-of-rules-tp2638081p2638081.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110305/45cbf52f/attachment.html 


More information about the rules-users mailing list