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.

What am I doing wrong ?
I tried with the type Integer (java.lang.Integer), but same problem.

If anyone can help me,

Thanks,