Hi,
I'm testing Drools Flow functionality and it seems that the foreach node
iterates over the collection one value at a time, the embedded flow is
executed sequentially for each value. I'm looking for some construct
that invokes each embedded flow simultaneously for each collection
value. Like a AND split/AND join of multiple instances.
Is this possible with forEach, am I missing some configuration? or any
other way to achieve it.
Thanks,
Carlos
Show replies by date
I've just noticed this too - I presume you mean using the 'from'
keyword.
The iteration seems to take place over only the match conditions which
follow the 'from' line. I tried a debug-printing eval() before and
after; when before 'from', it was evaluated only once; when after, it
was evaluated (at least) as many times as there were elements in the
collection.
This goes against my understanding of the Drools model, in which I
thought rule LHS effectively caused all matching objects to be put in
something like a rule-instance-specific working memory, and the
cross-product evaluated for the RHS... But clearly I'm missing something
too.
-----Original Message-----
From: rules-users-bounces(a)lists.jboss.org
[mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Carlos
Villegas
Sent: 15 September 2010 15:44
To: Rules Users List
Subject: [rules-users] simultaneous forEach
Hi,
I'm testing Drools Flow functionality and it seems that the foreach node
iterates over the collection one value at a time, the embedded flow is
executed sequentially for each value. I'm looking for some construct
that invokes each embedded flow simultaneously for each collection
value. Like a AND split/AND join of multiple instances.
Is this possible with forEach, am I missing some configuration? or any
other way to achieve it.