Saturday, February 23, 2013

Handy File and FTP Properties

As of late I have encountered many processes that need to poll for a file. As a result I spent some time delving more into the properties available on the File/FTP adapter. What I have found isn't miraculous by any means, but there are definite uses that can arise from some of the properties. Below I have outlined a few properties that I found useful and what I used them for.

LogicalArchiveDirectory/PhysicalArchiveDirectory
One of the integration that was being developed required a scheduled process to drop a file into a directory. The integration being developed would then pick up this file and process the contents. However once the process was complete there was no file left over. For peace of mind the file is preserved, so that even if the logs and database are purged a record is still kept until the file is no longer deemed necessary.

LogicalErrorArchiveDirectory/PhysicalErrorArchiveDirectory
This option was used for much the same reason as the previous one, but in the case that an error occurred while reading the file in. If the file produced had some sort of issue then it needs to be known to fix it.

MaxRaiseSize
The property limits how many processes can run at the same time while polling the target directory. This affords the protection from using all available threads should the process responsible for placing the file go rogue. I am not a promoter of defensive programming, but in certain cases it may be deemed a necessity.

MinimumAge
This property requires that a file be of at least a certain age. This is useful to prevent a partially created file from being consumed; being particularly useful when a larger file is being written to the file system.

For these and many more properties check out the links below.


References
http://docs.oracle.com/cd/E21764_01/integration.1111/e10231/adptr_propertys.htm#CHDEDJEA
http://docs.oracle.com/cd/E23549_01/doc.1111/e15731/adapter_tech.htm#CEGDGIDF

No comments: