Configure Sterling B2B Integrator
In Sterling B2B Integrator there is quite a few things to do to make this work the first time.
Create Adapter Container
The WebSphere MQ File Transfer Edition Agent Adapter can’t run on the ASI Node, and thus need a Container Adapter.
If this is to be done on a Single Node SB2BI Instance, I go to the <SB2BI install Directory>\install\bin and stop SB2BI (./hardstop.sh), and then run the following commands (it will take some time).
Then start Sterling B2B Integrator again (./run.sh).
If it is a Clustered Installation, like in my case where I have 2 SB2BI Nodes in a cluster, the first command (./startCluster.sh 1 false) don’t need to be executed. This command was executed when the Cluster was configured. So then the only thing needed to be executed is ./setupContainer.sh 1. The number 1 indicates that this is the first Adapter Container. So this number has to be 2 for the second one and so on.
To start the new Adapter Container, execute the command ./startContainer.sh 1 (when starting SB2BI from scratch, use ./runAll.sh to start both the ASI Node and the Adapter Containers).
There should then be a new Adapter Container created in Sterling B2B Integrator. In my case, I have created an Adapter Container on both my SB2BI Nodes.
Create FTP Server Adapter
The WebSphere MQ File Transfer Edition Agent Adapter uses the FTP Server Adapter to access the mailboxes on SB2BI. Both the FTP Server Adapter to be created in this step, and the WebSphere MQ File Transfer Edition Agent Adapter created in a later step needs to run in the Adapter Container created earlier.
Create a FTP Server Adapter by going to Deployment -> Services -> Configuration. Select the Adapter Container as Environment (I activate it for both my Nodes).
Setup Users, Mailboxes, Virtual Roots and Permissions
A Sterling User is needed to access the Mailboxes used for sending and receiving files between the FTE Agent in SB2BI and the FTE Agent on the WebSphere MQ FTE system. There are by default two Mailboxes that need to be created. One Mailbox for outbound files and one for inbound files. The user created needs a Virtual Root and the right permissions to access the Mailboxes created.
This is the user that is accessing the Mailboxes to send and receive files.
Create the Mailboxes and VirtualRoot for the user
Two Mailboxes need to be created. One for files from WebSphere MQ FTE and one for files to WebSphere MQ FTE.
Create the Mailboxes, and make sure the WMQFTE user (created above) has Permissions to the Mailboxes.
The FTEMBX Mailbox for files From WebSphere MQ FTE.
The SOURCE Mailbox for files to WebSphere MQ FTE.
The Mailboxes created should look like this.
Add a Virtual Root for the User WMQFTE to the Mailbox /FTEMBX.
In filegateway.properties, there are two variables that link to the WMQFTE Source mailbox and the Virtual Root. So by default the mailboxes should be created as /FTEMBX and FTEMBX/SOURCE to fit the default values for WebSphere MQ FTE integration.
If, by some reason, other Mailbox Names is needed, this can be edited in filegateway.properties, or preferably in customer_overrides.properties to avoid this being overwritten during patching. If put in customer_overrides.properties, use the following:
Create a WMQFTE User Map
It needs to be a mapping to connect the pairs of users in WebSphere MQ FTE and SB2BI.
Go to Deployment -> Adapter Utilities -> WMQFTE User Maps and create a new User Map.
Add the following entry.
Create a WebSphere MQ File Transfer Edition Agent
This step creates an MQ FTE Agent on SB2BI. This is the Agent that communicates with other WebSphere MQ FTE Agents. It has to be connected to the FTP Server Adapter created earlier and the User Map created above. The MQ FTE Agent Adapter is running in the Adapter Container Environment created earlier.
NB: The Adapter should not be Enabled when created.
Go to Deployment -> Services -> Configuration and create a new instance of the WebSphere MQ File Transfer Edition Agent Adapter.
Give the Adapter a name, and link it to the Queue Managers created in WebSphere MQ. Use Client Mode.
Link to the WebSphere MQ Server.
Link to the FTP Server Adapter created earlier.
Link to the WMQFTE User Map created earlier.
In the end, there will be created mgsc scripts to create and delete the Queues needed for the Agent in WebSphere MQ. Download these files.
Go to the WebSphere MQ Server, and open a DOS-Shell. Run the mqsc-file downloaded with the following command:
runmqsc <agent_qmgr_name> < <agentname>-create.mqsc
That creates the channels for this Agent in WebSphere MQ.
Before enabling the Agent Adapter, the customer_overrides.properties file in SB2BI needs to be edited. The following is put in:
It is then possible to Enable the adapter. The AGENT_SFG should then pop up in the MQ FTE -> Agents View.
Create WebSphere MQ Suite Async Receive
To be able to track requested transfers, I need to create a WebSphere MQ Suite Async Receive Service that uses a Reply Queue in WebSphere MQ. Before that Adapter is created, the reply Queue in WebSphere MQ needs to be created.
I Start by creating a Local Queue in WebSphere MQ. I called it SFGReplyQueue.
Install J2EE Connector Architecture Specification Interface Classes
For SB2BI 5.2.3 and above, you have to download and install the connector.jar file from the J2EE Connector Architecture Specification Interface Classes. Install it by using the Install3rdParty.sh/.bat in SB2BI. <Link til kapittel i tidligere blogg innlegg hvor dette er nevnt>
Set up WebSphere MQ Suite Async Receive Service. Go to Deployment -> Services -> Configuration and create a new instance of WebSphere MQ Suite Async Receive Service.
Add Host Name for the MQ Server, Port Number, Queue Manager and a Channel. I use a standard Channel existing by default in MQ. Also add the reply Queue created above.
Select the Bootstrap Workflow. This is a standard Workflow in SB2BI.
Click through the rest and finish.
Create WebSphere MQ File Transfer Edition Create Transfer Service
This Adapter is the adapter used when SB2BI delivers files to WebSphere MQ. By default it should be named SFGWMQFTECreateTransfer. If by any reason it is practical to use another name, that has to be edited in the filegateway.properties file, or preferably in customer_overrides.properties where the adapter name is set.
Go to Deployment -> Services -> Configuration and create a new instance of the WebSphere MQ File Transfer Edition Create Transfer Service.
Add the Queue Manager.
Add MQ Server and Port Number.