[rules-users] sending string and list of string as parameter in Drools decision table

Wolfgang Laun wolfgang.laun at gmail.com
Fri Jul 20 06:11:45 EDT 2012


Actions are executed from left to right.

1st action: X myX = new X(); xlist.add(myX); myX.setA($param);
2nd action: myX.setB($param);
3rd action: myX.getCList().add( $param );

-W

On 20/07/2012, debchamps <majumdar.debarghya at gmail.com> wrote:
> Thanks a lot :) It worked.
>
> Another thing I was wondering whether we could do with decision table..
>
> I have a list xlist List<X>;
>
> class X {
> String a;
> String b;
> List<String> cList;
> }
>
> Condition     Action                Action                    Action
> $1=$1
> ----------------------------------------------------------------
>                  a1                         b1                        1,2,4
>                  a2                         b1                        2,3,7
>
>
>
> So if  both the condition satisfies I would want to have the Xlist having
> two entry
>
> X(a1,b1,(1,2,4)) and X(a2,b1,(2,3,7))
>
> The main challenge is how to combine all the action as all the the action
> will update same object
> but at some point we want to insert the object into list and there will be
> more than one element in the list.
> The reason I do not want to keep a1,b1,1,2,4 in same cell is it defeats the
> purpose of keeping in excel for making it usable by the business. (and also
> it is not clear)
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/sending-string-and-list-of-string-as-parameter-in-Drools-decision-table-tp4018789p4018792.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


More information about the rules-users mailing list