Hi,
I've never tried this but there is a getGlobals() method on the
StatelessKnowledgeSession and on the StatefulKnowledgeSession (actually
on KnowledgeRuntime).
Maybe worth giving a try :-).
Best regards,
Bruno.
rajivharris a écrit :
Hi,
I am setting a String variable as global. And trying the access the same in
my Java program. Can anyone help on how to do this.
code snippet:
global String prodName;
rule "Your First Rule"
when
#conditions
eval (true)
then
#actions
prodName= getName();
System.out.println( "name:" +prodName);
end
Thanks,
Rajiv.