Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Okahara
Last activity: 17 Jun 2018 20:54 EDT
Commit or roll back operation after update results on multiple tables
Hi,
We have multiple tables and want to commit after we make sure Pega is able to update / insert into all tables. If any of them fails for any reasons, then I want all tables to roll back. Let's say, we have following 2 classes:
Sandbox-Data-Customer (Customer table)
Sandbox-Data-Contract (Contract table)
In an activity, if I am able to update or insert into two of them successfully, I commit. If Customer table is updated but Contract table is for some reason unreachable and DML fails, then roll back.
#1. How would I implement such requirement?
#2. Does it make any difference if I am using Obj method or RDB method? In some scenario I would be using RDB method and need to make sure if it is still feasible.
Thanks,