Introduction
Axway B2BI provides powerful tools to integrate b2b flows of an organization both with external parties or multiple internal applications. This post describes a way to set up and organize these transfers. To pick up and deliver files there will be a preference to use sftp using public key authentication. This can be modified and set up differently using similar steps as described in this post, but those steps will not be included here. Furthermore, there will not be any focus on the content processing features available in Axway B2BI. Further information about the B2BI product and all its feature can be found on the Axway site.
Axway B2BI
Naming Conventions
There are several naming conventions used when creating names for different components in B2BI. Below is a list of the common rules when creating names.
Partners, applications & IDs:
Partner names, and application names should be kept the same as their messaging id’s (unique identifiers within B2BI) As much as possible. The following guidelines apply:
- Names start with Capital letter
- No special characters
- spaces in names are replaced with ‘_’ characters in id’s
Sftp accounts
SFTP accounts are available both for the trading sftp server, as well as the internal one used for internal applications. For both servers the same rules apply when creating account names.
- No capital letters
- No special characters
- No spaces
B2BI components
Different B2BI components which are created should be named in a way that it’s easy to identify which ones are linked. They all consist of 3 parts:
1 | The component acronym | identifies which type of component it is (PA > processing action, TP > Trading pickup, …) |
2 | The protocol/action used | Indicates which action is performed by the component |
3 | The transfer name | Indicates the name of the transfer flow and should be kept the same for all components related to the same flow. |
Directories
Directories created within B2BI, especially on the internal SFTP servers, should follow the following structure:
1 | the sftp username | This is automatically added when setting up configurations in B2BI and should not be added manually, however when providing the path to partners, this should be included. |
2 | trading application name | This is the messaging ID which us used to identify the other party of the transfer. |
3 | Inbound/Outbound | This indicates the flow of Files. Inbound = Files going into B2BI. These files are uploaded/provided by a party/application Outbound = Files going out of B2BI. These files can be downloaded/received by a party/application Custom message attributes “_Inbound” and “_Outbound” are used to set this value. |
4 | subfolderx | These subfolders allow for the separation of multiple files sent between the same 2 trading partners. Up to 3 levels of subfolders can be created. |
An example of a trading scenario would be:
- Partner uploads a file to the directory: /partner_1/Application_A/Inbound/my_subfolder
- Application downloads a file from directory: /application_A/Partner_1/Outbound/my_subfolder
Setting up an integration flow.
In order to set up a flow in B2BI, several different components will be used depending on the type of flow. Below is an overview of the typical types of flows which can be set up using Axway B2BI and which components are required to set up the flow. When creating components and setting up flows we will also be using a fixed naming convention for the different components.
Partner > Internal Application
- Partner Profile
- Trading Pickup
- Application Delivery
- Delivery Setting
Internal Application > Partner
- Partner Profile
- Application Pickup
- Partner Delivery
Internal Application > Internal Application
- Application Pickup
- Application Delivery
- Delivery Setting
Partner > Partner
- Partner Profile (x2)
- Trading Pickup
- Partner Delivery
- Processing Action
B2BI components
This section describes how different B2BI components should be set up to create integrations. Additional logic can be added to these flows, for details on how to set this up please consult the vendor documentation page.
Partner Profile
Partner profiles specify the settings for a specific partner. This includes contact information, identifiers, certificates. and information on how files can be delivered to this partner. Default naming convention is to use the common name of the partner starting with a capital letter.
- Go to partners > add a partner
- Select manually create a new partner and click on next.
- Enter the Partner name, the Contact name. the E-mail address and check the correct community. Then press Finish.
- Go to the created partner profile under Partners and select Messaging IDs
- Click on Add a Messaging ID
- add the partner name as Messaging ID name
- Select INHOUSE
- Enter the Partner name again under Identification
Application Pickup
Application pickups specify how files sent by partners enter the B2BI system. It can also be used to specify certain information about where files should be delivered. This example uses sftp with public key authentication to pick up the files. Default naming convention of trading pickups is AP__.
Application pickup using ssh impersonation:
- Go to Trading configuration > COMMUNITY > Application pickup
- Click on Add an application pickup
- Select SFTP and click on next
- Leave the default settings for From address and click next.
- select the option Specify the address. Always use a fixed address, and choose the correct partner using the Choose party… button. When sending files to another internal application select as the partner the internal community.
- Select Use an external SFTP server not managed by this application then click next
- Enter the following information
SFTP server: localhost
port: 22
Directory: The target directory relative to the home folder of the sftp user’s home folder.
- Click on Get Key… then on use Key
- under Authentication method select Use public/private key pair authentication
- select the enter the target user under Username
- for the private key select Choose File, and upload the ssh user’s private key
- Optionally uncheck the box for Use temporary files to avoid read/write collisions and click on next
- Enter the application pickup name and click on finish.
- Open the newly created pickup by clicking on it
- go to the Message attributes tab and under the Fixed messages attributes section add an attribute with the name From routing ID with a value identifying the application sending the file.
- Optionally on the Message attributes tab, when using dynamic directory pickups, add the needed attributes under Message attribute directory mapping.
- Go to the Advanced tab and uncheck the box next to Allow SFTP clients to add, remove subdirectories
- on the Advanced tab under Message processing select the Limited setting. Then click on Save changes
Application Delivery
Application Deliveries are used to deliver files to internal applications. In this example sftp with public key authentication is used to push files to the directory of the target application. Default naming convention of application deliveries is AD__.
Application delivery using ssh impersonation:
- Go to Trading configuration > COMMUNITY > Application Delivery
- Click on Add an application delivery
- Select SFTP and click on next
- Select Use an external SFTP server not managed by this application then click next
- Enter the following information
SFTP server: localhost
port: 22
Directory: The target directory relative to the home folder of the sftp user’s home folder.
- Click on Get Key… then on use Key
- Under Authentication method select Use public/private key pair authentication
- Select the enter the target user under Username
- For the private key select Choose File, and upload the sftp user’s private key.
- Optionally Uncheck the box for Use temporary files to avoid read/write collisions and click on next
Trading Pickup
Trading pickups specify how files sent by partners enter the B2BI system. It can also be used to specify certain information about where files should be delivered. In this example the partner is pushing files using the B2BI’s trading sftp server. Default naming convention of trading pickups is TP__.
Trading pickup using the trading SFTP server:
- Go to Trading configuration > COMMUNITY > Trading Pickup
- Click on Add a pickup
- Select No packaging and click on next
- Select SFTP and click on next
- Leave the default settings for From address and To address and click next.
- Select Use an existing embedded SFTP server: Trading SFTP then click next
- Select Configure SFTP user account later and click next
- Enter the name of the transfer.
- Select the newly created trading pickup and go to Directories.
- Under Accounts owned by partners, click on add, and select the partner sftp account. If none exists yet, a new one can be created here. When creating the path for the pickup, ensure the path has the structure //Inbound. or check the section Naming Conventions for more details.
- Check box next to Do not allow files to be uploaded to subdirectories unless a message attribute is configured for the subdirectory level
- Go to the Advanced tab and uncheck the box next to Allow SFTP clients to add, remove subdirectories
- On the Advanced tab under Message processing select the Limited setting. Then click on Save changes
Partner Delivery
Partner deliveries specify how files are delivered to an external partner. In this example the partner is pulling files from the B2BI’s trading sftp server. Default naming convention of Partner deliveries is PD__.
Partner delivery using the trading SFTP server:
- Go to Partners > Manage partners
- Select the partner you want to set a delivery for
- Go to Partner delivery
- Click on Add a delivery
- Select No packaging and click on next
- Select SFTP and click on next
- Select Use an existing embedded SFTP server: Trading SFTP then click next
- Select Configure SFTP user account later and click next
- Enter the name of the transfer.
- Select the newly created partner delivery and go to the Directories tab. Add the partner user account with the directory path /
- Under the Message attributes tab add the following attributes to Message attribute directory mapping (in this order):
-
- From routing ID
-
- _Outbound
-
- Subfolder1
-
- Subfolder2
-
- Subfolder3
- Check box next to Do not allow files to be uploaded to subdirectories unless a message attribute is configured for the subdirectory level
- On the advanced tab check the box Delete file after it is downloaded
- On the advanced tab uncheck the box Allow SFTP clients to add, remove subdirectories
Delivery Setting
Delivery settings specify to which application delivery files are delivered. This is only used when files are sent to Applications, not when sending files to partners. Default naming convention is DS__.
- Go to Trading configuration > COMMUNITY > Trading Pickup
- Click on Add an application delivery setting
- Enter the name of the delivery setting.
- Select the application delivery this delivery setting is linked with from the list and click on finish.
- Open the newly created delivery setting by clicking on the No delivery criteria next to the delivery setting name.
- Add the rules for sending files to this delivery by using the AND, OR and Compare buttons.
- Click on Save changes
Processing Action
Processing actions are used to perform certain actions on files during the processing step. A common use of this is to re-route messages coming from a partner to another partner. Default naming convention is PA__
- Go to Trading configuration > COMMUNITY > Processing > Message handler > Manage message processing actions
- Click on Add a new message processing action
- Create the needed rules for this action under Process the message when, then click on the next button
- Select the action to be performed. When re-routing messages from one partner to another the option Re-route the message to a specific party should be used. then click on Next.
- Enter the name of the processing action and click on Finish