Restrict Multiple Users from Running the same Flow

Hi,


We are currently working with a Flow where data is manipulated throughout. Because of this, we only want to allow only one user to run this Flow at a time. Is there a way to accomplish this? We are on version 8 of Decisions.

Comments

  • Hi there,


    I would be glad to help you out here.


    To restrict multiple users from running the same Flow in V8, we can take advantage of a few of the Object Lock Services Steps found in Internal>Internal Services>ObjectLockService.


    We can use the following Steps in the same configuration to restrict only one user to run the respective Flow:


    The "Is Locked" Step will check if the Flow is currently locked. This Step takes in one input value (object id), which in this case would be the Flow ID of the respective Flow you are attempting to lock.


    If the Flow is not locked, the False path will be followed, and the Flow will be locked using the "Lock Object" Step. Specify the amount of time you would like the Flow to be locked using the "lock For Time" input. Note: An object cannot be locked for more than 1 hour.


    After the lock has been placed, the logic for the Flow can be processed. After the process logic has been completed, the lock can be released using the "Release Lock" Step. This Step also takes one input, which in this case is again the Flow ID of the Flow you want locked.


    If the Flow is locked, the Flow will follow the True path, and no logic will be processed. You can choose to place a popup message here to notify users that a user is currently running the Flow.


    Hope this helps!


    -Cody

Sign In or Register to comment.