Here’s my scenario: I need to make three or four calls to different WCF services before completing the transaction – what are my options, if any?
ServiceA.SaveWork(work1);
ServiceB.SaveWork(work2);
ServiceC.SaveWork(work3);
ServiceD.SendNotification(notification);
If one call fails, all fail… Note that these services may not be in the same domain.
Cheers!
You should be able to wrap those into a System.Transctions.TransactionScope to achieve this:
Of course, you need to make sure your WCF services don’t explicitly prevent being part of a transaction! (check out the TransactionFlow attribute – avoid the TransactionFlow.NotAllowed setting!)