Get a lock on a Connection to prevent multiple instances of a Workflow from running simultaneously
220.127.116.11 Initial Release
18.104.22.168 Added timeout property
Type: Connection Input
The Connection does not have any properties. The Connection should be named according to the process on which the mutex should be applied, and the Workflow(s) that act on that process should use a Mutex Node with this Connection.
Type: Int32 Input
This is the timeout on the that the current node should consider the existing lock as stale. If the timeout is zero, the existing lock will never be considered stale.
When a lock is added with a timeout of 10 seconds, and a second workflow try to obtain a lock an hour later with a timeout of 2 hours, it will fail because the current lock is less than 2 hours, so it is not considered stale by the current node.
When checked, the current lock will be released regardless of the TimeoutSeconds
The Mutex Node will get a lock on the Connection for the specific Environment that the Workflow is running under when it is first run. When the processing is done downstream from the Locked output, the Node will execute again, and this time the Released output will fire.
When a second instance of the Workflow is executed while the Connection is locked, the Node will error.
On version 22.214.171.124 a lock will be considered stale after 1 hour
See https://flowgear.me/s/GAsOHfO for an example workflow