Rules are said to run in the context of the item they are evaluating or calculating and all items on whose values the rule script depends. A rule context answers the questions:
By separating the definition of a rule from the specification of the item it runs against, contexts give you the flexibility to associate the same rule with many different items.
A rule context consists of:
A single rule can have many contexts; for example, a rule that tests for range limits can be applied to different items on multiple forms, passing arguments that are specific to the context each time it is applied. Therefore, a rule that checks for valid ranges on a height item can use arguments that specify minimum and maximum number of inches in the height context; when the same rule is applied to a pulse rate item, it can use a different set of arguments that specify a minimum and maximum number of heartbeats.
Note: Only form rules, calculations, and randomization rules have contexts; conversion rules, which are applied to unit definitions, do not.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
---|