File Listing in File Adapter

By | January 30, 2014 | 0 Comment

We can do multiple things with file adapter and one of it is file listing. It is used to list all the files that are there in the directory.

In this post, we will show you how to use this option inside file adapter.

We have created three files under C:\tmp directory. We will use file adapter “File List” option to list all these files.

FileListing_Location

First create one-way BPEL process and after that add one file adapter. Name it and click on next.

FileListing_Adapter

Choose “List files” option as we will list all the files using this option.

FileListing_ChooseOption

Specify the directory path from where we need to list all the files. Also specify File name pattern.

FileListing_FileName

Once you are done with file adapter creation then wire your BPEL process with file adapter.

 

FileListing_composite

Inside BPEL process, link your Invoke activity to file adapter and create input & output variables.

FileListing_BPEL

Deploy your composite and test it. You should be able to see list of all the files available at that location.

FileListing_Testing

 

Sample code can be downloaded from below.

FileListingSampleProject

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *