Oracle SOA Top 20 File / FTP Adapter Interview questions & answers

The blog provides the commonly asked Oracle SOA File  Adapter / FTP Adapter Interview questions & answers to be helpful for beginners and experienced professionals.

1) what is the major difference between File Adapter and FTP Adapter ? 

File Adapter integration is useful when performing file operations from /to the local file system.

FTP Adapter integration is useful when performing file operations from /to the remote  file system

2) What are the operations provided by File Adapter ? 

 File Operation Name   File Operation Description
Read File  Inbound Operation
Write File  Outbound Operation
Synchronous Read File Outbound Operation
List File Outbound Operation

3) What are the operations provided by FTP Adapter ? 

 FTP Operation Name   FTP Operation Description
Get File  Inbound Operation
Put File  Outbound Operation
Synchronous Get File Outbound Operation
List File Outbound Operation

4) What are the file formats supported by File Adapter / FTP Adapter ?

The Oracle File and FTP Adapters can read and write the below given file formats

  1. XML (both XSD- and DTD-based)
  2. Delimited
  3. Fixed positional
  4. Binary data
  5. COBOL Copybook data

5) Does File Adapter / FTP Adapter supports Native format ?

Yes, File Adapter / FTP Adapter supports native format as opaque objects (such as Jpgs and GIFs)  and pass the contents in their original format without performing transformation.  

6) Describe the common File Adapter Inbound parameters in the .jca configuration ? 

<adapter-config name="fileInboundReference" adapter="file" wsdlLocation="../WSDLs/fileInboundReference.wsdl" xmlns="http://platform.integration.oracle/blocks/adapter/fw/metadata">
<connection-factory UIincludeWildcard="cust*.txt" location="eis/HAFileAdapter"/>
<endpoint-activation portType="Read_ptt" operation="Read">
<activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property name="PhysicalDirectory" value="C:\tmp"/>
<property name="UseHeaders" value="false"/>
<property name="MinimumAge" value="0"/>
<property name="Recursive" value="true"/>
<property name="PollingFrequency" value="60"/>
<property name="DeleteFile" value="true"/>
<property name="IncludeFiles" value="cust.*\.txt"/>
</activation-spec>
</endpoint-activation>
</adapter-config>

7) How single Threaded Model is supported in File Adapter / FTP Adapter ? 

The File /FYP Adapter used the global pool of processor for executing file processing.  The single Threaded Model modifies thread execution by not using the default pool processor and allows poller thread to process the file in the single running thread. The below configuration can be updated in the File / FTP Adapter .JCA file.

<activation-spec className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property../>
<property name="SingleThreadModel" value="true"/>
<property../>
</activation-spec>

8) How Partitioned Threaded Model is supported in File Adapter / FTP Adapter ? 

The partitioned thread model is the modified thread model which allows each composite application to use in-memory queue in the partitioned form. The below configuration can be updated in the File / FTP Adapter .JCA file.

<activation-spec
className="oracle.tip.adapter.file.inbound.FileActivationSpec">
<property../>
<property name="ThreadCount" value="4"/>
<property../>
</activation-spec>

9) What are the available File Polling Options ?

The Oracle File / FTP Adapter provides the below polling configurations

  1. Polling Frequency: Define the time after which File / FTP Adapter check for polling the file.
  2. Minimum File Age : The Oracle File / FTP Adapter reads the file which are older than the minimum age value (determined by the last modified time stamp)  in the directory. This option is useful when large file which take 3-4 mins to be copied are to be polled for processing . In that case, Minimum file Age is to be set as 5 mins so that such files can be read without failure.
  3. Use Trigger File: The Oracle File / FTP Adapter starts file polling when specified file is available in the local or remote file system. 

Consider an example where BPEL Process1 writes the file into the directory and BPEL Process2 read those files for processing.  In this case, trigger file option could be useful.

File Adapter Polling Configuration

10) what is the difference between Physical Directory and Logical Directory in File / FTP Adapter  processing ?

Physical Directory Path:
1. requires the full directory path from where the file is to be picked for polling.

2. requires manual change in the directory path when deployed to different environments.

Logical Directory Path:

  1. can provide logical name and path value in the composite.xml
  2. logical path can be change from em console.
  3. can replace the logical path in case of deployment to different environment using Config plan.

11) What is the difference between Read and Sync Read operation

in File / FTP Adapter  processing ?

Read Operation: The File /FTP Adapter uses Read operation for polling the file to read its content. 

Sync Read Operation:  The File /FTP Adapter uses SyncRead operation to read the file in between the flow when requires to perform Synchronous communication

12) Does File Adapter / FTP Adapter supports polling from multiple directory ?

Yes, polling from multiple directories is supported by File / FTP Adapter in a single activation for both Physical and Logical Directory Path. The multiple directory can be set during design time using JDeveloper. 

13) Is File Adapter / FTP Adapter  transactional and non-transactional adapters ?

Transactional Adapters: Database Adapter, JMS Adapter, AQ Adapter, MQ Adapter
Non- Transactional Adapters: File Adapter, FTP Adapter

14) what is File Debatching Process in File / FTP Adapter ? 

The File / FTP Adapter allows to read multiple messages in a file using Debatching which provides the option to to publish messages in a specific number of batches.
During Debatching, the file reader, on restart, proceeds from where it left off in the previous run, thereby avoiding duplicate messages. 

16) Can we append to existing file using File / FTP Adapter ? 

Yes.

16)   File / FTP Adapter allow to read the file without reading its content?

Yes, File / FTP Adapter provides the option for the Read operation. 

Select Operation: Read

Select Check box:  Do not read the file content

File Adapter Read Operation

17)  What Inbound Header metadata is published by File Adapter in the Inbound Service ?

The File Adapter publishes the below given inbound metadata as part of Inbound Header

File Adapter Inbound Header  Inbound Header Description 
jca.file.FileName name of the file
jca.file.Directory directory name for the file
jca.file.Batch indicates unique batch name in case of debatching
jca.file.BatchIndex indicates batch index for each message within the batch for debatching
jca.file.Size size of the file
jca.file.LastModifiedTime last modified time for the file

File Adapter Inbound Header Metadata

18) Provide the steps to specify the dynamic outbound directory name ?

  1. Create the File Adapter Read operation using the Adapter Wizard in JDeveloper
  2. Provide the Physical Directory name as C:\ReadFileDir
  3. Double-Click Invoke Activity
  4. Select Browse Variables -> Variable Choose Dialog 
  5. Select Create an Object icon 
  6. Create Variable newOutboundDir, type xsd:string
  7. Now drop Assign Activity between Receive and Invoke Activity
  8.  Perform Copy Operation, Select Expression and set the value as C:\ReadFileOutDir
  9. Now Select Invoke Activity -> Properties 
  10. Select jca.file.Directory and set value  as newOutboundDir and Type as input

19) Provide the steps to specify the dynamic outbound file name ?

  1. Create the File Adapter Read operation using the Adapter Wizard in JDeveloper
  2. Provide the Physical Directory name as C:\ReadFileDir
  3. Double-Click Invoke Activity
  4. Select Browse Variables -> Variable Choose Dialog 
  5. Select Create an Object icon 
  6. Create Variable newOutFileName, type xsd:string
  7. Now drop Assign Activity between Receive and Invoke Activity
  8.  Perform Copy Operation, Select Expression and set the value as customer.txt
  9. Now Select Invoke Activity -> Properties 
  10. Select jca.file.Directory and set value  as newOutFileNameand Type as input

20) Does Debatching support native format and XML ?

Yes , debatching support boith XML and native format for multiple message processing.

21) What is ChunkedRead feature in File / FTP Adapter?

The File / FTP Adapter allows processing of large files using the ChunkedRead feature which uses an invoke activity within a while loop to process the target file. File processing using ChunkedRead  does not throw an exception in case of Invalid Payload and the return header contains the translation exception message indicating the line and column where error is encountered in the below given header fields

  • jca.file.IsMessageRejected
  •  jca.file.RejectionReason
  •  jca.file.NoDataFound

22) Explain UseStaging property in File Adapter / FTP adapter?

The UseStaging property can be set in the File Adapter / FTP Adapter .JCA File.

If UseStaging property set to true, then 

  1. The Oracle outbound File Adapter / FTP Adapter writes data to staging file.
  2. Streams the Staging File data to the Target File

If UseStaging property set to false, then outbound File Adpater / FTP Adpater does not use staging and transfers the file from source file location to target file location