IBM Support

Force a test AS2 file to be sent immediately

Technical Blog Post


Abstract

Force a test AS2 file to be sent immediately

Body

Hi everyone!

 

In this blog, I write about how to force a test AS2 file to be sent immediately from your file system to your partner.  This technique is a basic tool used regularly by AS2 administrators.

 

I will also talk about a couple of problems that can occur, and how to address them.

 

I will assume your AS2 partner and relationship are already configured.  If they are not, please refer to Greg Griffith’s excellent series on how to set them up, beginning here:

 

Setting up AS2 part 1: The AS2 Organization

 

I also assume you are using the file system in your AS2 relationship.  If you have configured your partner to use a mailbox, your data will already be sent within a minute.

 

To find the directory where data will be sent to your partner, go to Trading Partners > AS2 and use the “Search Relationships” selection.  Enter your partner  name (or part of it) in the Partner field”, then select the partner name, and click on the Go button to bring up the relationship:

 

image

 

Your partner name will be listed:

 

image

 

To find the file system directory or folder, click on the “Info” button next to the partner relationship you are testing, and look for the Collection Folder:

 

image

 

Mine is deep within a directory structure on a Linux machine,

/opt/apps/GIS_INSTALLS/john/SI_4300_MSSQL/install/as2partner/John_oxnard_4300_ID/john_oxnard_52000_ID/outbound

 

My instance is installed in this directory: /opt/apps/GIS_INSTALLS/john/SI_4300_MSSQL/install

The Sterling B2B Integrator default directory for partners is as2partner

Beneath that is the directory for my Organization, John_oxnard_4300_ID

I am working with the Partner john_oxnard_52000_ID

Within that directory are directories (or folders) called inbound, outbound and error.

If I select that full directory name and copy it using CTRL-C, I can log in to the command line for Linux, using the owner ID for the Sterling B2B Integrator installation, then type cd, paste that long string into the command line by right-clicking on my mouse, and easily navigate to the directory I want:

 

cd /opt/apps/GIS_INSTALLS/john/SI_4300_MSSQL/install/as2partner/John_oxnard_4300_ID/john_oxnard_52000_ID/outbound

 

It works for Windows users, too.  If you select and CTRL-C the string you want, it will be copied to your Windows Clipboard.  You can then open Windows Explorer on the server for your Sterling B2B Integrator, then use CTRL-V to paste the address into the address bar, and hit <Enter>, and navigate directly to that directory.

 

Put a file in your outbound directory or folder.

You can create a new file in the directory or you can copy a file from another folder into that folder.  I estimate there are 92 ways (I have not counted) to get a file into a directory, depending on combinations of operating system and user preference, so I will leave this as an exercise for the user.  If there’s demand, I will write a separate blog for the subject.

 

Now you’re ready to send the file

If you have used the default settings when creating your Relationship, the system will send your data sometime within the next 5 minutes.  That is usually fine when you’re sending real data to a partner.  However, if you are testing, it can be a big drain on the day to create a file, wait 5 minutes, see if it fails, create another file, wait 5 minutes…

If you do not want to wait, read on, help is here!

 

How data is sent:

Data sent using AS2 from a file system is picked up by a scheduled AS2 File System Adapter.  You can see it if you go to Deployment > Schedules and search for your partner.

 

image

 

Do not edit it.  Click on the underlined name, and you’ll see the configuration:

 

image

 

This is the schedule used to pick up data to send.  It runs an AS2 File System Adapter, you can see that too by going to Deployment > Services > Configuration and searching for your partner.  Do not edit it, either.  Click on the underlined name to view the configuration:

 

image

 

I write in red, Do not edit.  You must not edit these configurations except within the AS2 Wizard, because you will likely get unpredictable results.  That is really important to keep in mind!

 

 

How to send data immediately

Finally, I will get to the point of this blog.

You can send data immediately by invoking the AS2 File System Adapter manually.  It will cause the data to be picked up, then sent to your partner.

 

To do this:

Navigate to Business Process > Manager, and enter the name of your partner.  You really only have to enter part of the partner’s name, enough that it is unique.  My partner is “John_oxnard_52000” so I can enter “John_oxnard”:

 

image

 

I will see every business process that matches that string:

 

image

 

I then select execution manager for the partner I want to work with.  I will see a chart of the different versions of the business process that exist in my instance:

image

 

I want the most recent one, which is also the one defined as the default.  I circled it above.

 

Click on the Execute button then this will be displayed:

 

image

 

I then click on the Go button.  (This business process executes an AS2 File System Adapter, and that is already defined to pick up data from the Collection folder that is called Outbound.

If your file was picked up, you will see an Advanced Status of 1 file(s) collected:

 

image

 

And you can examine the Instance ID for details of whether the transmission was successful.

 

You may see this error:

 

image

 

This happens because the file will not be picked up until it hasn’t been modified for 30 seconds.  If you created your file, then executed the AS2 file system adapter process too quickly, the file is too new.  Just wait a minute then click on the Execute button again, and it should be picked up.

 

You may also see this:

image

 

Step 7 is Assign Service, not the name of the AS2 File System Adapter.  This means the AS2 partner is locked.  That happens if it was being edited, but was closed without being saved or canceled.

 

To remedy this problem, navigate to Operations > Lock Manager.  Click on the Go button at the bottom:

image

 

 

Unlock any Identity or Trading Profile locks, like these:

 

image

 

Then go back to Business Process > Manager, locate your partner, go to the Execution Manager, then Execute, then the Go button to try to pick up your data again.

 

This is a long blog.  It contains information you won’t need to consider once you are used to this process.  I wanted to explain it, though, so you can have the information if you need it.

 

Please let me know if you have any questions or comments!

 

 

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SS3JSW","label":"IBM Sterling B2B Integrator"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

UID

ibm11120869