Thursday, March 27, 2014

one drool rule example, understand the syntax

Here is a drool rule.

Line 3: if object Inop exists which Item=="21-21-01", set variable $itemNo = Inop.itemNo
Line 4 and 5: count PositionElement which itemNo=$ItemNo(generated from Line 3) and positionID=="dont_care", the count result is saved in $quantityTotal as Long
Line 7: count Inop by (itemNo == $itemNo, Item=="21-21-01")
Line 6: the result of Line 7 is put in longValue to compare with ($quantityTotal - 0)
Line 8: DispatchConfiguration(itemNo == $itemNo, id == "21-21-01A", reasonsForNoGo not contains "Too many inoperative") exists and use $da as its reference
If all the conditions satisfy, do line 10-12, moidfy $da, call the method setNoGoWithReason method

No comments:

Post a Comment