Oracle Application Server 10g Release 10.1.3.4 onwards and 11G includes the following new features for the File and FTP adapters.
To MOVE, COPY , RENAME and DELETE a file using File/FTP Adapter follow below steps
1. Create File/FTP adapter.
2. Select the Operation Type as "Write" and Override the default operation Say "RenameFileService".
3. Select the directory and file name for the incoming files.
4. Select the message Schema as "Native".
5. Click on Finish.
6. Create an Invoke activity in your BPEL for the Adapter you have created.
7. Open the Adapter WSDL and modify the JCA Operation as below
<jca:operation InteractionSpec="oracle.tip.adapter.file.outbound.FileIoInteractionSpec"
SourcePhysicalDirectory="<Source Directory Path>"
SourceFileName="<Source File Name>"
TargetPhysicalDirectory="<Target Directory Path>"
TargetFileName="<Target File Name>"
Type="MOVE">
</jca:operation>
Note: For renaming a file keep the source and target as same directories.
On invoking the above adapter the file name will be renamed from <Source File Name> to <Target File Name>
Note:The above interaction Spec is not supported in JDeveloper 10.1.3.3 and 10.1.3.4 but supported at runtime. To MOVE, COPY , RENAME and DELETE a file using File/FTP Adapter follow below steps
1. Create File/FTP adapter.
2. Select the Operation Type as "Write" and Override the default operation Say "RenameFileService".
3. Select the directory and file name for the incoming files.
4. Select the message Schema as "Native".
5. Click on Finish.
6. Create an Invoke activity in your BPEL for the Adapter you have created.
7. Open the Adapter WSDL and modify the JCA Operation as below
<jca:operation InteractionSpec="oracle.tip.adapter.file.outbound.FileIoInteractionSpec"
SourcePhysicalDirectory="<Source Directory Path>"
SourceFileName="<Source File Name>"
TargetPhysicalDirectory="<Target Directory Path>"
TargetFileName="<Target File Name>"
Type="MOVE">
</jca:operation>
Note: For renaming a file keep the source and target as same directories.
On invoking the above adapter the file name will be renamed from <Source File Name> to <Target File Name>