I have a requirement where I will get a input from a service and I have to pass this input dynamically to file adapter which then retrieved the files from a location based on the input provided and passes it to other service.
I have used one receive activity for getting input parameters and other receive activity for getting files activity, but unfortunately it is not allowing me to do so. How can I design the process,
1. I will get an input from a service.
2. FA has to be invoked for getting files from location specified ( I know that dynamic values can be set inside properties tab), but confused on how to work with two receive activities.
3. And the retrieved files has to be sent to a service.
Please use the Synchronous Read option in the file adapter.
This will suit your current requirement.
1) Your first receive which will get the input from the Service.
2) Have an invoke activity into the file adapter with the synch read operation.
3) Get the file name etc from the input and set them to the properties of the invoke activity
When ever you want to read a file in middle of your bpel process then please go for synch read operation of the file adapter.
Read operation is used to poll files from a specified directory, in most cases it will be first activity(receive) of your BPEL and will create a new instance for you(else use correlation for mid process receive).
As in your case you are dynamically passing input to FA to read a specific file in mid of your process, it should be sync read operation (as suggested by Deepak) wit an invoke activity.