Hi All,
I had been working on an interface recently which will call a stored procedure from BPEL. The high level component diagram is as below
HTTP Service -> BPEL Process -> 1. DB_Adapter_1 (invokes a StoredProc), 2. DB_Adapter_2 (invokes a StoredProc)
The BPEL service invokes 2 DB adapter one after the other in a same global transaction. I had also implemented the rollback for this service which will throw a bpelx:rollback error when something wrong happens in the service. In one particular instance, when DB_Adapter_2 is throwing some business exception, I need to rollback the changes made by DB_Adapter_1. Since i throw a bpelx:rollback, I expect this to happen automatically, but I can see that it doesn't. When I looked at the Stored Proc coding (invoked by DB_Adapter_1), I can see that there is a commit statement at the end of execution. so I am thinking if this could be the reason why the rollback is not successful? Can someone please help me out on the transaction management between Stored Procedures and BPEL process?
My environment
Oracle SOA suite - 11.1.1.7
Database - Oracle Database 11g / 12c
Weblogic - 10.3.6
My settings on the BPEL service and DB adapters
BPEL Process
bpel.config.oneWayDeliveryPolicy = sync
bpel.config.transaction = required
SOA DB adapter - <property name="GetActiveUnitOfWork" value="true"/> for both the adapters.
Data source - configured as XA
DB adapter - updated to allow XA transaction.
All changes updated and restarted on the DB adapter.
Regards,
Balaji