<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div>Hello,<br><br></div>I have a global integer in my drl file and I use it in a rule like this:<br><br></div><div>global int id;<br></div><div><br></div>
when<br></div>           f: MyFact();<br></div>then<br></div>          MyClass mc=new MyClass();<br></div>         mc.setId(id);<br></div>end;<br><br></div>On my java code, I have:<br>int id=3<br>ksession.setGlobal(&quot;id&quot;, id);<br>
<br></div>But I get the error: Unexpected global [id].<br></div></div>I just test without the global in the RHS, like this:<br><br>then<br>          MyClass mc=new MyClass();<br>         int x=3;<br>         mc.setId(x);<br>
end;<br><br></div>It&#39;s working.<br><div><div><div><div><div><div><div><div><div><div><div><div><br>What am I doing wrong ?<br>I tried with the type Integer (java.lang.Integer), but same problem.<br><br></div><div>If anyone can help me,<br>
<br></div><div>Thanks,<br></div></div></div></div></div></div></div></div></div></div></div></div></div>