cancel
Showing results for 
Search instead for 
Did you mean: 

File Processing - Order Possible?

sendhil_kumar
Active Participant
0 Kudos

Hi,

I have an interface, Bank sends Acknowledgment file and a Response file and places it in the same folder. Is there way I could manage in PI, so that ACK file runs first and then the response file? Would I have to introduce BPM ? Or some other way, I could acheive this.?

Please suggest.

---

Sendhil

Accepted Solutions (1)

Accepted Solutions (1)

former_member187587
Contributor
0 Kudos

As there is a business connection between these two files a ccBPM is mandatory.

you will define a Convoy pattern where the 1st file will be processed by PI and open a new ccBPM ,wait for a condition to be completed based on common keys coming from the 2nd file.

sendhil_kumar
Active Participant
0 Kudos

Hi Gisis,

Yes, ccBPM is an option we considered to go with. However, I was trying to find any other available options.

I would have to go with the BPM option if other way around is not found.

Thanks.

--

Sendhil

former_member182412
Active Contributor
0 Kudos

Hi Sendhil,

Are you using File or SFTP adapter in sender side?? If you used SFTP adapter then you can pick up both files at a time using additional files option like below. if response file is not available then PI will not pick up ACK file, PI will pickup only if both files available in the directory.

Regards,

Praveen.

former_member187587
Contributor
0 Kudos

Sendhil,

There might be a different solution for your needs...

What type of messages are you using there? SWIFT?X12 ? proprietary?

sendhil_kumar
Active Participant
0 Kudos

Hi Praveen,

I am using File Protocol and I am able to pick the files, I am looking for the order of the files to be processed. Like if there is a way to process files based on timestamp or such?

--

Sendhil

sendhil_kumar
Active Participant
0 Kudos

Hi Gisis,

I am using file of format pain.002.001.03.

former_member187587
Contributor
0 Kudos

Basically an Ack message is technical in nature and indicates the success\failure of your first message to the partner. later a confirmation message is send from the partner with an Applicative Ack. that contains busness data like confirmation number etc..

And so there is basically no meaning for the technical Ack getting back to the sender before the applicative confirmation message. especially we are dealing with A-sync. processes.

So first you will need to answer : is there a technical\applicative need or limitations for not sending the Confirmation message back before the Ack?

iaki_vila
Active Contributor
0 Kudos

HI Senhil,

You can pick the files by date:

Regards.

sendhil_kumar
Active Participant
0 Kudos

Ack will have the ID and status "Received" by Bank.

Response will have the ID and the Post processing status from Bank either Accepted or Rejected.

In ideal case, there would not be any specific reason to get the ACK file if the response file is received immedietely.

ECC will process the payment info for which the status is blank.

In cases if the response file is not received or delayed in processing, then there are chances that the ECC would send the payment orders which is already sent.

former_member187587
Contributor
0 Kudos

So there is really no applicative limitations for your scenario..

Ack. will be send immediate ,confirmation message will take some time.

Just set you file adapter to a very short poll interval.

Regarding processing order by date this is not relevant as your bank is not maintaining order of files when they are written so there might be cases where the date and time of the Confirmation message will be earlier then the Technical Ack.

sendhil_kumar
Active Participant
0 Kudos

Yeah, Bank agreed that the Ack file will be sent first and then the response file will be sent.

I would try with Iñaki Vila suggestion, but instead of By Date, By Name would work in my case.

Yet to test with this option, will do a test and share the results.

If you foresee any hinderance that may occur please suggest

former_member187587
Contributor
0 Kudos

there is a caase you will still face the same dillema for exampel when

you send 100 messages, get 100 imidiate Ack . and at the same time 2 Applicative confirmations....then you will have "Race condition" between a process that take long time to one that ends after a short time and you will end up with Confirmation before Ack.

Integration patterns are addressing most of the integration chanllanges...and convy is the one needed if order is truly needed.

sendhil_kumar
Active Participant
0 Kudos


Thanks Gisis. Considerable point. I would talk to Bank and explain this case and decide on it.

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos
sendhil_kumar
Active Participant
0 Kudos

Hi Iñaki Vila,

Thanks for the solution. This solution specified there would run the response file if Ack file is available in the folder, but will that also take care that ACK file would be processed first and then the Response file processed.

Also the file name would be of format ACK_DocName.xml and RESP_DocName.xml.

Having said that, it might have multiple ACK and RESP file at a time.

Can you please suggest how should the channel configuration be designed.

--

Sendhil

iaki_vila
Active Contributor
0 Kudos

Hi Shendil,,


ACK file would be processed first and then the Response file processed.

Check Praveen's answer in this thread . You can assure the order at runtime of the two files.

Regards.

sendhil_kumar
Active Participant
0 Kudos

Hi Inaki,

The flow of this scenario is:

ECC would send Payment file to Bank (Seperate flow - Not in this flow)

Bank would first send the Acknowledment saying the file is accepted.

Once the file is processed bank would send another file (Response) with either Accepted or rejected status. (Response file would be recieved immedietely after Ack file)

Both the files follow the standard format pain.002.001.03.

I have one interface able to handle both the files and one receiver, how can the order at runtime be acheived here? Can you please suggest.

--

Sendhil

iaki_vila
Active Contributor
0 Kudos

Hi Sendhil,

As far as i know file receiver doesn't support application ack, i suppose the bank will write an empty file with the confirmation or you will need to do a scenario to process it (File/FTP Adapter Overview - Advanced Adapter Engine - SAP Library).


I have one interface able to handle both the files and one receiver, how can the order at runtime be acheived here?

You can do a OS batch to assure the two files are present and later follow

sendhil_kumar
Active Participant
0 Kudos

Hi Inaki,

Bank is the sender. Sorry If I was not clear in the first place. PI is picking file from Bank.

Bank (File) --> PI --> ECC (Proxy)

--

Sendhil