Now, if you have done some critical thinking about what we have done so far, you should notice one important hint: the order at which rules will execute will actually change the final outcome.
If both Rules 1 and 2 will be evaluated to true, then RiskGrade will be set to RG1 or RG2 depending on which rule gets executed first. To solve such cases, you should always give your rules priorities.
Without priorities or with equal priorities, rules will be executed in a random order. Priorities are set by selecting each rule and setting its priority property in the Properties window. Higher priorities get executed first. In our current example, assume that we want Rule2 to execute first and Rule1 to come second. As such, give Rule2 priority 2 and Rule1 priority 1 using the Properties window.
No comments:
Post a Comment