[rules-users] Flow: "Multiple Instances" vs rule task

Gabor Szokoli szocske at gmail.com
Fri Dec 10 15:58:11 EST 2010


Hi,

I'm looking into Drools Flow, because some of our rules are sequential
and procedural, resulting in salience nightmare (like line numbers in
BASIC, only backwards :-) ) with lots of repetition in conditions.
Besides our domain people just love the idea of executable flow charts :-)

Having read through the documentation, it is not clear how I can
conveniently use rule tasks in a "foreach" node: I would like the
"foreach" node to virtually partition the Working Memory for the rules
inside: each execution of the inner rules should see their own small
subset of the Working Memory.

My initial guess is to do "foreach" over the list of values that
discriminate between the facts, then the inside rules could all start
like this:

when
   $processInstance : WorkflowProcessInstance()
   $whatever:Whatever( discriminatorField == (
$processInstance.getVariable("forEachVariable") ) )
   ...
then


Is that the way, or am I missing something here?


Thanks in advance:

Gabor Szokoli



More information about the rules-users mailing list