[rules-users] OR condition in decision tables
Edson Tirelli
tirelli at post.com
Wed Feb 20 09:44:02 EST 2008
Mahesh,
I'm not a decision table specialist, but I see a couple choices I would
try:
1. Simplest: since each line is a rule, just use 2 lines that will break
down into 2 rules, each testing for a different value. Use cell merges for
conditions that have the same value on multiple lines.
2. "in" operator: for cases like you showed, try using the "in" operator:
field in ( $param ). So in the table cell, the user just use a list of
values separated by coma, generating a pattern like:
applicant : Applicant( applicantType in ( "authenticated", "existing" ) )
Not sure if there are other, better ways to do it.
[]s
Edson
2008/2/19, Mahesh Gadgil <maheshgadgil at hotmail.com>:
>
> Hi ALL,
>
> This is my first project on drools. I am using JBOSS rules 4.0.4 and
> wouldlike your help.
> I want to create a spreadsheet that will compile into drl file. I can
> notfigure out how I could create an OR condition in the spreadsheet. The
> drlcode I am looking to get finally will look like this. The documentation
> on JBOSS site does not provide any examples of OR condition in a
> spreadsheet.
>
> WHEN
> applicant : Applicant(applicantType == "authenticated"
> ||applicantType == "existing")
> ............
> THEN
> applicant.setfundingType(internal")
>
> END.
>
> Thanking you in advance
> Mahesh
>
> ------------------------------
> Post free auto ads on Yello Classifieds now! Try it now!<http://ss1.richmedia.in/recurl.asp?pid=255>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
--
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080220/ea564155/attachment.html
More information about the rules-users
mailing list