Hi All,
We have an application, where users can book the seats before going to office. Currently application working like - If user A books seat 100 for Date: 20-May-2023 and user B cannot book the same seat 100 for same day Date:20-May-2023 here, if seat 100 is already booked by other user than we are not displaying the seat 100 value in dropdown.
We got one issue in production that, same seat 100 is booked by user A and B for same day 20-May-2023 at the exact time which is observed in process variable. How to handle this to avoid booking same seat for same day?
We are calling process on click of Book button, here in process model activity chaining is enabled before Write to Data store entity. My doubt is whether this activity chaining causing this issue? Please suggest if any solution is available.
Discussion posts and replies are publicly visible
Activity chaining does not cause that issue. The problem is, that two users can book the same slot at the same time when both do it in parallel. You can prevent this from happing by adding a unique constraint to the DB on the fields user and date. Then I suggest to switch to synced records. The write records node allows you to configure whether it halts on an error. Switch this to NO and handle that error yourself.
Unknown said:Activity chaining does not cause that issue.
for real - if anything it's the *solution* to this issue with a bit of creative locking-control, using any of the various methods mentioned.