[rules-users] Asserting new Facts in RHS...
JLL
jll at labocollard.be
Fri Apr 20 11:01:44 EDT 2007
hello
you should use = instead : in the then clause
$two = new RKEM_TARGET();
it's java code
cheers
JLL
jdepaul wrote:
>
> I'm trying to assert a new Fact based on a condition, but I dont know how
> to assert a new Fact with a specific attribute in it. I'm trying this -
> why doesn't this syntax work:
>
> rule "Assert new Target Records"
> when
> $one : RKEM_TARGET ( EQPNO == "1") &&
> $three : RKEM_TARGET ( EQPNO == "3")
>
> then
> // Assert the missing Equipment number record
> $two : new RKEM_TARGET();
> $two.setEQPNO("2"); // Set attribute
> assert( $two ); <-- This does NOT work...
> end
>
> How do you assert a new Fact with a specific value in the attribute(s)?
>
> THanks,
> James
>
>
>
--
View this message in context: http://www.nabble.com/Asserting-new-Facts-in-RHS...-tf3609763.html#a10103703
Sent from the drools - user mailing list archive at Nabble.com.
More information about the rules-users
mailing list