Re: [rules-users] Dynamic generated list

2010-05-19 Thread Giovanni Motta
Thank you for the response djb. Doing what you say, i will collect ALL instances of products with id 'A','B','C', instead i need a tuple of exactly one 'A', one 'B' and one 'C'. In my scenario, products may occur multiple times (that i forgot to say, my fault...). I investigated a bit and posted a

Re: [rules-users] Dynamic generated list

2010-05-19 Thread djb
You can't do any sort of constructor calls in the condition section. i'm not sure if you're asking what goes in the spot, but, $list: ArrayList() from collect(Product(id == @{id}, ...conditions...)) perhaps? -- View this message in context: http://drools-java-rules-engine.46999.n3.nabble

Re: [rules-users] Dynamic generated list

2010-05-19 Thread Giovanni Motta
Looking at: http://mvel.codehaus.org/Inline+List,+Maps+and+Arrays I see MVEL supports inline of lists, but unfortunately, this syntax seems not to be supported by 'from' construct. >From drools expert documentation @ 4.8.2.8 Conditional Element from i read: "The expression used to define the obje