Thursday, July 23, 2009


Files which do not adhere to the input file schemas should be rejected or moved to specified folder other than archive folder.

For this we need to make an empty project which will be initiated by a file. We need to use a Read File Adapter. After the Adapter is configured and connected to a Receive activity, a bpel.xml file will be generated.
A property called ‘rejectedMessageHandlers’ is used and set in the bpel.xml file under <activationAgent> element.

Sample code for this should look like:
<activationAgent className="oracle.tip.adapter.fw.agent.jca.JCAActivationAgent" partnerLink="Read_File">
<property name="portType">Read_ptt
<property name="rejectedMessageHandlers">file://C:\SOADir\reject

C:\SOADir\reject is my directory where I want my rejected files to come.

Note: If at anytime you try to refresh anything in the BPEL project, this property gets omitted automatically. So be sure to add it again in bpel.xml file if you are refreshing any compomnent in the project.

1 comment:

Shirish Kumar said...

Hi Abhishek,
Thanks for a nice blog, it's very good. I have been working on BPEL quite for a while, I am facing an issue with fileadapter handlers. My scenario is I have an input CSV file, BPEL works fine if CSV is good, if there's any data issue viz blank line or missding commas in CSV entire file is rejected. So I used filehandlers in bpel.xml, but still the message is completely discarded. Can you suggest me how to handle this ? I tried to modify native XSD as well, but no use. If you have an example that would be great help to me.