[rules-users] unsolved myth regarding transitive closure using insertlogical...

Simon Chen simonchennj at gmail.com
Sat Feb 19 00:20:55 EST 2011


Hi all,

I know this is kinda an old topic, but I just couldn't get it working.

Here is a previous attempt using insertLogical() to handle transitive
closure:
http://drools-java-rules-engine.46999.n3.nabble.com/transitive-closure-td56855.html#a56858
The problem with this one is that the newly "logically inserted" object
would violate its own "not exists" condition term, thus removing itself,
then goes the infinite circle of insert/remove...

Here is a post that deals with transitive closure using "insert", but it
doesn't handle object removal correctly:
http://drools-java-rules-engine.46999.n3.nabble.com/one-question-about-Transitive-Closure-td57289.html


To me, using insertLogical is attractive because it doesn't require me to
write specific rules to handle object removal. Is there a trick that I can
use to actually implement transitive closure with insertLogical?

Thanks a lot!
-Simon



More information about the rules-users mailing list