Skip to Content
0
Former Member
Nov 08, 2005 at 10:28 PM

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

219 Views

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