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.

The input contract for the Parts decision service in Intelligent Advisor Hub The output contract for the Parts decision service in Intelligent Advisor Hub

A rule in a decision service project to concatenate all the parts required into a single field

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.

The Edit Reference dialog in Policy Modeling showing the mappings for the Parts decision service

In an interview, the parts required for the repair are collected.

A screen in an interview collecting the parts required for a washing machine repair

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.

A screen in an interview displaying the list of parts required for a washing machine repair