webMethods.io B2B processing message using RNIF 2.0
Tags: b2b, rnif, tutorial
Published: 2022-09-16 11:31:26

---
title: webMethods.io B2B processing message using RNIF 2.0
published: true
date: 2022-07-28 09:39:46 UTC
tags: b2b, rnif, tutorial
canonical_url: https://tech.forums.softwareag.com/t/webmethods-io-b2b-processing-message-using-rnif-2-0/259584
---

## 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](http://webMethods.io) B2B platform.

## Pre-Requisites

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

> Note: Refer the below link to understand the basics of webMethods.io B2B  
Link: [webMethods.io B2B Essentials Devbytes](https://tech.forums.softwareag.com/t/webmethods-io-b2b-essentials-devbytes/244919)

## 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](https://aws1.discourse-cdn.com/techcommunity/original/3X/8/5/85f2c14fc09d4f1d9ffc9d31dee8757dff004f39.png)

### 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 seller is “DHL”  
• In this use case we will deal with Purchase order request (RNIF PO) and its acknowledgement and response  
• In the below diagram it can be seen buyer sends the Purchase order request to Seller.  
• Seller sends the acknowledgement back to buyer and post that response to purchase order is sent to buyer.  
• When Buyer receives the response (Purchase order confirmation), an acknowledgment is sent from Buyer to Seller
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/1/4/14e3f0d58fb7897e64865da4b1affaae0c2c514f_2_690x219.png)

#### 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 transaction.

#### Assets developed for outbound transaction

- Create an Enterprise Profile name it as “Amazon Enterprise profile”.
- Add the Identities as DUNS.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/9/a/9af81fb2447c2badf969b44924a6b4c672669579_2_690x236.png)

- Create 2 RNIF channel

**Outbound channel:** “Amazon\_To\_DHL\_RNIF\_Outchannel” for sending the request.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/0/b/0b5c1b58a0b91c3874327a67515e005bafaabad1_2_690x215.png)

**Inbound channel:** “Rcv\_RNIF3A4\_Response\_InChannel” for receiving the RNIF response and acknowledgment from the partner.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/b/c/bc2eb7bf1dd5ed07cacf0e5453c2af10906ad01f_2_690x226.png)

>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](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/f/2fbf16f7281c9c559d62dd8b5602af682277acaa.png)
- Create 2 business document  
- 3A4 Purchase Order Request

o Import the RNIF3A4PO sample xml or schema  
o Add the custom attributes to document for receiver using the xpath.  
o In our case xpath :  
/Pip3A4PurchaseOrderRequest[0]/toRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/e/a/ead71e3bff8457a4cb917f9698e383728521a245.png)

o Similarly repeat the steps for Sender xpath

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

- 3A4 Purchase Order Confirmation\Response

o Import the RNIF3A4 confirmation sample xml or schema  
o Repeat the above steps to set up the receiver id and Sender ID using xpath
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/e/2e7500a0fe6f02d63c56c359e56ceb079d532892.png)
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/3/33d41d0f84c6a4c559bb4a7e853ab4741a8612dc.png)

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

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/4/f/4f662d4b8073fcf32a80c8db2152213290c94d48_2_690x264.png)

#### Create FlowService in [webMethods.io](http://webMethods.io) Integration

• To submit the outbound transaction we need to create the flowService inside [webMethods.io](http://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.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/3/6/3630a261efafa8e454748a2da06b62aaa9049d08_2_690x240.png)
- Create 2 RNIF channel
**Outbound channel** : “RNIF\_3A4\_ResponseChannel\_out” for sending the response.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/d/c/dc67ad3505faadede053a4602e56cef8e4514472_2_690x192.png)
**Inbound channel:** “Amazon\_To\_DHL\_\_3A4\_PO\_RNIFIN” for receiving the RNIF request and acknowledgment from the partner.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/0/c/0c239580ac2abd211d51b34f2ae15a3c392d351b_2_690x219.png)

>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.
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/0/a/0a5a596d01b1fd9033156312ee42b359fba5971c_2_690x236.png)
- Create 2 business document  
- 3A4 Purchase Order Request
o Import the RNIF3A4PO sample xml or schema  
o Add the custom attributes to document for receiver using the xpath.  
o In our case xpath :  
/Pip3A4PurchaseOrderRequest[0]/toRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/e/a/ead71e3bff8457a4cb917f9698e383728521a245.png)
- Similarly repeat the steps for Sender xpath
  o In our case xpath: /Pip3A4PurchaseOrderRequest[0]/fromRole[0]/PartnerRoleDescription[0]/PartnerDescription[0]/BusinessDescription[0]/GlobalBusinessIdentifier[0]
- 3A4 Purchase Order Confirmation\Response
  o Import the RNIF3A4 confirmation sample xml or schema
  o Repeat the above steps to set up the receiver id and Sender ID using xpath.
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/2/e/2e7500a0fe6f02d63c56c359e56ceb079d532892.png)  
![image](https://aws1.discourse-cdn.com/techcommunity/original/3X/3/3/33d41d0f84c6a4c559bb4a7e853ab4741a8612dc.png)
- 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](http://webMethods.io) integration flow service
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/e/f/efb47a70fad670da889ba81c2dfd87bf15f8f4a5_2_690x234.png)
- Sending the response for 3A4 PO Order confirmation
  o **Rule Name:** DHL\_To\_Amazon\_3A4\_Response\_Rule
  o **Sender:** DHL Enterprise profile
  o **Receiver:** Amazon Partner profile
  o **Document:** RNIF3A4PO Response
  o **Action:** send the message to preferred outbound channel
![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/5/3/5344eb196ce52d2068d258473895bc3060c2494d_2_690x257.png)

Create FlowService in [webMethods.io](http://webMethods.io) Integration

• To submit the response 3A4 order confirmation transaction we need to create the flowService inside [webMethods.io](http://webMethods.io) integration.  
• Create the flow service and name it as “submit3A4RNIFResponseConfirmation”.  
• 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

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/a/9/a9581c6d221d48d4b253114670f3cf6aa9da8c2d_2_690x229.png)

**Generated RosettaNet Object in [webMethods.io](http://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:   
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"?> RosettaNet V02.00 ------=\_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"?> No 20220727T071050.669Z DUNS 987659999 DUNS 123451111 c0a8df980000e7e7000000931658905850673
**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](mailto:ServiceHeader.0.7870943816989204.1658905850670@sag-b2b-v1011-59bcc6c7b4-tfxvp)  
Content-Description: RosettaNet-Service-Header

<?xml version=3D"1.0" encoding=3D"UTF-8"?> Create Purchase Order Buyer Buyer Service 0 Purchase Order Request Action Seller Seller Service Production 3A4 c0a8df980000e7e7000000921658905850669 1.1 DUNS 123451111

**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](mailto:ServiceContent.0.7870943816989204.1658905850670@sag-b2b-v1011-59bcc6c7b4-tfxvp)  
Content-Description: RosettaNet-Service-Content

< `actual payload `>

**Target Tenant:**

![image](https://aws1.discourse-cdn.com/techcommunity/optimized/3X/b/8/b84ed99647a7ccd1d05cb0880b23600c045c4e55_2_690x315.png)

### Note:

1. Attached the flow service for 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)

[Submit3A4RNIF.zip](https://tech.forums.softwareag.com/uploads/short-url/4A8xmkvpAAHEoBDdLqPdjU7w3ez.zip) (9.8 KB)  
[SendRNIF34AResponseConfirmation.zip](https://tech.forums.softwareag.com/uploads/short-url/x5Upyz5Y6n8vWwMoB7zslvbECu2.zip) (10.5 KB)  
[3A4PayloadRequestSample.xml](https://tech.forums.softwareag.com/uploads/short-url/lVABEzlfZceN2KxKfwVWAxwM3GB.xml) (13.9 KB)

- To import the flow service on [webeMethods.io](http://webeMethods.io) integration, refer to
[webMethods.io Integration: DevOps - Stage Management](https://tech.forums.softwareag.com/t/webmethods-io-integration-devops-stage-management/237446)
**section:** 4.4 Import and Export Integrations (Asset level)


[Read full topic](https://tech.forums.softwareag.com/t/webmethods-io-b2b-processing-message-using-rnif-2-0/259584)