I read around a bit and didn’t find a solution that seems to fit
I have a scheduling app that matches people to online Zoom calls. To approve a call one user sends a request and the other needs to approve within 90 minutes since the request was sent
I blocked the ability to send a meeting request during nighttime, so that no one receives a request when they are asleep
So, every request for a meeting that is received after 21:00 is scheduled for the next day at 09:00
Now, I wish to run all of these requests with some spacing in between to prevent any double booking that might happen if someone is sending a meeting request while simultaneously being targeted by another request
I’ve seen some people recommending adding a pause in the backend workflow, but I don’t understand if that will fit my needs
You could try adding a condition to the backed workflow that checks if the user already has a pending request.
Though I would actually apply this client side. So when the requesting user attempts to send a meeting request, check if the requestee already has a pending request.
Thats a good idea and I actually do this. I block a user once he/she is being checked with
I actually fear the stituation when two backend workflows will run simultanously - is that a thing that could happen?
Logically speaking, if you run the check for pending bookings before scheduling the workflow, it should not clash. No harm in adding an additional condition to check for pending bookings and terminate the backend workflow though.
Thats a great idea which leads me to a technical question:
the “only when” condition of the backend API workflow is being checked before scheduling this workflow of after being scheduled while being executed?
I ask this because I want the workflow to be scheduled always with no exceptions, and to terminate the workflow only if the condition is met while the workflow started