Checking for duplicate documents in webMethods Integration

Create a FlowService in webMethods Integration to check a customized duplicate.

A signature is an agreement between webMethods B2B and webMethods Integration. After you call an integration on webMethods Integration, webMethods B2B receives the results of service execution and identifies if the document is duplicate or not. The result appears as an entry in the Course of transaction section of the corresponding transaction.

The FlowService that you create must have the following service signature:

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.
request Document.

A request message is a composite object that contains the fields.

  content String.

Content of the document that is encoded in Base64.

  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.

  • 0 - If the business document type does not recognize the content, it is tagged as Unknown.
  • 1 - If the content is identified as XML-family type.
  • 2 - If the content is identified as Flat File-family type.
  • 3 - If the content is identified as EDI-family type.
  • 4 - If the content does not belong to any of the listed types.
  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

Field Sub-field Description
response Document.

A response message is an object that contains the field.

  duplicate String.

If the document is duplicate, then set true, else false.

Depending on the response received from webMethods Integration after the service is processed, webMethods B2B identifies whether the document is duplicate.

Example of Duplicate Check FlowService 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": {
  "content": "<encoded content>",
  "type": "1",
  "encoding": "UTF8",
  "contentPartNames": [
     "xmldata"
  ]
    }
}
Note: For an EDI payload, the conversationID and GroupID are populated with values.

Example of FlowService Response Payload

Example of the Flow Service response to signal successful execution.

{
"response": {
   "duplicate": "true",
  }
}