We would like to use Smart Service to delete records from the DSE (Data Store Entity) and create records according to the input received from the screen.In this case, will the Delete and Write transactions be separated?For example, if Write after Delete fails for some reason, I would like the Delete transaction to rollback.
Please let me know if there is a way to execute Delete and Write in the same transaction on Smart Service.
Discussion posts and replies are publicly visible
You have to use two different services for the same. For your use-case, you can create a process where you always keep a backup of what was deleted and what was inserted so you can insert the deleted ones and delete the inserted ones if the process fails.
Thank you for your reply. I'm thinking about query database, what about this?
Query Database smart service? Why you want to use that?
My question is just one of the examples. We have multiple tables that need to be deleted or written at the same time. We've been thinking about Write to Multiple Data Store Entities but it seems to only allow writes, not deletes. So we have to separate delete and write in two. Then the deleete operation will not be recovered even if the later performed write operation fails. So I'm considering using Query DataBase to do both in one node. When one of the tasks in the node fails it returns an error and all the tasks in the node are not executed.