Context Rule Sets provide the ability to author rules for an Entity that is referenced at a specific location in the schema. They are useful for rules that need to pertain to an Entity when used in a particular context, but the rules will not apply for instances of the Entity in other contexts. For example, an "Address" entity could be referenced from multiple fields on an "Order" entity including "ShippingAddress" and "BillingAddress". A Context Rule Set can be defined in the context of "Order.ShippingAddress" and the rules will be in effect for only the "ShippingAddress" instance of the "Address" entity.
Context Rule Sets may exist in the context of
- Fields - must have a data type set to "Complex" or "Entity" (referred to as a "child entity")
- Collections - each collection member is the "child entity" context
When authoring rules, users can reference fields from both the child entity and the parent entity. This is referred to as “dual context”. Again, an advantage of this authoring model is that it allows users to author rules against instances of an entity referenced from a specific location in the schema (either from a Field or Collection) rather than ALL instances of the entity type, which is the entity rule set model.
Context Rule Sets include the following features
- Access to both auto and explicit fire modes
- Lets users write rules in the context of specific Complex or Entity fields
- Useful when referencing 1 instance of an entity (referenced in a field) rather than every instance of an entity
The below example shows a rule set that was created in the context of the Mortgage.PaymentSummary entity field, giving it access to all the data in Mortgage as well as the instance of PaymentSummary referenced in the Mortgage.PaymentSummary field.
Creating Context Rule Sets
Users can create Context Rule Sets by clicking on the target field or collection and clicking "Create Rules".
Name
Specifies the name of the Rule Set. This name is used when explicitly executing or activating the rule set from either an Execute Rule Set Action, Activate Rule Set Action, or irSDK.
Parameters
Available only in the explicit fire mode. Specifies decimal, Boolean, date, datetime, integer, text, and entity values to act as the inputs for the execution of the rule set. The "Auto Create" checkbox is enabled for entity parameters only. With "Auto Create" checked, an instance of the specified entity type is created automatically when the rule set is executed.
Note: Parameters are optional and not required for basic Rule Set execution.
Activated by Default
Designates whether or not this Rule Set will be considered in the initial rule dependency network during rule execution. Rule Sets CAN be re-activated during rule processing at runtime using various Activate Rule Set actions.
Rules
Specifies the list of Rules and Actions that will be executed for this Rule Set.
Comments
0 comments
Please sign in to leave a comment.