Hi
Thank you very much I partly succeeded using your suggestion.
I particularly did the following:
rule "list rule "
agenda-group "Group 2"
dialect "mvel"
no-loop true
when
P : Project(isDefined(P.seq_B))
s : java.util.ArrayList() from collect ( Integer (!(this > 0 && this <
3)) from P.seq_A)
//( Integer (this > 0 && this < 3) from P.seq_A);
then
System.out.println("Rule satisfied # " + P.seq_A);
//modify(P) {seq_B = s};
end
However, I would like to do every thing all at once in the LHS, or maybe
RHS. This is because I have to work around similar functions like the
following:
1) collect from collectionA with a boolean constraint into collectionB
2 ) similarly, collect everything that does not satisfy.
Custom evaluators - sounds interesting. Sadly, I did not find it. Would be
very much useful if you can share an example.
Many thanks :)
--
View this message in context:
http://drools.46999.n3.nabble.com/Reg-Iterating-over-a-list-tp4019512p401...
Sent from the Drools: User forum mailing list archive at
Nabble.com.