Generating metadata for incoming BOD
If you use the automatic transformation, you can generate the metadata for the incoming BOD document:
- Click Generate Metadata.
- Specify a name for the custom document, such as 'MySalesOrder'. We recommend that you use the prefix 'My' to avoid name clashes with existing or future standard BODs.
- Select the element that is used as the identifier for the document.
-
Click OK to generate the metadata.
After generating the metadata, it can be used elsewhere in ION. For example for content-based routing, filtering, event management or workflow activation policies.
Metadata generation is not only run for the specified verb, but for multiple verbs. These verbs are used:
- Sync
- Process
- Acknowledge
- Get
- Show
- Load
- Update
These multiple verbs are to avoid regenerating metadata, when using another verb later. Not all verbs can be used in the web service connector.
If the specified document name already exists as a custom document, you are informed about this. You can cancel the action. If you continue, the existing custom document metadata is overwritten. If the document you selected already exists as standard document, the generation fails.
If you already have a document that matches the (automatic or user-defined) transformation, select that document using the … button. Do not click Generate Metadata in that case.
After completing the configuration in the connection point, you can run a test.
-
Click Test
A window is displayed.
- Specify or paste an example BOD.
-
Click
OK.
The specified transformation is run and the web service operation is started. In case of exceptions, you are informed. If the action was successful, check the system that provides the web service, to verify whether the data is as expected.
The web service connection point can be used in a document flow. Select the connection point in the web service activity. Select the incoming document (or documents) to be sent to the web service. After completing the flow, you can activate it. For example by adding an activity that publishes the document and a mapping activity if required.
This diagram shows the active document flow:
The incoming BOD document is transformed to the input as required for the web service operation. The web service is started using this input. If the process is successful, the process ends here. The web service output is ignored.
If the connection to the server cannot be made a retry is automatically done. A Confirm BOD is generated for the incoming document, when:
- The server is available, and web service is unavailable.
- The web service returns a fault or another exception occurs.
To check this, select Connect > Error BODs.
An example of an automatic transformation for an RPC-style web service:An example of an automatic transformation for a document-style web service
Example of an advanced (user-defined) transformation
Note that the XSLT has the BOD DataArea XML as input and has the complete SOAP envelope XML as output.
The current version of ION does not provide mapping tools to create an XSLT. Use the tool of your choice, using the XSD from the WSDL on one hand. And the BOD XSD from the ION Registry on the other hand.
In this case use this XSLT:<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <!-- change indent to "no" after testing --> <xsl:template match="DataArea"> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Header> <Environment><xsl:value-of select="Sync/TenantID"/></Environment> <Region>Default</Region> </S:Header> <S:Body <MyOperationName> <Customer> <ID><xsl:value-of select="MyCustomer/Header/DocumentID/ID"/></ID> <Name><xsl:value-of select="MyCustomer/Header/Contact/Name"/></Name> </Customer> </MyOperationName> </S:Body> </S:Envelope> </xsl:template> </xsl:stylesheet>