Thursday, February 22, 2024

#1010 AS2 Trigger / Invoke

The use case is to receive / send pdfs over AS2. No trading partner management is required.

I begin with the receive -

Create a Trigger AS2 Connection in OIC - 


Create a Sync Integration 


The logic is simple, just write the pdf to OIC File Server.

The Trigger configuration is basic - 






























The mapping uses the function - 



The target is - 


The FTP Invoke - 
























Let's try this out from Postman - 


I also added the AS2 headers - 


I check out the activity stream in OIC - 
























I check the ftp directory/folder for the file - 

note the file name - out-3.pdf. This is not the first time I've tested this!

So the basic inbound flow works.

Now let's look at using the AS2 adapter as an Invoke - 

Here I create a new scheduled integration that lists the files in the /In folder and then invokes the receive integration I just described.

The invoke connection uses the endpoint of the receive integration - 


The scheduled integration is as follows - 


The For-Each


Here is the configuration of the AS2 invoke - 


The mapping is simple - the reference returned by the GetFile operation has to be encoded to Base64 - 













That's it - let's test!

1 file processed - 


Check out the ftp folder - 




No comments:

Post a Comment