DEV Community

Tech Community for Software AG Tech Community

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

Hybrid B2B - integrate webMethods.io B2B with webMethods.io Integration

Introduction

With more and more companies moving to the cloud, there is increased demand for integration of SaaS offerings using cloud integration platforms but also doing your B2B - Business to Business, in the cloud as a Service. 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 there are not exposed as a Service or even shall not, because of security reasons. You still need to integrate those system with your new world, and this is where hybrid B2B comes into place.

In the article B2B as a Service: Connect a Partner via webMethods.io B2B I showed you how to connect to a partner via webMethids.io B2B, how to onboard the partner, define documents and rules for the exchange and how to finally send and receive business documents.

In the article Hybrid Integration: Expose a local service to webMethods.io integration you’ve seen to to expose an on premise service to webMethods.io Integration and so have it in an IPaaS (Integration Platform as a Service).

In this article I will show you how you can bring those 2 parts together, by including the exposed on premise service in a cloud hosted integration flow and calling this by the processing rule of webMethods.io B2B.

If you want to create this demo yourself, you need a webMethods.io tenant with Integration and B2B enabled.

Prerequisites

This article relies on the assets created in the following 2 articles:

Create Hybrid Integration Flow

Go to webMethods.io Integration and open your project.

H_CreateHybridIntegrationFlow_000

In the upper pane select Recipes and below FlowServices. Recipes are prebuild standard patterns which relieve you if the tedious work of doing the same repeating parts of integrations every time. In this example we will use a recipe to receive a document from B2B and access it’s content. Select the webMethods.io B2B connector in the left pane.

H_CreateHybridIntegrationFlow_001

From the recipes select the one to extract the content and update user status. Click Use Recipe.

H_CreateHybridIntegrationFlow_002

webMethods.io Integration will create a flow service for you from the recipe. Select your Project (we created one in the related article Hybrid Integration: Expose a local service to webMethods.io Integration). Enter a name for the flow and click Save.

H_CreateHybridIntegrationFlow_003

You need a runtime account for executing the connector services. If you have none yet for this connector, click the + and enter an account name.

H_CreateHybridIntegrationFlow_004

Click Save.

H_CreateHybridIntegrationFlow_005

The Recipe contains steps to generate a Http response. We do not need thos on this demo, as use guaranteed processing in the B2B rule. Click the 3 dots in the line of the If statement and select Delete.

H_CreateHybridIntegrationFlow_007

Do the same for the Else step. Click the last + step to add an exit step.

H_CreateHybridIntegrationFlow_008

Select Exit and make sure the signaling is set to SUCCESS. If there is an error in the service execution later on, the error will be reported to the rule. If there is no error, this makes sure the rule recognizes the successful execution. You may want to add more sophisticated error management in real live implementation though.

H_CreateHybridIntegrationFlow_009

Select the first parseContent step and click the map symbol.

H_CreateHybridIntegrationFlow_009b

The mappings are preconfigured from the recipe. Click the setValue symbol of the field loadContent and make sur it is set to String.

H_CreateHybridIntegrationFlow_010

Select the first Change User Status step and click the map symbol. Click the setValue symbol of the field userStatus and make sure it is set to RECEIVED.

H_CreateHybridIntegrationFlow_011

Hover your mouse over the connection between the changeUserStatus and the Exit step and click the appearing +.

H_CreateHybridIntegrationFlow_012

In the field start typing “xmlStr…” to limit the list of available services. Select xmlStringToDocument.

H_CreateHybridIntegrationFlow_013

Open the mapping by clicking the map symbol. Map the outputContent (output from the previous step) to the xmlString input. Click the + symbol in the Pipeline Output column to add a new document.

H_CreateHybridIntegrationFlow_014

Set Type to Document Reference as we want to use the Document Type generated from out B2B Document.

H_CreateHybridIntegrationFlow_015

In Document Reference select the document type which has been generated from our B2B Document.

H_CreateHybridIntegrationFlow_016

Enter a name (e.g. PaymentAdvice). Click Save.

H_CreateHybridIntegrationFlow_017

Map the document from the Output column of the service to the newly created document reference by clicking the document and dragging it to the target. Click the document in the Pipeline Output column and click the drop arrow in the toolbar.

H_CreateHybridIntegrationFlow_018

The document gets marked with the drop value indicator.

H_CreateHybridIntegrationFlow_019

Hover your mouse over the connection between the xmlStringToDocument and the Exit step and click the appearing +.

H_CreateHybridIntegrationFlow_020

Select CONNECTORS in the dropdown, scroll down to On-Premise Connectors and select the on premise connector we created in the article Hybrid Integration: Expose a local service to webMethods.io Integration.

H_CreateHybridIntegrationFlow_021

Select the Receive_demo_PaymentAdvise service.

H_CreateHybridIntegrationFlow_022

Click the User icon and select the on-premise user we created in the same article.

H_CreateHybridIntegrationFlow_023

Click the map icon. Expand the PaymentAdvice Document in the Pipeline Input column. Map the inner document PaymentAdvice to the corresponding document in the service input.

H_CreateHybridIntegrationFlow_024

Hover your mouse over the connection between the connector service and the Exit step and click the appearing +.

H_CreateHybridIntegrationFlow_025

Select CONNECTORS in the dropdown, scroll down and select the webMethodsB2B connector.

H_CreateHybridIntegrationFlow_026

From the service selection dropdown choose changeUserStatus.

H_CreateHybridIntegrationFlow_027

As above select the user account for the B2B action by clicking the user icon and choosing it from the dropdown.

H_CreateHybridIntegrationFlow_028

Set the userStatus to processed. Click Save.

H_CreateHybridIntegrationFlow_029

H_CreateHybridIntegrationFlow_030

Save your flow.

H_CreateHybridIntegrationFlow_031

Click on the 3 dots fo your service and select Overview.

H_CreateHybridIntegrationFlow_032

Check Enable FlowService to be invoked via HTTP. This is necessary to make this service accessible to webMethods.io Integration.

H_CreateHybridIntegrationFlow_033

Adjust Rule to call the flow

Go to webMethods.io B2B. In Rules - processing rules select the rule we created in the related article B2B as a Service: Connect a Partner via webMethods.io B2B.

I_AdjustRuleAction_000

Go to Actions. Check the box “Call an Integration”. In Select mode for call out select webmethods.io Integration.

I_AdjustRuleAction_001

As FlowService select the service we just created. Select the user we created in the related article Hybrid Integration: Expose a local service to webMethods.io Integration. Set the Execution Mode to Reliable. Click Update.

I_AdjustRuleAction_002

Test the processing

Open your test client. We created th test request in the related article B2B as a Service: Connect a Partner via webMethods.io B2B. Click Send.

M_Execute_001

Go to webMethods.io B2B . Monitoring - Transaction. The Document we just sent is recognized and mapped to the trading partners. Expand the log.

M_Execute_003

Click the Date/Time field to expand the log. Compared to our first send in the article B2B as a Service: Connect a Partner via webMethods.io B2B it is now much longer. It shows the successful execution of the invoked integration flow and the additonal status changes.

M_Execute_004

All important execution steps, success as well as errors are logged in the B2B monitoring to give you one place of visibility. Nevertheless you can inspect the logging in the integration part as well for the parts executed there. Go to webMethods.io Integration, select Monitoring - FlowService Execution. Scroll down to see the Executions logged.

M_Execute_005

If we inspect the local log of the on premise Integration Server (and if we added logging to our local service), we can also see the log of the local execution

M_Execute_006

and when inspecting the database table we can see ourrecord successfully inserted:

M_Execute_007

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

<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/b2b-as-a-service-connect-a-partner-via-webmethods-io-b2b/253904">B2B as a Service: Connect a Partner via webMethods.io B2B</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
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 artic…

Hybrid B2B - integrate webMethods.io B2B with webMethods.io Integration

Original post

Top comments (0)