Hello,
Unless I am mistaken, the transaction API does not support user role assignment operations.
Therefore I’m wondering how can I do to ensure consistency between my DB data and user roles?
Thank you.
Hello,
Unless I am mistaken, the transaction API does not support user role assignment operations.
Therefore I’m wondering how can I do to ensure consistency between my DB data and user roles?
Thank you.
Hi @Seb777 ,
Transaction API ensures consistency only of data in the tables of Data Service. In your case you should implement your client logic in a way in which it will be able to handle situations when during roles assignment error is occurred.
Regards, Andriy
I guess I can do something like this:
But what if transaction B throws an exception?
I will do my best but I think there will always be a risk of inconsistency.
Hi @Seb777 ,
If transaction B ends with exception then an application can retry it at least one more time and if it still ends with error - report the error to its developer. Unfortunately there is no other way. If you use Java for server code you can try to use Failsafe library to simplify handling of such situations.
Regards, Andriy