Scenario: Sometimes BPEL application need to send out the email alert to let people know what’s the detail error information, then people can analysis the root cause. But if your sync bpel application got an error and bpel throw the exception in Error Handler, it will cause the global transaction rollback, so email will not be triggered to send out.
Solution: to resolve this issue, need to create a new BPEL (child bpel) to invoke the notification service, and use the transaction property in composite.xml to make sure this child BPEL have a new transaction context so that it won’t rollback even if the global transaction failed.
<property name=”bpel.config.transaction” many=”false” type=”xs:string”>requiresNew</property>