restricting the user working on the same form related to record related actions with two different browsers

Hi,

I've this task where user has to  enter the details in the form that is related to Record Related Actions so that second user should not be allowed to work on the same form while the first user is working on it.here two users has two different browsers. so, the second user should get an error message that displays "this form is currently opened in another browser". (And it should be applied to single user as well instead of multiple users)

explanation with the proper example would be helpful. 

Thanks,

Phani

  Discussion posts and replies are publicly visible

Parents
  • The best way to address this use case is through pessimistic locking: https://community.appian.com/w/the-appian-playbook/196/data-locking-strategies#pessimistic_locking

    Essentially you would add a boolean flag called "isEditing" or something like that to data you plan to update. Then, whenever a user launches a form to update data, you would update the flag value to true first before displaying the form. Once this value is set to true, you can include either include a visibility expression on your related action button to check if the value is true or use a gateway in your process model to redirect to a different form if the value is true.

    That being said, I would suggest thinking about how likely this scenario is (and what is the impact of having multiple users edit at the same time). If you expect this to happen very infrequently, it may not be worth the design effort. There is work involved with setting up the extra data write and you will have to decide how to account for some edge cases too. For example, suppose that user A launches the form and becomes distracted and forgets about the task. Now the data has been locked and user B cannot edit, even if it has been multiple days after user A started the related action. To account for this case, you may need a timer in a process to release the lock after a certain time if user A does not complete the task.

Reply
  • The best way to address this use case is through pessimistic locking: https://community.appian.com/w/the-appian-playbook/196/data-locking-strategies#pessimistic_locking

    Essentially you would add a boolean flag called "isEditing" or something like that to data you plan to update. Then, whenever a user launches a form to update data, you would update the flag value to true first before displaying the form. Once this value is set to true, you can include either include a visibility expression on your related action button to check if the value is true or use a gateway in your process model to redirect to a different form if the value is true.

    That being said, I would suggest thinking about how likely this scenario is (and what is the impact of having multiple users edit at the same time). If you expect this to happen very infrequently, it may not be worth the design effort. There is work involved with setting up the extra data write and you will have to decide how to account for some edge cases too. For example, suppose that user A launches the form and becomes distracted and forgets about the task. Now the data has been locked and user B cannot edit, even if it has been multiple days after user A started the related action. To account for this case, you may need a timer in a process to release the lock after a certain time if user A does not complete the task.

Children
No Data