Sunday, 15 December 2013

Working with LIST FILE OPERATION in FileAdapter Oracle Soa 11g



 LIST FILE OPERATION

       List Files: List Files Operation lists file names in specified Locations.
     
           Create a SOA Project and provide project name as ListFiles



          As List files Operation is an outbound operation  , right click on external references select Insert-   >File Adapter.



    Provide Service Name as List Files and click on next


     Select interface as shown below and click on Next.


    Select Operation as ListFiles and click on Next.


    Browse for the folder where your files are present and click on Next.


      Provide the File Name with pattern Emp*.txt, means list all the files that are starting with Emp.



      Now, we have completed defining the file Adapter Service. Click on Finish.



    Create an XML Schema.




     Create a BPEL Process as shown below.


     Provide Name and select template as Synchronous BPEL Process, Browse for Input and Output XSD’s.


      Inside the Bpel Drag and drop Invoke activity as shown.


     Create Input and Output Variables for the Invoke activity by clicking on the “+” symbol.


     Take an Assign Activity In between Receive and Invoke and map the elements as shown.
       To trigger the service map the Input variable to invoke input variable.


     Drag and drop assign activity and place in between invoke and reply and map the elements as shown.
      Map  Size(Invoke Output variable) to no of files( Output variable).


    Now Deploy this Project. Give input as ListFiles to trigger this service.



     Below figure is the flow trace of the Listfiles project.
       Read folder has 2 files starting with Emp, we can see those 2 files with file directory, filename,



HappyLearning


                                                                                                                                   By DeepthiReddy

No comments:

Post a Comment