[rules-users] How to obtain the object/fact created in the rule file?

Benson Fung benson.redhat at gmail.com
Fri Jan 28 12:02:48 EST 2011


Hi,

I developed a rule as below:

	rule "Rule1"
	    dialect "mvel"
	    when
	        Fields( field1 > "100" )
	    then
	        FieldResults fact0 = new FieldResults();
	        fact0.setField1( "This is Correct!" );
	        insert(fact0 );
	end

After calling fireAllRules(...), the above rule will be fired and
created a fact object in the working memory.
My problem is how to obtain the FieldResults object in the java
program.  Please advise.


Thanks
Benson



More information about the rules-users mailing list