Sikkandar Nawabjan wrote:
Hi,
I have couple of questions
1) I want to validate a Object and based upon certain condition set the flag and that flag available in my working memory context so that all the rules will execute based on the value of this flag. Is there any way to set the Global
(1) Theres nothing stopping you using a singleton to hold state, so this
provides what you want:-
rule 1
when
$o : AnObject( someField == someCriteria )
then
boolean someFlag = true;
insert(new State( someFlag ) );
end
rule 2
when
State (someFlag == true )
$o : AnotherObject ( )
then
//something
Hi,
I have couple of questions
1) I want to validate a Object and based upon certain condition set the flag
and that flag available in my working memory context so that all the rules will
execute based on the value of this flag. Is there any way to set the Global
variable in working memory