[rules-users] sending string and list of string as parameter in Drools decision table
Wolfgang Laun
wolfgang.laun at gmail.com
Fri Jul 20 04:25:42 EDT 2012
You could rewrite the method
setAll(String a,String b, String... c)
and pass in a flat list of parameters:
"India","Pakistan","China","Russia","Cuba"
As it is, it's incorrect Java, you'd need
context.setAll($1,$2,new String[]{$3})
and (I hope) Drools handles the parenthesized list correctly, i.e.,
drops the parentheses.
-W
On 20/07/2012, debchamps <majumdar.debarghya at gmail.com> wrote:
> Hi,
> facing a problem with Drools decision table. Need help
> I have an action which will take 3 argument The first two are string and
> the
> third one is list. How to handle such cases. The problem is Drools is
> thinking all three are String.
>
> Action
> context.setAll($1,$2,$3)
>
> "India","Pakistan",("China","Russia","Cuba")
>
> and there is a function on context class
>
> void setAll(String a,String b, String[] c){
>
> }
>
>
>
>
>
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/sending-string-and-list-of-string-as-parameter-in-Drools-decision-table-tp4018789.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