rule "Assert new Target Records"<br> when<br> $one : RKEM_TARGET ( EQPNO == "1") &&<br> $three : RKEM_TARGET ( EQPNO == "3")<br><br> then<br> // Assert the missing Equipment number record
<br> RKEM_TARGET $two = new RKEM_TARGET();<br> $two.setEQPNO("2"); // Set attribute<br> assert( $two ); <-- This does NOT work...<br>end<br><br>Then "then" section is just normal java with a few methods and objects provided for you.
<br><br>cheers<br>Steve<br><br><div><span class="gmail_quote">On 4/20/07, <b class="gmail_sendername">jdepaul</b> <<a href="mailto:jjdepaul@us.ibm.com">jjdepaul@us.ibm.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>I'm trying to assert a new Fact based on a condition, but I dont know how to<br>assert a new Fact with a specific attribute in it. I'm trying this - why<br>doesn't this syntax work:<br><br>rule "Assert new Target Records"
<br> when<br> $one : RKEM_TARGET ( EQPNO == "1") &&<br> $three : RKEM_TARGET ( EQPNO == "3")<br><br> then<br> // Assert the missing Equipment number record
<br> $two : new RKEM_TARGET();<br> $two.setEQPNO("2"); // Set attribute<br> assert( $two ); <-- This does NOT work...<br>end<br><br>How do you assert a new Fact with a specific value in the attribute(s)?
<br><br>THanks,<br>James<br><br><br>--<br>View this message in context: <a href="http://www.nabble.com/Asserting-new-Facts-in-RHS...-tf3609763.html#a10086922">http://www.nabble.com/Asserting-new-Facts-in-RHS...-tf3609763.html#a10086922
</a><br>Sent from the drools - user mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">
rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>Steven Williams
<br><br>Supervising Consultant<br><br>Object Consulting<br>Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501<br><a href="mailto:stevenw@objectconsulting.com.au">stevenw@objectconsulting.com.au</a><br><a href="http://www.objectconsulting.com.au">
www.objectconsulting.com.au</a><br><br>consulting | development | training | support<br>our experience makes the difference