[rules-users] Hard constraint on selecting a skill
André Fróes
arfmoraes at gmail.com
Thu Feb 7 09:15:24 EST 2013
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20130207/d5a7a579/attachment.html
More information about the rules-users
mailing list