Q:

how to get a user confirmation in the middle of a transaction?

I've been working on a transactional services which is used as a part of core banking project. In many services, before inserting any records in my database, I should run several validation on the records. It is also true for editing the records which are already exist in the database.
But sometimes in order to update a record in an specified table, we should change records in other tables which are related to the specified table. Consequently, we need a user confirmation to change records on other tables. But the problem is I don't know how could I get a user confirmation in client while I run a transaction in the server. Is it possible to tackle this problem using sending message between client and server through rabbitMq?
I will be appreciate if any one explain any solution using clear sample.

A:

When I would need to implement this, I would do it in an other way (I do not know if this works for your scenario).

I would first let the user input his data,
then I would do a try run and check which additional confirmations are needed I would also save (in the user session) all relevant constraints that are determined while the try run
then I would ask the user for the additional confirmations determined while the try run
then I would do the real-run, and use the saved constraint checks to be save that nothing relevant has been changed meanwhile.
(If there is a relevant change in the data between try- and real-rung detected, I would apologise and start the process with step 2 again)

but this only works if you do not have so many "meanwhile changes"

