[rules-users] Descision Tables loop around params $1, $2, $3 add to list

Wolfgang Laun wolfgang.laun at gmail.com
Thu Aug 15 05:13:55 EDT 2013


Why loop? List.addAll(), Arrays.asList(), etc. etc.

-W


On 15/08/2013, captainrhino <graeme.kitchen at axa-travel-insurance.com> wrote:
> With the pseudo class below as an example I am looking to dynamically loop
> around the list of params (there could be n number of strings) in a
> descision table and load some values into a list. I could do this in
> separate columns but I am looking to do it in one column so as that there
> can be an infinite number of strings.
>
> public MyClass{
>
> 	private List<String> list;
>
> 	private List<String> getList(){
> 		return list;
> 	}
>
> }
>
> Pesudo desciion table
>
> Action
>
> forAll ($) myclass.list.add($)
>
> ListOFStrings
> first,second,third,fourth
>
>
> basicaly list gets populated with the $1,$2,$3,$n etc values by some king
> of
> loop construct.
>
> Is this even possible or can someone suggest an alternative?
>
>
> regards and thx in advance
>
> GRaeme
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/Descision-Tables-loop-around-params-1-2-3-add-to-list-tp4025552.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