cancel
Showing results for 
Search instead for 
Did you mean: 

File locking mechanism using File/FTP adapter - How To?

Former Member
0 Kudos

Hi there,

I have the following requirement for one of my interfaces.

I need to implement a file locking mechanism in order to avoid any inconsistencies on the legacy side. This requirement applies to an asynchronous outbound/inbound process from SAP to legacy and vice-versa.

Before I can write or read any file from the legacy system, first I need to check whether a lock file exists on the target folder. If no lock file exists then I need to put my own lock (i.e. a dummy file with extension .LCK) so the legacy system does not write to the same file while XI is accessing it. After the file lock is set XI can proceed with the file/payload transfer. When XI finishes then the LCK file is deleted from the legacy folder. However, if the legacy system has locked the target folder, then I have to wait for lets say 5 seconds and try again until the lock is released by the legacy system.

As you can see I have to deal all the tinme with two files 1) the lock file and 2) the data to be transferred (payload)

I think this should be possible in XI using ccBPM, but how exactly I don know. Have someone here done such a scenario before? Thanks for any feedback.

Cheers,

R.

Message was edited by: Roberto Viana

Message was edited by: Roberto Viana

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Roberto,

Please check SAP note 821267 Q3.I think it will resolve the problem without using BPM.

Thanks.

Rekha.

Former Member
0 Kudos

Hi Rekha,

Many thanks for your tip, I think I can use this new feature (SP14) in the sender file adapter and for the receiver file adapter I can use the option "put File - Use Temporary File" under FTP Connection Parameters.

Thanks a lot!

R.

Message was edited by: Roberto Viana

Answers (0)