Conflicting microflows

0
Hi team, ive built a solution where a booking can be made against a slot, however, at the time of confirming the booking, by calling a microflow, if two users trigger the microflow at the same time, the booking is getting confirmed for both the users even though there is a check made in the microflow again if the slot is still available, and i have a send email action in the microflow which takes some time, without the send email action only one of the user is able to get a confirmed booking, while the other user gets a “slot already booked” message, tried various flows but doesnt seem to work, any suggestions are welcome, Thanks. 
asked
2 answers
1

You need to lock that timeslot. See for an appstore module that can achieve this or build it yourself: https://appstore.home.mendix.com/link/app/109405/Karona-Consulting/Pessimistic-Locking

Regards,

Ronald

 

answered
1

In addition to Ronald’s answer, consider moving the email process to the background using something like the Queue or ProcessQueue modules on the App Store. This will allow your main microflow to complete sooner and not have to wait for the email to be sent.

answered