How to know the file name and the directory name at run time that we selected during configuring File adapter in our BPEL Process?
I will give the answer for this in step wise manner.
1) Create an empty BPEL process.
2) Create a Read File Adapters. This will create fileAdapterInboundHeader.wsdl and
3) Drag receive activity to the swim lane and link it to the read operation and create variable(choose in receive activity). Check the create instance check box.
4) Create a variable of type InboundHeader_msg, say Varaiable_1 ( this message is chosen from the fileAdapterInboundHeader.wsdl).
5) Create two more variables of simple type (String), say Test1 and Test2.
5) Drag the assign activity. In the assign activity create a copy operation you can see the Variable_1 having two elements i.e. FileName and DirectoryName. You can point these two elements to the variable Test1 and Test2 respectively.
6) Now double click on receive activity go to the "Adapter" tab and choose the above Variable_1 as the Input Header Variable.
Similarly you can do it for File Write Adapter. In this case the fileAdapterOutboundHeader.wsdl contains only one element i.e. file name.
And you are done....Now you can use that value for further operations, depending upon your needs.
Have a happy learning.....