[rules-users] Possibly stupid question... but I have to ask

Joe White Joe.White at recondotech.com
Thu Jul 28 17:11:16 EDT 2011


Why would you need to do that? This flow is logically the same.

rule "my rule"
	when
	   ...
	then

	    //Java code to modify fact goes here
	    insert( fact );
end


Joe
-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of menada
Sent: Thursday, July 28, 2011 2:20 PM
To: rules-users at lists.jboss.org
Subject: Re: [rules-users] Possibly stupid question... but I have to ask

I meant to insert a fact and immediatly modify it, in the same rule
consequence.
I know you can insert OR modify in a consequence.
I also know that when you modify a fact you actually retract the old one
and
insert a new one with the respective properties set.

So, my question was, can you do something like this ? 
rule "my rule"
	when
	   ...
	then
	    insert( fact );
            modify (fact );
end

Where fact is the same?

And if it's possible, can you give me a simple example?


--
View this message in context:
http://drools.46999.n3.nabble.com/rules-users-Possibly-stupid-question-b
ut-I-have-to-ask-tp3207666p3207709.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list