no-loop
when
$a : Acte();
eval($a.getCompetence().equals("MEDECIN"))
then
insert($a);
end
This rule seems incorrect to me. In readable form, this rule says "When there exists some Acte whose competennce equals "MEDECIN", then insert that Acte". If an Acte has already been inserted for this rule to find, why would you want to re-insert the same Acte? I think you might misunderstand the basics of setting up a rules session. Somewhere close to where you are using setGlobal(), are you using a "ksession.insert(new Acte())" or something similar?
If you were to do this instead, then your rule would fire...although again, I'm not sure why you want to reinsert something that's already been inserted:
Acte acte = new Acte();
acte.setCompetence("MEDICIN");
FactHandle acteHandle = ksession.insert(acte);
ksession.setGlobal("test", "my string test");
ksession.fireAllRules();