Concurrency Lock
Usage
The "Concurrency Lock" action in the Control Flow category for Zenphi ensures that only one instance of a specified action is performed at any time, across all flows. This is useful for preventing conflicts, especially when multiple workflows might be triggered simultaneously, and ensures that critical processes are not run in parallel. By setting a lock, you can control the execution of actions to avoid errors and maintain data integrity in your workflows.
Fields
- Lock Name
This field requires a unique name for the lock. The name will be used to identify and apply the lock across all flows. For example, you could name the lock "EmailProcessingLock" if you want to ensure that only one instance of the email processing action runs at a time. - Lock Timeout (minutes)
Set the timeout duration for the lock, specifying the number of minutes it should remain active. This timeout period defines how long Zenphi will wait before releasing the lock if the action has not completed. The value must be between 1 and 60 minutes. For example, if you set the timeout to 15 minutes, the lock will stay active for 15 minutes before automatically releasing, allowing another instance of the action to run.
Demonstration on how to use it in a flow
1.Drag and drop Concurrency Lock action into the flow.
2.The Name section is pre-filled by the action name but you can configure this section according to your preference.
3.Click the gear icon to open its settings.
- Lock Name
Enter a unique name for the lock in this field. This name will help identify the lock across different flows. For example, you might use "DataSyncLock" to ensure that only one instance of the data synchronization process can run at a time. Make sure the name is descriptive and specific to the action it is locking. - Lock Timeout (minutes)
Set the timeout duration in minutes for the lock. This value determines how long the lock will remain active before being released. For instance, if you want the lock to stay active for 10 minutes, enter 10. This means the action will remain locked for 10 minutes, preventing other instances of the same action from running during this time.
After filling in these fields, you can proceed with the rest of the flow. When the flow is executed, the lock will ensure that only one instance of the action is running at a time, according to the specified timeout.
Conclusion
The "Concurrency Lock" action is an essential tool for controlling the execution of actions in Zenphi workflows, ensuring that only one instance of a specific action runs at a time across all flows. By setting a unique lock name and a timeout period, you can avoid conflicts and ensure smoother workflow execution, especially in processes that require exclusive access or sequential execution.
Updated 15 days ago