Hello,
I have a global integer in my drl file and I use it in a rule like this:
global int id;
when
f: MyFact();
then
MyClass mc=new MyClass();
mc.setId(id);
end;
On my java code, I have:
int id=3
ksession.setGlobal("id", id);
But I get the error: Unexpected global [id].
I just test without the global in the RHS, like this:
then
MyClass mc=new MyClass();
int x=3;
mc.setId(x);
end;
It's working.