there's no restriction that the WorkerOrder is assigned to that engineer, so it matches with every engineer of that skill?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:
Whenthere's an workorder with skilland there's and engineer with the skill and capable of doing that workorderthenthe engineer should do it
So i tried something like this:
rule "assignSkillWOToSkilledEngineer"when$wo : WorkOrder( $requiredSkill : requiredSkill )$engineer : Engineer(skill == $requiredSkill)
the cause $engineer is a problem: If an engineer combines with 2 workorders, it will only count for 1 point due the way insertLogical work.theninsertLogical(new IntConstraintOccurrence("assignSkillWOToSkilledEngineer", ConstraintType.NEGATIVE_HARD,1, $engineer));
I would write it like this (pseudo code):end
i get no exceptions, but the sort is not working properly
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users