Usecases and Tutorials
This help includes information on the integrations that are possible between IBM webMethods B2B and other products.
This help includes information on the integrations that are possible between IBM webMethods B2B and other products.
The following use cases address the runtime aspects of using various combinations of AS2 channel configurations for partners to exchange documents with each other.
These use cases assume that IBM webMethods B2B sends a functional acknowledgment when one partner receives a document from another.
IBM webMethods B2B automatically detects the exchange documents between partners and generates the functional acknowledgment for each of the inbound documents of partners while processing them. After the functional acknowledgment is generated, IBM webMethods B2B sends it to the intended partner using the AS2 out channel. The use cases utilize plain content. Plain EDI content means document content that is not signed, encrypted, or verified.
Ensure to complete the prerequisites mentioned below before you allow partners to exchange EDI documents.
To start exchanging EDI documents with an AS2 inbound channel
When a partner(TrinityMetalCorp) sends plain EDI content by using an AS2 inbound channel to another partner (Bridgestone), IBM webMethods B2B recognizes the document, identifies, and splits the EDI document into Envelope, Group, and Transaction.
IBM webMethods B2B also ensures that it sends the corresponding Functional Acknowledgment to the partner(TrinityMetalCorp) using the partner’s preferred outbound channel.
If you have configured a specific processing rule to process specific types of EDI content, IBM webMethods B2B applies that processing rule and completes the processing of the document.
When a partner (TrinityMetalCorp) sends EDI content by using an AS2 inbound channel requesting for a SYNC MDN from another partner (Bridgestone), the document passes through IBM webMethods B2B. IBM webMethods B2B recognizes the document, identifies, and splits the EDI document into Envelope, Group, and Transaction.
IBM webMethods B2B also ensures that it sends the corresponding EDIINT SYNC MDN and Functional Acknowledgment to the partner using the partner’s preferred outbound channel.
If you have configured a specific processing rule to process specific types of EDI content, IBM webMethods B2B applies that processing rule. It routes the document from the sender to the receiver and during this process, IBM webMethods B2B creates an SYNC MDN and sends it to the receiver.
When a partner (TrinityMetalCorp) sends the EDI content by using an AS2 inbound channel requesting for an Asynchronous MDN, another partner (Bridgestone), the document passes through IBM webMethods B2B. IBM webMethods B2B recognizes the document, identifies, and splits the EDI document into Envelope, Group, and Transaction.
IBM webMethods B2B also ensures that it sends the corresponding EDIINT ASYNC MDN by using the Asynchronous MDN URL that is set in AS2 outbound channel of the partner. Functional Acknowledgment is also sent to the partner using the partner’s preferred outbound channel.
If you have configured a specific processing rule to process specific types of EDI content, IBM webMethods B2B applies that processing rule. It routes the document from the sender to the receiver and during this process, IBM webMethods B2B creates an ASYNC MDN and sends it to the receiver.
You can create an integration in IBM webMethods Integration Flow Editor by using the ChangeUserStatusOfB2BTransactions recipe, and change the user status in a B2B transaction.
The ChangeUserStatusOfB2BTransactions recipe uses the predefined operations defined in the IBM webMethods B2B application to help you create a business integration. This business integration resides on IBM webMethods Integration and you can invoke it by using the processing rule action from the IBM webMethods B2B product instance. The integration input pipeline for this recipe is pre-loaded with the input signature needed to interpret a transaction request payload coming from a IBM webMethods B2B product instance, and the output pipeline is constructed with the signature that the IBM webMethods B2B product instance understands.
The use case starts when an inbound document arrives in IBM webMethods B2B and the corresponding integration is invoked through a processing rule. The use case ends when you see the changed user status for that transaction in the Transactions page of IBM webMethods B2B product instance. In case an integration fails to execute successfully, the integration returns an appropriate error to the IBM webMethods B2B product instance.
The following diagram depicts the work flow of the recipe:
The following sequence diagram depicts the flow of control from IBM webMethods B2B to IBM webMethods Integration and back:
Ensure that the rest endpoint URL is exposed over HTTP. It must be valid when the processing rule calls the integration from a IBM webMethods B2B product instance.
If you want to track the status of the integration execution as a task, use the Reliable execution mode while calling an integration. When you use this mode, IBM webMethods B2B creates a task to track the status of the integration execution. You can monitor the task status on the Tasks page for a transaction.
You must create an account for the IBM webMethods B2B application on IBM webMethods Integration so you can connect to the IBM webMethods B2B product instance.
Step 1: Change the userStatus of the Transaction
Modify the existing user status as follows:
Step 2: Construct a success message on updating the userStatus of the transaction
If the update succeeds, add a new responseMessage variable in the Pipeline Output. Type an appropriate success message and click Apply.
Step 3: Route the success message to the transaction on IBM webMethods B2B product instance
In the generateResponse operation, double-click the readContentAs field and set how you want the input content to be interpreted. Valid values are string and bytes.
Step 4: Error handling: userStatus update failure scenario
If the userStatus update fails (or fails to mark Integration Execution as failed in IBM webMethods B2B product instance), modify the existing message in the responseMessage field to an appropriate failure message in the Pipeline Output.
Step 5: Route the failed update of the userStatus to the IBM webMethods B2B product instance
The generateResponse operation routes the responseMessage
to the IBM webMethods B2B product instance. On IBM webMethods B2B, go to Monitoring > Transactions and click to see the newly set user status in the IBM webMethods Integration orchestration for the corresponding transactions.
Step 6: Error handling: Integration execution failure scenario
In case the execution of the integration fails, set the HTTP status code to 500.
The HTTP error status code is sent back to the integration call made by the processing rule from a IBM webMethods B2B product instance.
The error scenarios are as follows:
userStatus
you set must not be more than 255 characters in length.responseMessage
you set has a character length limit of 512. If you type a longer string, the string is truncated until the length limit when it is saved and therefore, only the truncated string is visible on the Course of transaction of the corresponding transaction on the Transactions page on the IBM webMethods B2B product instance.For the successful completion of the use case, ensure that all the B2B assets you create on the IBM webMethods Integration and IBM webMethods B2B product instances are in enabled state.
You can create an integration in IBM webMethods Integration Flow services by using the receiveEDI850Send855B2BTransactions recipe. The recipe receives an EDI purchase order (X12 4010 850) document from a trading partner from IBM webMethods B2B, and sends an EDI purchase order acknowledgment (X12 4010 855) back to the trading partner through IBM webMethods B2B.
The receiveEDI850Send855B2BTransactions recipe uses the predefined operations defined in the IBM webMethods B2B and Electronic Data Interchange applications on IBM webMethods Integration Flow services to help you create a business integration. The integration input pipeline for this recipe is pre-loaded with the input signature required to interpret a transaction payload coming from a IBM webMethods B2B product instance and the output pipeline is constructed with the signature that the IBM webMethods B2B product instance understands.
In this use case, an FTP back-end system generates the purchase order and a custom purchase order XML is used to depict the mapping in the input and output pipelines.
The use case starts when an inbound purchase order (X12 4010 850) document arrives in IBM webMethods B2B from a trading partner and the corresponding integration is invoked through a processing rule. The use case ends when the trading partner receives the EDI purchase order acknowledgment (X12 4010 855) document for the purchase order it sent initially.
You can view the purchase order receipt and purchase order acknowledgment transactions in the Transactions page of IBM webMethods B2B.
Set up the appropriate inbound and outbound AS2 channels to send and receive documents from trading partners in IBM webMethods B2B. And remember to share the inbound AS2 endpoint URL with your trading partners so they can send documents to IBM webMethods B2B.
For more information, see the IBM webMethods B2B Help.
Ensure that the rest endpoint URL is a valid IBM webMethods Flow services orchestration URL when the processing rule calls the integration from a IBM webMethods B2B product instance.
If you want to track the status of the integration execution as a task, use the Reliable execution mode while calling an integration. When you use this mode, IBM webMethods B2B creates a task to track the status of the integration execution. You can monitor the task status on the Tasks page for a transaction.
Type a name for your integration along with a description, and click Finish.
The following image shows the recipe flow:
Step 1: Parse the content received from IBM webMethods B2B product instance and generate the required output
In the IBM webMethods B2B application, click and select the appropriate account details for the parseContent predefined operation.
Ensure that the content field of the Pipeline Input is mapped with the inputContent of the parseContentInput.
Step 2: Extract the interchange control and group headers from the 850 EDI message
Click and select Map Input and Output of the processEnvelope operation. Ensure that the outputContent is mapped to the ediMessage.
Step 3: Convert the X12 4010 850 EDI message to the native document type on IBM webMethods Integration
In the Pipeline Input, ediMessage is automatically mapped to the ediMessage of the convertEDIMessageToDocument Input.
Step 4: Transform the pipeline to map X12 4010 850 Purchase Order to a compatible format
In the following example, the X12 4010 850 purchase order is mapped with a purchase order in XML format.
Step 5: Convert the X12 4010 850 Purchase Order XML to XML stream
The X12 4010 850 Purchase Order XML in the Pipeline Input is mapped to the documentToXMLStream Input.
Step 6: Send the XML stream to the back-end system
In this example, the orchestration uses an FTP server as the back-end system.
In the Pipeline Input, map the xmlStream to the contentStream of the putFile Input.
Step 7: Transform the pipeline by mapping the XML stream
In the Pipeline Input, map the appropriate custom document fields to the sender and receiver fields in the Pipeline Output.
Step 8: Simulate the generation of the Purchase Order Acknowledgment and convert it to an XML stream
Generate the purchase order acknowledgment in your back-end system and convert it to an XML stream.
Step 9: Write custom logic to send the generated Purchase Order XML to the FTP server (back-end system)
In this example, inputStream of the Pipeline Input is mapped to the outputStream of the putFile Input of the FTP server.
Step 10: Retrieve the Purchase Order Acknowledgment XML from the FTP Server (back-end system)
In this example, remoteFile of the Pipeline Input is mapped to the remoteFile of the getFile Input.
Step 11: Convert the X12 4010 855 Purchase Order Acknowledgment from XML stream to string
Convert the purchase order acknowledgment in your back-end system from a stream to a string.
Step 12: Transform the pipeline by adding a variable
Add itemsAck
variable to the Pipeline Output.
The xmlStringToDocument service specifies the need to add this variable to the pipeline output.
Step 13: Convert the Purchase Order Acknowledgment string to a native Purchase Order Acknowledgment on IBM webMethods Integration
Map the appropriate fields from the Pipeline Input to the xmlStringToDocument Input .
Step 14: Map the Purchase Order Acknowledgment to a native EDI X12 4010 855 document on IBM webMethods Integration
Map the appropriate fields from the Pipeline Input to the convertDocumentToEDIMessage Input.
Step 15: Add a group envelope to the generated EDI X12 4010 855 message
Map the appropriate fields from the Pipeline Input to theaddGroupEnvelope Input .
Step 16: Add an interchange control envelope
Map the appropriate fields from the Pipeline Input to theaddInterchangeEnvelope Input .
Step 17: Send the EDI X12 4010 855 Purchase Order Acknowledgment response to IBM webMethods B2B
Map the appropriate fields from the Pipeline Input to the sendtoB2B Input. The submit operation sends the document back to the IBM webMethods B2B instance in a signature that it can interpret.
Step 18: Clear the pipeline data
Select the variables in the Pipeline Input, click > and click Finish.
Step 19: Return an appropriate error message if the integration execution fails
If the integration execution fails, return an appropriate message to the processing rule integration call you made initially. The message is either displayed on the Course of transaction, or is tracked as a task for a transaction if you have used the reliable execution mode.
For the successful completion of the use case, ensure the following:
When a partner (sender) wants to send a PIP 2A9 request with an attachment and send it to another partner over an RNIF-OUT channel. And the receiver, in turn sends a PIP 2A9 response with attachment synchronously over the same connection. IBM webMethods B2B validates the payload before it sends it and after it receives it as well.
Consider two partners, car-steering supplier(enterprise-sender) and car-seat supplier(receiver).
The following image illustrates the exchange:
You need the following design-time assets at sender’s side:
You need the following design-time assets at receiver’s side:
A PIP2A9Request document is submitted to IBM webMethods B2B (Enterprise car_steering_supplier) from IBM webMethods Integration.
The enterprise sender car_steering_supplier sends this document over an RNIF Outbound channel using RNIF-partner-specific TPA(Payload validation = Outbound set in TPA) using a custom processing rule: Devlier2A9WithAttachmentToCar_seat_supplier.
The payload is validated by IBM webMethods B2B before it is sent.
The RNIF PIP2A9Request was sent to car_seat_supplier.
The receiver car_seat_supplier receives a PIP2A9 request with attachments from car_steering_supplier over synchronous RNIF IN channel as shown in the following images:
The RNIF document is received as shown in the following image:
The incoming payload is validated by IBM webMethods B2B as follows:
The Transaction summary displays the RNIF PIP2A9Response document details that are sent by car_seat_supplier.
The content of the document is as follows:
The content is received with the attachments highlighted in the following image:
Generated PIP2A9Response with attachments is received by Enterprise car_steering_supplier from partner car_seat_supplier.
The attachments are highlighted as follows:
With this, the sender’s payload is validated by IBM webMethods B2B before it is sent and validated at the receiver’s when it is received.
IBM webMethods B2B identifies inbound Flat Files based on the key-value pairs you define. You can define these as custom properties in the Advanced configurations of the inbound channel and subsequently add them as either identifiers or attributes in the corresponding Flat Files you create.
In this use case, an incoming sample.txt Flat File payload is processed through both the HTTP-IN channel.
IBM webMethods B2B instance with administrator privileges.
You need the following design-time assets:
In the Advanced tab of the HTTP-IN channel, under Custom properties, add the key-value pairs with which you want IBM webMethods B2B to recognize the inbound payload.
For example, key1, key2, key3, key4, and key5 are added as custom properties.
Add a Flat File document and add the appropriate key-value pairs as identifiers.
For example, key1, key2, and key3 are added as identifiers.
Add a Flat File document and add the appropriate key-value pairs as attributes you want to extract so that you can perform further transformations.
For example, key4 and key5 are added as attributes.
Receive sample.txt through the HTTP-IN channel.
The payload in sample.txt is recognized based on the custom properties you defined.
Define a processing rule based on which you want the Flat File to be routed and transformed further.
In the Advanced tab of the SFTP-IN channel, under Custom properties, add the key-value pairs with which you want IBM webMethods B2B to recognize the inbound payload.
For example, key1, key2, key3, key4, key5 are added as custom properties.
Add a Flat File document and add the appropriate key-value pairs as identifiers.
For example, key1, key2, and key3 are added as identifiers.
Add a Flat File document and add the appropriate key-value pairs as attributes you want to extract so that you can perform further transformations.
For example, key4 and key5 are added as attributes.
Receive sample.txt through the SFTP-IN channel.
Define a processing rule based on which you want the Flat File to be routed and transformed further.
You currently cannot do the following with Flat Files:
IBM webMethods B2B facilitates the exchange of PIP messages over RNIF 2.0 channel. Exchanging a document in a two-way PIP process with RNIF 2.0 involves receiving and sending action messages and acknowledgments from both the partners.
When a partner (sender) sends a PIP 3A4 Purchase Order request to another partner (receiver) over an RNIF OUT channel using transport version 2.0, the receiver in turn sends receipt acknowledgment to the sender.
The receiver generates 3A4 Purchase Order confirmation and sends it back to the sender as a response using an RNIF OUT channel and the sender sends the receipt acknowledgment to the receiver.
Consider two partners, wood supplier (enterprise-sender) and paper supplier (receiver).
The following image illustrates the two-way PIP document exchange:
You need the following design-time assets at the sender’s side:
You need the following design-time assets at the receiver’s side:
The enterprise sender, wood supplier, sends this document over an RNIF Outbound channel using a custom processing rule Devlier3A4ToPaperSupplier..
The RNIF PIP 3A4 PO request (PIP_3A4_v02_00_Request) is sent to paper supplier.
Wood supplier receives receipt acknowledgment from paper supplier.
The receiver paper supplier receives a PIP 3A4 PO request (PIP_3A4_v02_00_Request) from wood supplier over asynchronous RNIF IN channel and generates and sends A_PIP_3A4_PO_Confirmation using a custom processing rule Generate3A4POConfirmationToWoodSupplier and Send3A4POConfirmationToWoodSupplier.
Paper supplier receives the receipt acknowledgment from wood supplier.
The RNIF payload is exchanged using two-way PIP document exchange.
IBM webMethods B2B facilitates exchanging the cXML documents over the cXML channel. Exchanging the documents involves receiving, processing, and sending the response to the sender using the cXML out channel. The process starts when the sender sends the document from their system. Upon receipt of the document, IBM webMethods B2B processes the document according to the predetermined processing rule configured by the receiver, subsequently sending the response to the sender.
For Sender
For Receiver
In this use case, ABC Corporation, a manufacturer of industrial equipment wants to exchange cXML documents with XYZ Distributors, a distributor of industrial supplies. On receiving the purchase order, XYZ Distributors calls for an integration to change the user status and invokes the synchronous flow service.
Initiation of Purchase Order: ABC Corporation’s procurement system generates a purchase order for the required components in cXML format.
Transmission of cXML Document: ABC Corporation sends the cXML document containing the purchase order details over the cXML channel to XYZ Distributors.
Receipt and Processing by XYZ Distributors:
For the successful completion of the use case, ensure that all the B2B assets you create on the IBM webMethods Integration and IBM webMethods B2B product instances are in enabled state.