Example: Reason Using a Reference Relationship
You can gather data and reason about one entity's relationship to another entity. In the example rule below, a membership statement is used as a condition to determine if a product has been selected based on whether it is a member of the customer's chosen products.
the product has been selected if
ExistsScope(the customers)
IsMemberOf(the product, the customer's chosen products)
Tip: To see these rules in action, open the Worked Example 1 project in Oracle Policy Modeling.
It is possible to collect membership of a reference relationship on an interview screen. This can be useful where it is explicit user input that determines whether a particular entity is a member of a relationship. Consider whether this design would suit the purposes of your policy model when writing your rules.