Tuesday 6 December 2016

Save A Processed File On An Archive Directory

Archiving a file when using FTP Adapter is very important. From some reason a file might be poled but not processed.
To overcome it, there is an option to save a backup file, after the file was polled.
When using FtpAdapter, you can choose to save a backup file on the remote FTP server, or on the local server.
In this post I will explain how to do it.
First option – Save the file on the FTP server
Follow the next steps:
  1. Create an archive directory on the remote FTP server.
  2. A property on the FtpAdapter called UseRemoteErrorArchive is by default set to true.
    If from any reason it’s set to false, just change it (on the .jca file as being described in the next point)
  3. Add the property PhysicalErrorArchiveDirectory and put the full path of the archive file directory you created on point 1.
    There are 2 ways to do it:
    First way: On the EM right click your process name (under soa-infra/”partition name”) -> Choose “Service/Refernece Properties” -> Choose your Service name(The name of the
    FtpAdapter) -> Go to Properties tab-> Click Add -> Choose PhysicalErrorArchiveDirectoryand put in the value the directory path -> Save.
    Second way: Go to your project on the JDeveloper -> Enter the file “FtpAdapter name”.jca -> Add the property as follows:
     <property name=”PhysicalErrorArchiveDirectory” value=”/archive”/>Redeploy the project 
Second option – Save the file on the local server
Follow the next steps:
  1. Create an archive directory on the local server
  2. Add the two following properties –  UseRemoteErrorArchive, PhysicalErrorArchiveDirectory and set them as follows:
    <property name=”UseRemoteErrorArchive” value=”false”/>
    (Can be set only from .jca file as described in First option point 3)
    <property name=” PhysicalErrorArchiveDirectory ” value=”/archive”/>
    (Can be set in both ways as described in First option point 3)
  3. Save and Redeploy your project

No comments:

Post a Comment