<div dir="ltr">Hello!<div style>I&#39;m still not getting good with drools rules, i&#39;m trying several examples and basic ones. Some i did without any problem and understood plenty well, but when I try to make an approach to what i&#39;m aiming, I&#39;m not able to.</div>
<div style><br></div><div style>Right now I&#39;m trying to compose this:</div><div style><br></div><div style>When</div><div style>   there&#39;s an workorder with skill</div><div style>   and there&#39;s and engineer with the skill and capable of doing that workorder</div>
<div style>then</div><div style>   the engineer should do it</div><div style><br></div><div style>So i tried something like this:</div><div style><br></div><div style><div>rule &quot;assignSkillWOToSkilledEngineer&quot;</div>
<div><span class="" style="white-space:pre">        </span>when</div><div><span class="" style="white-space:pre">                </span>$wo : WorkOrder( $requiredSkill : requiredSkill  )</div><div><span class="" style="white-space:pre">                </span>$engineer : Engineer(skill == $requiredSkill)</div>
<div><span class="" style="white-space:pre">        </span>then</div><div><span class="" style="white-space:pre">                </span>insertLogical(new IntConstraintOccurrence(&quot;assignSkillWOToSkilledEngineer&quot;, ConstraintType.NEGATIVE_HARD,</div>
<div><span class="" style="white-space:pre">                                        </span>1, $engineer));</div><div>end</div><div><br></div><div style>i get no exceptions, but the sort is not working properly</div></div></div>