Powered By Blogger

Friday, March 8, 2013

Ftp Adapter with BPEL Process

There are lots many blog available on Internet which show the way to use ftp or file adapter under oracle BPEL 11g. Here I am focusing on some of the important aspect which require in special conditions:
Change the file name on run time using jca.ftp.FileName properties.
During process execution we can assign the file name using "Assign" activity.Like
We can create String variable which store the file name created on run time

Now on the Invoke activity before call the ftp adapter ,We can override the jca.ftp.FileName property with newly created file name variable"ftpFileNamePoUpdate".



Get the list of file on FTP server and if file exist then put file creation on wait :
We will create the ftp adapter which will list all the file from FTP server location.Mention the ftp adapter JNDI name during the creation of ftp adapter
Select the operation type as "Listfiles" and mention the operation name as per the choice.
Mention the ftp location from where we can wants to query all the files names:
We can query all the files on ftp server location with * or we can query the specific files name like *.xml ,A*.txt etc...
Here we are calling the same created ftp adapter using invoke acticvity.
In below mention invoke activity we will create the Input andout Parameters for ftp adapter call as below:
and out put parameter:
The if condation will check here with "ftpfilename" and output comes as a result of ftp file list are equal or not.
If any of the file name which BPEL trying to create on the server and filename on the server are equal thehn the flow will goes to wait time as assign here is 8 hrs.

No comments:

Post a Comment