Oracle SOA Suite Online Training

Interested in learning Oracle SOA Suite 12c?
Learn from the author of this blog!
A complete and comprehensive course on the #1 platform on SOA - Oracle SOA Suite

Click here to find the complete course details
Click here to check the first session on Oracle SOA Suite 12c

================================================================================================

Dynamic Outbound Directory and FileName in File Adapters - Oracle SOA Suite 11g


Often, we'll have a requirement to change the directory to which the files are to be written dynamically. In such cases, Oracle SOA Suite 11g provides the option to do so.

While configuring a File Adapter, we specify the output directory and the file name pattern at design time.
But if we want to derive the output directory file dynamically at runtime, the process is simple.

Steps:
  1. Configure the File Adapter normally as you do for anyother one, ie., you specify a directory name and the file name pattern at design time.
  2. In the Invoke activity in the BPEL process, as you wire it to a File Adapter partner link, you get the Edit Invoke dialogue.
  3. Go to properties and configure jca.file.Directory and jca.file.FileName with values set to variables that will be populated at  runtime in some assign activity before the invoke activity.
  4. This overrides the directory and name mentioned at the design time.
  5. Note that if the filename is set to the same value at runtime again and again, the same file gets overridden. So take care to set a value that uses diff file names if you dont need the files to be overridden.

3 comments: