Start/Finish exclusive access: avoid infinite loop

Hi team,

The problem with such action is that you may wait infinitely if stop did not occurr, because for example the task supposed to stop enforcing access failed for whatever reason. And even if you define a timeout to your task this will not solve the problem as during the next run it will wait again.

Would it be possible to add a timeout to this action so that after timeout it forces a stop/enforce ? Like “if after n minutes enforce not possible than free resource and enforce it” so that the job can finally run. It may be possible to do that with a repeat inside module but it would be good to have a simple option in this action.

Curiousity question : how this resource is managed ? Through a variable associated to the workspace ?

Thanks for your feedback

Hi Romain,

If a workflow ends for whatever reason (failure, cancellation, success), the calculation engine should stop automatically any exclusive access that the workflow started but has not finished. Strictly speaking, stopping is optional (but highly recommended) because the engine would stop it anyway. If that doesn’t work as described, please provide more details.

Under the hood, it sets/remove a global mutex that is managed by Windows.

Ok so my post is not relevant. Well it happened recently but only once, that’s why I can still not understand. But this might be due to an unexpected stop of the server because we received an email alert about this and since this our jobs were waiting infinitely. In this case, I don’t know how, maybe you will understand better, it seems we can have such issue where resource is never available again. Maybe because jobs wait for a mutex id to return result and as the service restarted, this mutex is no longer available ?

If EasyMorph Server crashed (as a process) when exclusive access was started by one of the tasks, then it’s possible that the engine couldn’t remove the mutex from memory. In this case, the only remedy is re-booting Windows.