Enrichment scenario

In the enrichment scenario, for an incoming document, a web service is used to retrieve additional data and add that to the document. For example, a BOD containing employee data is coming in. The data is not complete yet because the salary information is stored in a separate application. A web service is available to retrieve the salary for an employee. This information must be added to the employee BOD before sending it to a next step in the flow.

In this case, the model in ION Desk is as follows. A document flow contains a web service activity in the middle of the flow. In the activity, the web service connection point to be used is selected. This is the same as the triggering scenario.

This diagram shows an example document flow:

Sample document flow diagram

In the web service connection point the connection settings must be defined and the WSDL must be loaded, as described earlier.

After that, you can model:

  • The operation to be used.
  • The BOD document to be used. The document is defined using a document type (such as MyEmployee). In this scenario, the type of the incoming BOD document is the same as the type of the outgoing BOD document. The verb is always Sync.
  • The transformation from the BOD document to the web service input.
    • You can use an automatic transformation. In that case the web service input must be inside the noun element of the BOD. The required input for the web service operation is known, an XSD is included in the WSDL. Therefor, a custom BOD can be generated in the ION Registry.

      In case of automatic transformation, the incoming must contain exactly one noun instance. If it contains no noun instance or multiple noun instances then the BOD is rejected, resulting in a Confirm BOD.

      In most cases automatic transformation cannot be used in the enrichment scenario. If you use an existing web service, the probability is low that the content of the BOD noun matches the input for the web service.

    • You can use your own transformation by selecting Advanced. In that case you must provide an XSLT to map the incoming BOD to the web service request. This provides more flexibility. For example, you can set header elements in the web service request, or you can pick the required data from an incoming standard BOD. This more complex to model.

      When using the advanced transformation, you can specify the transformation by clicking Details. If no XSLT was specified before, a default XSLT is provided. This default XSLT is a template to be used as a starting point. It is not a working XSLT.

      The Advanced transformation option supports both XSLT "1.0" and "2.0" standards. Specify the appropriate version you want to use in the version attribute of the XSLT header.

  • To merge the output into the incoming BOD, select the element of the BOD that must contain the output of the web service.

    For example, if the input is a MyCustomer BOD. You select the MyCustomer/OrderData element. Then the output of the web service is attached as the last child of the OrderData element.

  • The transformation from the merged BOD document to the ultimate BOD document. This step is optional. If the merged BOD meets the definition in the registry then no transformation is required. This is the case for example if;.
    • You use a custom BOD and you extend the custom BOD in the registry with the elements from the web service.
    • You use the UserArea of a standard BOD.

If a transformation is required, you must specify an XSLT for this.