Example: Invoke a Decision Service to Determine a Value for Different Entities
This example demonstrates how to invoke a decision service from a Policy Modeling project to determine a value for different entities. The files used in this example are:
The policy model needs to determine the pension age that is applicable to the applicant and also to the applicant's dependent in order to work out the applicant's eligibility for Carer's Allowance. To do this a single decision service that contains the rules for pension age can be used.
This decision service is referred to in the Policy Modeling project using two decision service references (Your Pension Age.ref and Dependent Pension Age.ref).
The Your Pension Age reference is calculated once per case and maps the pension age calculated in the decision service to 'your pension age' attribute in the policy model.
The Dependent Pension Age reference is calculated for each of the dependents and maps the pension age calculated in the decision service to 'the dependent's pension age' attribute in the policy model.
In an interview, the Pension Age decision service is invoked multiple times: once when your birthdate is known and also for each dependent when their birthdate is known. Each time, a value is determined by the decision service for the pension age. The values for 'your pension age' and 'the dependent's pension age' can then be used by the policy model rules to determine if you are eligible for Carer Allowance.