In the BRMS you can assign a variable to your fact in the LHS.
This would then result in:
a : FNAC_CLIENT_CONTROL( FNAC_BIRTH_PLACE == "IL" )
On 10/12/2007 20:38, kissro(a)lidp.com wrote:
I am creating all my rules using the BRMS guided rule editor gui.
In the rule editor, I have a rule that looks like this:
FNAC_BIRTH_PLACE is equal to "IL"
Assert FNCM_COMMENT FNCM_VARIABLE_DATA "This client lives in Illinois"
When I click the 'View Source' button I see this:
FNAC_CLIENT_CONTROL( FNAC_BIRTH_PLACE == "IL" )
FNCM_COMMENT fact0 = new FNCM_COMMENT();
fact0.setFNCM_VARIABLE_DATA( "This client lives in Illinois");
insert( fact0 );
After I return from "fireAllRules", how do I reference the newly
asserted fact in my Java code? Do I reference "fact0" or can I use the
object's "real" name - FNCM_COMMENT.FNCM_VARIABLE_DATA?
"fact0" is just a generated name created by BRMS when it generates the
rule based on what I type in the gui, right? I'm assuming if I insert
more facts, they would be called fact1, fact2, etc. If I want to
reference these facts, do I have to keep track of how many I've inserted
then reference the appropriate fact number? I'm not sure how to
reference these generated fact names after returning from the rule
engine. Could someone help me?
rules-users mailing list