Note that you must inform the engine if you change a fact in the working memory (so that engine knows to re-evaluate rules if necessary). So after changing the user object, you should also call update(user);
Kris Quoting liuzhikun <[email protected]>: > Fllow rule flow split node toNodeId=2 always is true.Please help me. > > <process > > <header> > <imports> > <import name="t2.state.User"/> > </imports> > <variables> > <variable name="user" > > <type > name="org.drools.process.core.datatype.impl.type.ObjectDataType" > className="User" /> > </variable> > </variables> > </header> > > <nodes> > <start id="1" name="Start"/> > <join id="2" name="Restart" type="2"/> > <actionNode id="3" name="changeAge"> > <action type="expression" dialect="mvel">System.out.println("age: > "+user.age);System.in.read();user.age+=1;</action> > </actionNode> > <split id="4" name="decide" type="2"> > <constraints> > <constraint toNodeId="2" toType="DROOLS_DEFAULT" name="go to > rest" type="rule" priority="1" dialect="mvel">User(age < > 3)</constraint> > <constraint toNodeId="100" toType="DROOLS_DEFAULT" name="go to > end" type="rule" priority="2" dialect="mvel">eval(true)</constraint> > </constraints> > </split> > <end id="100" name="End"/> > </nodes> > > <connections> > <connection from="1" to="2"/> > <connection from="2" to="3"/> > <connection from="3" to="4"/> > <connection from="4" to="2"/> > <connection from="4" to="100"/> > </connections> > > </process> > > > > > liuzhikun > 2009-10-30 > Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
