webMethods.io B2B Channels Introduction
Channels enable document exchange between trading partners in webMethods.io B2B. There are two types of channels - Inbound (used to receive the documents) and Outbound (used to transfer documents). The channels can be created during design-time and can be used during runtime to exchange the documents.
webMethods.io B2B supports multiple protocols over which these channels (Inbound and Outbound) can be created and used to exchange the business documents.
The Protocols supported in webMethods.io B2B till date are :
- HTTP
- AS2
- RNIF
- SFTP
What is SFTP ?
SFTP (Secure File Transfer Protocol, also known as SSH File Transfer Protocol) is a popular method for securely transferring files over remote systems. It runs over the SSH protocol. The documents transferred using SFTP are encrypted and transferred in specially formatted binary packets with a single, secured connection using SSH. SFTP also protects against password sniffing and man-in-the-middle attacks. It protects the integrity of the data using encryption and cryptographic hash functions, and authenticates both the server and the user.
SFTP Support for webMethods.io B2B Channels
Usecase & Assumption
- Let us consider a use case in which an online e-commerce website, ABC Corp is using webMethods.io B2B to send/receive the business documents to/from its partners.
- One of the partner Partner A , and another partner Partner B a popular shoe maker, uses SFTP protocol to exchange the business documents. For example: Purchase order, Invoice etc. between each other.
- Assuming the enterprise ( ABC Corp ), partner profile ( Partner A , Partner B) and processing rule are already setup.
- Assuming that while configuring the processing rule " Deliver through Preferred outbound channel " is selected.
- SFTP communication channel needs to be configured during design-time configuration.
Points to Note
- SFTP channel works on the pull model in which documents are pulled from SFTP server and processed.
- A scheduler is created in the tenant’s webMethods.io B2B Server with the user selected running frequency. This scheduler polls the sender’s SFTP server source folder path to check if any new file is present.
- Tenant’s webMethods.io B2B scheduler running status changes depending upon the status of channel.
- Server and user details provided by the user while creating the channel are stored in tenant’s webMethods.io B2B Server.
Design time configuration
Creating a SFTP IN/OUT Channels
To create an SFTP-IN-CLIENT Channel
- Log in to webMethods.io B2B.
- Navigate to Communications –> Add Channel –> Inbound Channel
- Select the channel type as SFTP-IN-CLIENT from the drop-down of channel type.
- Specify a name and the description to the channel which you are about to create as shown:
- Then click on the Next button at the bottom right corner to go to next page.
- Fill in the channel details as per the description in the table:
- Once the SFTP-IN-CLIENT channel is created, then make the channel as “Active”.
To create an SFTP-OUT-CLIENT Channel
- Log in to the webMethods.io B2B.
- Navigate to Communications –> Add Channel –> Outbound Channel
- Select the channel type as SFTP-OUT-CLIENT from the drop down of channel type.
- Give a name and the description to the channel which you about to create as shown:
- Then click Next given in bottom right corner to go to the next page.
- Fill in the below channel details as per the description given in the following table:
Run time Configuration
During runtime, the actual exchange of the business documents happens between partners:
Prerequisites:
- Enterprise should be setup in the tenant.
- Partners among which the file exchange has to happen should also be created.
- Partners should have configured a preferred outbound channel in partner profile.
- Processing rule should be created for the partners among which the exchange of documents has to happen.
- Select “Deliver document using receiver’s preferred outbound channel” option in the Action step of the processing rule.
Points to be considered :
- The maximum file size which can be processed using SFTP channels is up to 1 MB .
- As zip is a packaging of files which can even have different type of formats, webmethods.io B2B does not support the zip files to be processed with SFTP based channels.
- The inbound channel need not to be associated with any partner as the user with which the operation needs to be performed may be different.
SFTP channel works on a pull model in which documents are pulled from SFTP server and processed. To pull the Business documents, Documents are polled after every equal internal of time by using a Integration Server scheduler explained below in details
Flow Diagram
The following flow diagram explains how the end-to-end flow of the documents happens from partner Partner A to the other partner Partner B .
-
Partner Partner A wants to send a business document to Partner B using the SFTP.
-
Partner A creates a SFTP-IN-CLIENT channel and uploads the documents into his SFTP server’s source folder.
-
Tenant’s webmethods.io B2B server scheduler polling the SFTP server’s source folder pickup the files to download and process them further.
-
After successful processing of files, outbound SFTP-OUT-CLIENT channel’s configurations are used to upload the files to Partner B’s SFTP server target folder.
File Polling
SFTP-IN-CLIENT channel uses webMethods.io B2B Server schedulers to poll sender’s external SFTP server to pull the files and process them.
File Exchange
Steps that happen to exchange files
- Scheduler which runs after every equal interval of time, calls webMethods.io B2B Server to check if any new business document has been uploaded into sender’s external SFTP server.
- webMethods.io B2B server connects to the SFTP server using credential provided during the creation of SFTP-IN-CLIENT channel.
- webMethods.io B2B server lists all the files present in the SFTP server which are more than size 1 MB.
- webMethods.io B2B server starts downloading the files one by one and starts processing it.
- webMethods.io B2B server renames/moves the processed files into other folder path or delete the processed files from the sender’s SFTP server.
- webMethods.io B2B server calls the preferred SFTP-OUT-CLIENT channel of the receiver. (Only if processing rule has “Deliver document” as Action)
- webMethods.io B2B server connects to Receiver’s external SFTP server.
- webMethods.io B2B server uploads the processed business document to the SFTP server.