Hi Simon, Could you tell me a bit more about your logic below in code level? I can't imagine how it goes.
So, I first insert an A(), print all the objects. Retract A(), and print all the objects. Here's what I got: com.sample.B@42 com.sample.C@43 com.sample.A@548997d1 after retract! com.sample.B@42 com.sample.C@43 Benson On Tue, Mar 8, 2011 at 3:33 AM, Simon Chen <[email protected]> wrote: > Hi all, > > An interesting finding: > > I have three simple rules: > rule "A2B" > when > A() > then > insertLogical(new B()); > end > rule "B2C" > when > B() > then > insertLogical(new C()); > end > rule "C2B" > when > C() > then > insertLogical(new B()); > end > > Basically, once we have an A(), we'll logically insert a B(). Once we > have a B(), we'll logically insert a C(). Once we have a C(), we'll > logically insert a B(). > > So, I first insert an A(), print all the objects. Retract A(), and > print all the objects. Here's what I got: > com.sample.B@42 > com.sample.C@43 > com.sample.A@548997d1 > after retract! > com.sample.B@42 > com.sample.C@43 > > So, B() and C(), which should be logically depend on A(), somehow are > not retracted. The problem I see is the truth maintenance system allow > B() and C() to depend on each other, thus not affected by losing A(). > > Is this a bug or my bad usage? > > Thanks. > -Simon > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
