Hello!
I'm still not getting good with drools rules, i'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'm aiming, I'm not able to.

Right now I'm trying to compose this:

When
   there's an workorder with skill
   and there's and engineer with the skill and capable of doing that workorder
then
   the engineer should do it

So i tried something like this:

rule "assignSkillWOToSkilledEngineer"
when
$wo : WorkOrder( $requiredSkill : requiredSkill  )
$engineer : Engineer(skill == $requiredSkill)
then
insertLogical(new IntConstraintOccurrence("assignSkillWOToSkilledEngineer", ConstraintType.NEGATIVE_HARD,
1, $engineer));
end

i get no exceptions, but the sort is not working properly