Explicit transaction management

Hi,
please help me in the below issue

the flow is as below:

starttransaction for serviceA
sequence(main)
sequence(try)
Invoke ServiceB
Invoke adapter service
invoke adapter service
commit transactionA
sequence(catch)
RollBack transactionA

Starttransaction for serviceB
sequence(main)
sequence(try)
Invoke adapter service
Invoke adapter service
commit transaction for serviceB
sequence(catch)
RollBack transaction for transactionB

If some error occred in adapterservices invoked by A, will the transactions that happened in service B roll back or not?

Thanks,
Rajasekhar

I suspect at run-time you won’t get that far. In B when startTransaction is called I believe it will fail with “already in parent transaction.”

It may work if the ID passed to startTransaction in B is the same as in A. Then they will be treated as a single trans. I think. You’ll want to extensively test.

I usually try to avoid nested transactions such as this.

No i don’t think trans in B can rollback.Yes try with same ID used in trans A and pass to B.And I do agree with Rob avoid nested transactions.

Also put Exit step - Signal on Failure in both the catch blocks to rollback (explicit transactions) and try to test it.

sequence(catch)
getLastError
RollBack transaction
Exit (Signal on Failure)

HTH,
RMG