[rules-users] irrational behaviour by drools engine

rjr201 rich.j.riley at gmail.com
Fri Feb 14 07:23:33 EST 2014


Ok, I think I'm starting to understand. Could you create another fact object
that is a pair of encapsulating objects, one that is inserted, and another
that you retrieve from your global?

It would look something like: 

public class EncapsulatingObjectPair {
   EncapsulatingObject a;
   EncapsulatingObject b;

//getters setters etc..

}

And then you'd have a rule that looks like this: 

WHEN 
   $object : EncapsulatingObject($key : id)
THEN
   insert new EncapsulatingObjectPair($object,
encapsulationMap.get($key+""));
END

And a second rule that looks something like:

WHEN 
   EncapsulatingObjectPair(secondEncapsulatingMap != null)
THEN
   do something.. 
END

I haven't tried to compile this.. but the general idea is there.



--
View this message in context: http://drools.46999.n3.nabble.com/irrational-behaviour-by-drools-engine-tp4028104p4028121.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list