DEV Community

Tech Community for Software AG Tech Community

Posted on • Originally published at tech.forums.softwareag.com on

B2B as a Service: Connect a Partner via webMethods.io B2B

Introduction

As more and more system and platform are moving to the cloud, so is B2B (Business to Business). With webmethods.io B2B we offer our proven B2B platform as a Service in the cloud, providing capabilities like Partner Management and Onboarding, Document Definition, powerful processing rules and End to End Monitoring. webmethods.io B2B comes with complete sets of predefined documents for standard like EDI and RosettaNet, but you can also define your own document types.

In this article I will show you the complete process you need to do to receive documents from a trading partner, which consists of

  • Creating a Channel
  • Setting up the Trading Partners
  • Creating the Document
  • Defining the Rule (Part 1)
  • Test sending a document

All of the pictures are click to enlarge, si if you want to read the details in the screenshots, just click the thumbnails.

Create a Channel

Go to webMethods.io B2B

C_CreateChannel000

Go to Communications - Channels and click Add Channel

C_CreateChannel001

Select HTTP-IN and give the channel a name. Click Finish.

C_CreateChannel001

Make sure to enable the channel. Copy the Endpoint URL for later use. We will use this endpoint to post our message lateron.

C_CreateChannel003

Setup the Trading Partners

A big part of B2B is managing the trading partners involved in transactions, internally as well as externally. We will setup 2 trading partners for our demo and create and associate an user for the partner sending us a transaction.

Go to Partner - Partner Profiles

D_AddPartner_001

Click Add Partner.

D_AddPartner_002

Enter a name and click Add Identity

D_AddPartner_003

Select an Identity type (we just use DUNS here) and enter a value for the identity value. Click Add.

D_AddPartner_004

Click Save.

D_AddPartner_005

Make sure to enable the Partner Profile.

D_AddPartner_006

Add a second profile for the receiving trading partner.

D_AddPartner_007

Make sure to enable this Partner Profile as well.

D_AddPartner_008

Go to Partner - Partner Users. Click Add Partner User.

D_AddPartner_009

Enter User Name, Full Name and set the Password.

D_AddPartner_010

D_AddPartner_011

Go back to Partner Profiles and select the sending Partner, in our Demo it is the ACME Druckerei.

D_AddPartner_012

In the partner profile go to Users and click Associate Users.

D_AddPartner_013

Select the user we just created and click Add.

D_AddPartner_014

Create the Document

B2B is all about Documents. webmethods.io B2B comes with complete sets of predefined documents for standards like EDI and RosettaNet, but here we will define our own documents. Documents defined in B2B are used to define the expected data and extract values for routing and processing.

go to Documents - Business Documents. Click Add Document.

E_AddDocument_001

Select XML as type from the dropdown.

E_AddDocument_002

Enter a name for the document type and select a project from webMethods.io Integration. In this project a docuemnt type defintion will be created matching our business document, so we can map and process it in an Integration Flow. In this demo I use the project I created in the associated article Hybrid Integration: Expose a local service to webMethods.io integration (see link at the end of this article), so we can use it in our final step (the next article) to process the reived document in a fully hybrid workflow. Click Next.

E_AddDocument_003

Select Build using - Sample XML document and drag a valid XML filefile to the dotted rectangle.

E_AddDocument_004

Click Finish.

E_AddDocument_005

E_AddDocument_006

Go to Identifiers. Select the Root Node (Here PaymenAdvice) Click Add Identifier.

E_AddDocument_007

Click Add.

E_AddDocument_008

You now have an identifying query based on the root node. Click Update.

E_AddDocument_009

go to Attríbutes. Select the SenderId in the document structure and click Add To Attributes.

E_AddDocument_011

webMethods.io B2B automatically creates the needed query on the document structure.

E_AddDocument_012

Select SenderID from the dropdown. In this example the field in the XML document happens to be named SenderID, but it can be any field in the recived document, like ISIN, DUNS, etc. Click Add.

E_AddDocument_013

Select ReceiverID in the document structure and again click “Add To Attributes”.

E_AddDocument_014

Select ReceiverID from the dropdown. Click Add.

E_AddDocument_015

Click Update.

E_AddDocument_016

Make sure to have the document Active.

E_AddDocument_017

Define the Rule (Part 1)

Documents are routed to processing by Processing Rules. As this articel is onyl about the B2B part, we wil lnot add the processing in a webMethods.io Integration here. This will be shown in the related article Hybrid B2B Bring the pieces together - integrate webMethods.io B2B with webMethods.io Integation (see link at the end of this article).

Go to Rules - Processing Rules. Select any rule and click Add Processing Rule. Select Aboce or Below* from the dropdown. Rules are processed in the order they are listed here. The first rule matching a document is used for routing. If one rule is matched, not other is executed on the document.

F_CreateRule_001

Name the rule. Click next.

F_CreateRule_002

Select the Document part and click Associate Document.

F_CreateRule_003

Select the Document you created before. Click Add.

F_CreateRule_004

Click Next.

F_CreateRule_005

We do not need extended criteria here. Click Next.

F_CreateRule_006

We leave the duplicate check and the persistence to the document definition. Click Next.

F_CreateRule_007

Leave the fields on the last tab as they are for now. In the next article we will add an action here. Click Next.

F_CreateRule_008

Do not forget to set the document to active.

F_CreateRule_009

Test send a document

In this demo we will just use an API Test IDE. Create a new HTTP request.

G_SendDocument_000

Set the action to POST. Insert the endpoint URL of the channel we created into the adress field.

G_SendDocument_001

Set the authentication to basic auth and enter the username and password of the partner user we created.

G_SendDocument_002

In the Heaers section add a key content-type and set it to text/xml:

G_SendDocument_003

In the body type select raw and insert the content of your xml test message. Click send.

G_SendDocument_004

Go to webMethods.io B2B. Select Monitoring - Transactions. webMethods.io B2B fas detected the document type and using the attributes we defined, assiciated the document with the correct sender and receiver. Expand the line of the logged document. The status is just DONE, as we did not associate an action yet with the processing rule.

G_SendDocument_005

Click on the receipt date/time. This opend the detailed log.

G_SendDocument_006

Click on content, to inspect the received content of the message.

G_SendDocument_007

In the next article we will se how to integrate our B2B setup with a webMethods.io Integration flow and call a serbice of an on premise service (see below).

Related articles

Hybrid Integration: Expose a local service to webMethods.io integration:

<img alt="" src="https://sea1.discourse-cdn.com/techcommunity/user_avatar/tech.forums.softwareag.com/martin_wroblinski/40/613_2.png">
<a href="https://tech.forums.softwareag.com/t/hybrid-integration-expose-a-local-service-to-webmethods-io-integration/253901">Hybrid Integration: Expose a local service to webMethods.io integration</a> <a href="https://tech.forums.softwareag.com/c/knowledge-base/6"><span></span><span title="Browse through our vast Knowledge base of tutorials, articles, code samples, tips and tricks.">Knowledge base</span></a>
Enter fullscreen mode Exit fullscreen mode

Introduction
With more and more companies moving to the cloud, there is increased demand for integration of SaaS offerings using cloud integration platforms. We call this IPaaS, Integration Platform as a Service. Software AGs offering for IPaaS is webmethods.io Integration. But most companies do not start in the cloud by scratch, they still have systems running on premises, in a container environment, or in as cloud platform service (PaaS - Platform as a service). Usually the systems running …

B2B as a Service: Connect a Partner via webMethods.io B2B

This one!

Hybrid B2B Bring the pieces together - integrate webMethods.io B2B with webMethods.io Integration

Link coming shortly.

Check out original article

Top comments (0)