Triggering scenario

In the triggering scenario, an incoming document is used to trigger a web service operation, and the resulting data is published. For example, a BOD containing customer data is coming in. Based on this BOD you want to invoke a web service that returns the open orders for a customer. And you want to send these orders 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. An example document flow is shown in this diagram.

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 as input. The document is defined using a document type (such as MyCustomer). In this scenario, 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). A custom BOD can be generated in the ION Registry.

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

    • 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. But it is more complex to model.

      When using the Advanced transformation, click Details to specify the transformation. If no XSLT was specified before, a default XSLT is provided 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 to use in the version attribute of the XSLT header.

  • The BOD document to be used as output. Again, the document is defined using a document type. The verb is always Sync in this scenario.
  • Whether the output must be split into multiple BODs. Use this option if the web service returns multiple objects. For example, a GetOrders operation can retrieve multiple orders. In that case, for each order a BOD can be published.

    When using this option, you must select the (repeating) element

    For example, if the output of the web service is:

    	Orders
    		Order
    			OrderNumber
    			Customer Smith
    		Order
    			OrderNumber 2
    			Customer Jones

    Then you can select the Order element.

    When using splitting, all elements above the split element are not used. These elements are not available in the transformation.

  • The transformation from the web service output to the BOD document. Again, you can use the automatic transformation (enabling you to generate the BOD definition in the registry). Or use your own transformations (giving you advanced flexibility, but more complex to model).