Generating metadata for BOD document
If you use the automatic transformation, you can generate the metadata for the BOD document to be sent:
- To use splitting, first select the Split check box and select the split element because this impacts the metadata to be generated.
- Click Generate Metadata.
- Specify a name for the custom document, such as 'MySalesOrder'. It is advised to 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.
When generating the metadata, the generation is done for multiple verbs (Sync, Process, Acknowledge, Get, Show, Load and Update). This is to avoid regenerating the metadata if you want to use another verb later. Not all verbs can be used in the web service connector.
If the document name you selected already exists as a custom document, you are informed and 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, you can select that document using the '…' button. Do not clickGenerate Metadata.
After completing the configuration in the connection point, you can test it.
-
Click Test.
The web service is invoked, the output is transformed and the resulting BODs are displayed. The web service connection point can be used in a document flow.
-
Select the connection point in the web service activity and
select the document (or documents) to publish based on data from the web
service.
After completing the flow (for example by adding a mapping activity if required and an activity that receives the document), you can activate it.
This diagram shows the active document flow:
The web service is invoked based on the specified schedule. If required, the result is split into multiple items. Then the result is transformed to a BOD document (or multiple BOD documents, if splitting was done).
If ION cannot connect to the service then it automatically retries. If the web service returns a fault or another exception occurs then an error is logged.
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 complete SOAP envelope XML as input and has the BOD DataArea XML as output. When using the advanced transformation in combination with splitting, the XSLT (and its children) has the split element as input.
In this case (without splitting) use this XSLT:<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:se=http://schemas.xmlsoap.org/soap/envelope/ exclude-result-prefixes="se"> <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <!-- change indent to "no" after testing --> <xsl:template match="se:Envelope"> <DataArea> <Sync> <AccountingEntity/> <Location> <xsl:value-of select="se:Header/Environment"/> </Location> </Sync> <MyCustomer> <Header> <DocumentID> <ID><xsl:value-of select="se:Body/MyOperationName/Customer/ID"/></ID> </DocumentID> <Contact> <Name><xsl:value-of select="se:Body/MyOperationName/Customer/Name"/></Name> </Contact> </Header> </MyCustomer> </DataArea> </xsl:template> </xsl:stylesheet>
If no elements in the verb part are set it can be left out in the XSLT. The verb part is automatically added if it is missing. In the verb part, the tenant is set. If a verb part containing a TenantID element is created by the XSLT, the value is overwritten. Additionally, the main node of the BOD (SyncMyCustomer) and the ApplicationArea is added including its contents.
Example of an automatic transformation including splitting, if the Customer element is used:
In this case two BODs are published:
When using an advanced transformation in combination with splitting, note that only the split element and its children are available for use in the XSLT. An example of an XSLT on the split element:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:se=http://schemas.xmlsoap.org/soap/envelope/ exclude-result-prefixes="se" > <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/> <!-- change indent to "no" after testing --> <xsl:template match="Customer"> <DataArea> <MyCustomer> <Header> <DocumentID> <ID><xsl:value-of select="ID"/></ID> </DocumentID> <Contact> <Name><xsl:value-of select="Name"/></Name> </Contact> </Header> </MyCustomer> </DataArea> </xsl:template> </xsl:stylesheet>
Based on this advanced transformation these BODs are published: