Service Signature for Calling a Flow Service in IBM webMethods Integration
A signature is an agreement between IBM® webMethods B2B and IBM webMethods Integration. After you call an integration on IBM webMethods Integration, IBM webMethods B2B receives the results of the service execution. webMethods B2B displays the information in the form of tasks in Reliable execution mode and as an entry in the Course of transaction section of the corresponding transaction.
Input Request
Field | Sub-field | Description |
---|---|---|
metadata | Document. Metadata is a composite object that contains the fields. |
|
sender | String. Name of the recognized sender. |
|
receiver | String. Name of the recognized receiver. |
|
documentType | String. Name of the recognized business document. |
|
documentId | String. Internal ID extracted as a transaction attribute. | |
userStatus | String. Status that you or a partner assign to a document (for example, Needs Approval). |
|
groupId | String. Identifier that associates a transaction with other transactions in a group. |
|
conversationId | String. Identifier that associates a transaction with other transactions that a business processes. |
|
attributes | Document. Key-Value pairs of all extracted attributes of the transaction (key is attribute name, and value is attribute value). For example, cost, trackingId.Note: Attribute name is
case-sensitive.
$duplicate. String.Identifier of duplicate documents. The document is identified as
duplicate when the value is set as Note: You can prevent spurious execution of an integration by using the
$duplicate attribute in the attributes list available in all the requests that
webMethods B2B makes to webMethods Integration. Based on the value of the $duplicate attribute you
can choose to run the integration again or ignore it.
|
|
request | Document. A request message is a composite object that contains the fields. |
|
largeDoc | Boolean. The value for largeDoc is true and the content is null, for large documents. |
|
content | String. Content of the document that is encoded in Base64. The content is null for large document. |
|
contentPartNames | String List. The list of all the names of the content parts in the specified transaction. Note: This field can be used in getTransactionContentParts operation to
get the content parts of the associated contentPartNames.
|
|
type | String. Type of content sent. The following codes pertain to the file type of the inbound document:
|
|
encoding | String. The type of encoding used to encode the content in the request message. The content is encoded in the UTF-8 standard. You cannot alter this standard. |
Output Response
The output that is received from IBM webMethods Integration must adhere to the following output signature:
Field | Sub-field | Description |
---|---|---|
error | Document. Error is a composite object that contains the fields: | |
code | String. Error code received from IBM webMethods Integration. | |
message | String. Error message associated with the error code in IBM webMethods Integration. | |
response | Document. The response message is a composite object that contains the fields: | |
content | String. Content of the document that is encoded in Base64. | |
type | String. Type of content sent. | |
encoding | String. Type of encoding that was used to encode the content in the response
message. If the response does not contain the encoding method, IBM webMethods B2B considers the content to be using Base64 encoding in the UTF-8 standard. |
Depending on the response received from IBM webMethods Integration after the service is run, appropriate information is displayed in IBM webMethods B2B. Ensure that you use the setHTTPResponse flow function in IBM webMethods Integration to set the HTTP status code for IBM webMethods B2B to interpret the status of the transaction.
The response can be one of the following objects (error or response):
- response - HTTP status code range for success scenarios is 200-299.
- error - Use an appropriate HTTP status code to indicate how the error is interpreted in IBM webMethods B2B by using the setHTTPResponse flow function. For example, if you are accessing an unauthorized resource, use HTTP status code 401 for IBM webMethods B2B to interpret it as an unauthorized request.
Example of Request Payload
Example of the Flow Service request during the Call an Integration action in the processing rule, for an XML payload.
{
"metadata": {
"sender": "Acme Corporation",
"receiver": "IBM",
"documentType": "PurchaseOrderRequest",
"documentId": "53o5dn00ec9rmuok00000070",
"userStatus": "IGNORED",
"groupId": null,
"conversationID": null,
"attributes": {
"country": "UNITED STATES"
}
},
"request": {
"largeDoc": false,
"content": "<encoded content>",
"type": "1",
"encoding": "UTF8",
"contentPartNames": [
"xmldata"
]
}
}
conversationID
and GroupID
are
populated with values.Example of Response Payload
{
"response": {
"content": "<encoded content>",
"type": "text",
"encoding": "UTF-8"
}
}
Example of the Flow Service response to signal execution failure.
{
"error": {
"code": "USER_STATUS_FAILED",
"message": "Failed to update user status for transaction 53o5dn00ec9rmuok00000070"
}
}