Actually, the ksession.insert and setGlobal need to be reversed in the
example I provided, but my questions remain the same - why reinsert the
object and are you inserting elsewhere it to begin with?
On Thu, Jan 24, 2013 at 12:22 PM, Jeremy Ary <jeremy.ary(a)gmail.com> wrote:
rule "actes par competence"
$a : Acte();
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();
FactHandle acteHandle = ksession.insert(acte);
ksession.setGlobal("test", "my string test");
On Thu, Jan 24, 2013 at 12:03 PM, Mister Nono <noel.maurice(a)univ-jfc.fr>wrote:
> See the solution at this post :
> View this message in context:
> Sent from the Drools: User forum mailing list archive at Nabble.com
> rules-users mailing list