webMethods.io B2B processing message using RNIF 2.0

Introduction

This article explains about processing the transaction using the RNIF protocol

Audience

It is assumed that readers of this article know how to setup B2B enterprise profile and partner on webMethods.io B2B platform.

Prerequisites

  • Set up B2B enterprise profile, partner profile, Business Document

Note: Refer to the below link to understand the basics of webMethods.io B2B
Link: webMethods.io B2B Essentials Devbytes

Topics Covered

  • Introduction to RNIF 2.0
  • Working with RNIF protocol
  • End to End working flow

What is RNIF?

  • The RosettaNet Implementation Framework (RNIF) defines implementation guidelines for creating software applications that provide for the reliable transport of partner interface processes (PIPs) in XML-format business documents between trading partners.
  • Guidelines are provided for transport, routing, packaging, security, signals, and trading partner agreement

Structure of RosettaNet Message

  • The preamble header, delivery header, service header, and service content are XML structures defined by RosettaNet standards.
  • The preamble header identifies the message as a RosettaNet message.
  • The delivery header identifies the sender and receiver partner and provides the message identifier.
  • The service header identifies the process- and transaction-layer information.
  • RNIF 2.0 supports attachment management by allowing attachments to be encoded as separate MIME parts in the MIME multipart/related entity.
  • Attachments are optional and appear only in RosettaNet action messages.

image

What is PIP (Partner Interface Process)?

  • The exchange of business data between trading partners is the fundamental purpose of PIPs.
  • PIPs are specialized, XML-based dialogs that define the structure, sequence of steps, role (buyer and seller) activities, data elements, values, and value types for each business document message exchanged between trading partners

Types of Messages in PIP

There are two broad categories of messages involved in the exchange of PIP business documents. These are business action messages and business signal messages:

  • Business actions are messages with a business-related content, such as a purchase order or request for quote. DTDs, schemas and message guidelines for their corresponding PIPs define these messages.
  • Business signals are positive or negative acknowledgments sent in response to a business action. Signal messages, which are part of RNIF, are never acknowledged.

Usecase

  • In our use case Buyer is “Amazon” and the seller is “DHL”
  • In this use case we will deal with Purchase order request (RNIF PO) and its acknowledgment and response
  • In the below diagram it can be seen buyer sends the Purchase order request to the Seller.
  • Seller sends the acknowledgment back to buyer and post that response to purchase order is sent to the buyer.
  • When Buyer receives the response (Purchase order confirmation), an acknowledgment is sent from Buyer to Seller

Requirement on webMethods.io B2B

  • In our use case we have 2 tenants.
  • In one tenant Amazon is acting as Buyer and DHL is acting as Seller
  • In another tenant its vice versa.
  • In this use case we will cover both outbound and inbound transactions.

Assets developed for outbound transaction

  • Create an Enterprise Profile name as “Amazon Enterprise profile”.
  • Add the Identities as DUNS.

  • Create 2 RNIF channel

Outbound channel: “Amazon_To_DHL_RNIF_Outchannel” for sending the request.

Inbound channel: “Rcv_RNIF3A4_Response_InChannel” for receiving the RNIF response and acknowledgment from the partner.

Note: We have enabled the “send receipt acknowledgment” to get the auto acknowledgement.

  • Create Partner Profile name it as “DHL Partner”.

  • Add the Identities as DUNS.
    image

  • Create 2 business document

  • 3A4 Purchase Order Request

    • Import the RNIF3A4PO sample xml or schema
    • Add the custom attributes to document for receiver using the XPath.
    • In our case xpath :
      /Pip3A4PurchaseOrderRequest[0]/toRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]

image

  • Similarly repeat the steps for Sender XPath

  • In our case xpath: /Pip3A4PurchaseOrderRequest[0]/fromRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]

  • 3A4 Purchase Order Confirmation\Response

    • Import the RNIF3A4 response confirmation sample xml or schema
    • Repeat the above steps to set up the receiver id and Sender ID using xpath

Sender ID Xpath: /Pip3A4PurchaseOrderConfirmation[0]/fromRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]

Receiver ID Xpath:
/Pip3A4PurchaseOrderConfirmation[0]/toRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]

Create Processing rule “Amazon_To_DHL_3A4_PO_RNIFRule” with below details

Sender: Amazon Enterprise profile

Receiver: DHL partner profile

Document: RNIF3A4PO

Action: send the message to outbound preferred channel

Create FlowService in webMethods.io Integration

  • To submit the outbound transaction we need to create the flowService inside webMethods.io integration.
  • Create the flow service and name it as “submit3A4RNIF”.
  • In this flow service we need have to set the PIP details and then submit the request to B2B using submit B2B operation.

Assets developed for inbound transaction

  • Create an Enterprise Profile name it as “DHL Enterprise profile”.
  • Add the Identities as DUNS.

  • Create 2 RNIF channel

Outbound channel: “RNIF_3A4_ResponseChannel_out” for sending the response.

Inbound channel: “Amazon_To_DHL__3A4_PO_RNIFIN” for receiving the RNIF request and acknowledgment from the partner.

Note: We have enabled the “send receipt acknowledgment” to get the auto acknowledgement.

  • Create Partner Profile name it as “Amazon Partner”.
  • Add the Identities as DUNS.

  • Create 2 business document

  • 3A4 Purchase Order Request

    • Import the RNIF3A4PO sample xml or schema
    • Add the custom attributes to document for receiver using the XPath.
    • In our case xpath :
      /Pip3A4PurchaseOrderRequest[0]/toRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]

image

  • Similarly repeat the steps for Sender xpath
    • In our case xpath: /Pip3A4PurchaseOrderRequest[0]/fromRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]
  • 3A4 Purchase Order Confirmation\Response
    • Import the RNIF3A4 confirmation sample xml or schema
    • Repeat the above steps to set up the receiver id and Sender ID using xpath.
      Receiver Xpath:
      /Pip3A4PurchaseOrderConfirmation[0]/toRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]

Sender Xpath:
/Pip3A4PurchaseOrderConfirmation[0]/fromRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]

image
image

  • Create 2 Processing rule for
  • receiving the request for 3A4 PO Order
    • “AmazonPartner_To_DHL_3A4_RNIFRule” with below details

Sender: Amazon Partner profile

Receiver: DHL Enterprise profile

Document: RNIF3A4PO

Action: send the message to webMethods.io integration flow service

  • Sending the response for 3A4 PO Order confirmation
    • Rule Name: DHL_To_Amazon_3A4_Response_Rule
    • Sender: DHL Enterprise profile
    • Receiver: Amazon Partner profile
    • Document: RNIF3A4PO Response
    • Action: send the message to preferred outbound channel

Create FlowService in webMethods.io Integration

  • To submit the response 3A4 order confirmation transaction we need to create the flowService inside webMethods.io integration.
  • Create the flow service and name it as “SendRNIF34AResponseConfirmation”.
  • In this flow service we need receive the request from B2B and send the confirmation response.

End to End Testing

  • Submit the request from source tenant

Monitoring in B2B

Source Tenant

Generated RosettaNet Object in webMethods.io B2B:

Preamble Header

------=_Part_165_628802029.1658905850682
Date: Wed, 27 Jul 2022 07:10:50 +0000 (UTC)
MIME-Version: 1.0
Content-Type: multipart/related;
boundary="----=_Part_164_122116326.1658905850670";
type="application/xml"
Content-ID: <BRIJBTMOLNZCPUCKCIJI-1658905850669-QAUFOZCXSG>
Content-Description: **This is the RosettaNet Business Message**
------=_Part_164_122116326.1658905850670
Date: Wed, 27 Jul 2022 07:10:50 +0000 (UTC)
Content-Type: Application/XML
Content-Transfer-Encoding: quoted-printable
Content-Location: RN-Preamble
Content-ID: [PreambleHeader.0.7868256363823055.1658905850669@sag-b2b-v1011-59bcc6c7b4-tfxvp](mailto:PreambleHeader.0.7868256363823055.1658905850669@sag-b2b-v1011-59bcc6c7b4-tfxvp)
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE Preamble SYSTEM "Preamble_MS_V02_00.dtd">
<Preamble>
<standardName>
<GlobalAdministeringAuthorityCode>RosettaNet</GlobalAdministeringAuthorityCode>
</standardName>
<standardVersion>
<VersionIdentifier>V02.00</VersionIdentifier>
</standardVersion>

</Preamble>
------=_Part_164_122116326.1658905850670
Date: Wed, 27 Jul 2022 07:10:50 +0000 (UTC)
Content-Type: Application/XML
Content-Transfer-Encoding: quoted-printable
Content-Location: RN-Delivery-Header

Content-ID: [DeliveryHeader.0.7868256363823055.1658905850669@sag-b2b-v1011-59bcc6c7b4-tfxvp](mailto:DeliveryHeader.0.7868256363823055.1658905850669@sag-b2b-v1011-59bcc6c7b4-tfxvp)

Delivery Header

<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE DeliveryHeader SYSTEM "DeliveryHeader_MS_V02_00.dtd">
<DeliveryHeader>
<isSecureTransportRequired>
<AffirmationIndicator>No</AffirmationIndicator>
</isSecureTransportRequired>
<messageDateTime>
<DateTimeStamp>20220727T071050.669Z</DateTimeStamp>
</messageDateTime>
<messageReceiverIdentification>
<PartnerIdentification>
<domain>
<FreeFormText>DUNS</FreeFormText>
</domain>
<GlobalBusinessIdentifier>987659999</GlobalBusinessIdentifier>
</PartnerIdentification>
</messageReceiverIdentification>
<messageSenderIdentification>
<PartnerIdentification>
<domain>
<FreeFormText>DUNS</FreeFormText>
</domain>
<GlobalBusinessIdentifier>123451111</GlobalBusinessIdentifier>
</PartnerIdentification>
</messageSenderIdentification>
<messageTrackingID>
<InstanceIdentifier>c0a8df980000e7e7000000931658905850673</InstanceIdentifier>
</messageTrackingID>
</DeliveryHeader>

Service Header

------=_Part_164_122116326.1658905850670
Date: Wed, 27 Jul 2022 07:10:50 +0000 (UTC)
Content-Type: Application/XML
Content-Transfer-Encoding: quoted-printable
Content-Location: RN-Service-Header
Content-ID: <ServiceHeader.0.7870943816989204.1658905850670@sag-b2b-v1011-59bcc6c7b4-tfxvp>
Content-Description: RosettaNet-Service-Header
<?xml version=3D"1.0" encoding=3D"UTF-8"?>
<!DOCTYPE ServiceHeader SYSTEM "ServiceHeader_MS_V02_00.dtd">
<ServiceHeader>
<ProcessControl>
<ActivityControl>
<BusinessActivityIdentifier>Create Purchase Order</BusinessActivityIdentifier>
<MessageControl>
<fromRole>
<GlobalPartnerRoleClassificationCode>Buyer</GlobalPartnerRoleClassificationCode>
</fromRole>
<fromService>
<GlobalBusinessServiceCode>Buyer Service</GlobalBusinessServiceCode>
</fromService>
<Manifest>
<numberOfAttachments>
<CountableAmount>0</CountableAmount>
</numberOfAttachments>
<ServiceContentControl>
<ActionIdentity>
<GlobalBusinessActionCode>Purchase Order Request Action</GlobalBusinessActionCode>
</ActionIdentity>
</ServiceContentControl>
</Manifest>
<toRole>
<GlobalPartnerRoleClassificationCode>Seller</GlobalPartnerRoleClassificationCode>
</toRole>
<toService>
<GlobalBusinessServiceCode>Seller Service</GlobalBusinessServiceCode>
</toService>
</MessageControl>
</ActivityControl>
<GlobalUsageCode>Production</GlobalUsageCode>
<pipCode>
<GlobalProcessIndicatorCode>3A4</GlobalProcessIndicatorCode>
</pipCode>
<pipInstanceId>
<InstanceIdentifier>c0a8df980000e7e7000000921658905850669</InstanceIdentifier>
</pipInstanceId>
<pipVersion>
<VersionIdentifier>1.1</VersionIdentifier>
</pipVersion>
<KnownInitiatingPartner>
<PartnerIdentification>
<domain>
<FreeFormText>DUNS</FreeFormText>
</domain>
<GlobalBusinessIdentifier>123451111</GlobalBusinessIdentifier>
</PartnerIdentification>
</KnownInitiatingPartner>
</ProcessControl>
</ServiceHeader>

Service Content

------=_Part_164_122116326.1658905850670

Date: Wed, 27 Jul 2022 07:10:50 +0000 (UTC)
Content-Type: Application/XML
Content-Transfer-Encoding: quoted-printable
Content-Location: RN-Service-Content
Content-ID: <ServiceContent.0.7870943816989204.1658905850670@sag-b2b-v1011-59bcc6c7b4-tfxvp>
Content-Description: RosettaNet-Service-Content

< `actual payload `>

Target Tenant:

Note:

  1. Attached is the flow service for the source tenant and target tenant
  2. Attaching the payload

Details:

Submit3A4RNIF: flow service at source tenant. To submit the purchase order request
SendRNIF3A4ResponseConfirmation: flow service at target tenant. To send the PO confirmation response
3A4PayloadRequestSample : PO Sample request submitted from source flow service (Submit3A4RNIF)

Document Used:
3A4_MS_V02_00_PurchaseOrderRequest-Sample.dtd: Attached the document used for 3A4 purchase order.
PurchaseOrderConfirmation-Sample.dtd: Attached the document used for 3A4 purchase order. confirmation

Submit3A4RNIF.zip (9.8 KB)
SendRNIF34AResponseConfirmation.zip (11.2 KB)
(upload://x5Upyz5Y6n8vWwMoB7zslvbECu2.zip) (10.5 KB)
3A4PayloadRequestSample.xml (13.9 KB)
PurchaseOrderConfirmation-Sample.dtd (15.9 KB)
3A4_MS_V02_00_PurchaseOrderRequest-Sample.dtd (13.2 KB)

  • To import the flow service on webeMethods.io integration, refer below link section

Link: webMethods.io Integration: DevOps - Stage Management
section: 4.4 Import and Export Integrations (Asset level)

References

https://help.sap.com/docs/SAP_NETWEAVER_750/5cf7d2de571a45cc81f91261668b7361/c53d794293bf9c60e10000000a1550b0.html?version=7.5.22&locale=en-US

4 Likes