Hi all,<br><br>I don't know exactly why I have a problem in my "exists"
function. I've tried
many different ways, but it does not work. Anybody could help me,
please?<div class="im"><br><br>I
have the following rules:<br><br><i>rule "diff"<br>when<br> $var1:
EReference(name == "employee")<br> $var2: EClass(name == "Company",
EAllReferences contains $var1)<br> <b style="color: rgb(0, 0, 153);">not
(exists( EPackage(EClassifiers contains $var2 ) ))</b><br>then<br>
insertLogical(new IntConstraintOccurrence("diff", 10));<br>end<br><br>rule
"ClassesNotReferenced"<br> when<br> $q1 : EClass();<br>
$q2 : EPackage(EClassifiers contains $q1);<br> not( exists (
EReference(EType == $q1) ));<br> then<br> insertLogical(new
IntConstraintOccurrence("ClassesNotReferenced", 1, $q1));<br>end</i><br><br><br></div>and
in my facts (and my EPackage) I have 4 instances of EClass
"Company" with a EReference "employee", and another EClass "Person". I
still have a "move" that removes EClasses in my Drools Solver.<br><br>I
need to have only one classe "Company" after processing. But it
removes only the EClass "Person", when it was supposed to remove one
EClass
"Person" and 3 ECLasses "Company". Leaving one EClass "Company" in the
end.<br><br>The
problem is: when Drools tries to remove a EClass "Person" it thinks that
the EClass "Company" does not exists. But in fact there are 3 others.<br><br>Any
clue about it, please ?<br><br>Thanks<br><br>Bests regards<br><br>Antonio<br><br><br>