Example: Invoke a Decision Service to Concatenate Text From Object Records
This example demonstrates how to invoke a decision service from a Policy Modeling project to concatenate text from object records. The files used in this example are:
The policy model is used to collect the parts required for a washing machine repair. It then sends these part entity instances to the decision service to combine the records into a single text field and return so that the parts list can be summarized.
This decision service is referred to in the Policy Modeling project using a decision service reference (Parts.ref). In this file, the relationship in the Policy Model ('all instances of the part') is input mapped to the decision service object ('the part'). The decision service field containing the concatenated list of parts ('the list of parts required') is output mapped to the equivalent attribute in the Policy Model.
In an interview, the parts required for the repair are collected.
The decision service is then invoked to combine the required parts into a text field separated by commas. This value (for example, 'Control board, Drive belt, Motor coupler, Pump, Water inlet valve') is returned to the interview and displayed on an interview screen.