We have a process model which gets triggered by two different role users for same data . Both of them executes the process model with a split of second gap. Due to this, the first time process model will be running and second time also gets triggered for the same data, as the first one completes the second time process model fails and we have configured mails getting triggered for failed process model, so generating mails.
Do we have a way where when process model is running for a certain data and second user triggering the same process model for same data should not get error or second time the process model for same data should not get triggered.
Discussion posts and replies are publicly visible
I am guessing that the process is an action instead of a task that is assigned to a group (as if it was a task, the first person to pick it up would take ownership). So, here are some design considerations to try to lessen the risk of a race condition.
1. Set a DB values (flag) and a check of the flag (and 'owner') as the first step in the PM to indicate a 'lock'
2. Execute any queries on the SAIL form through a view, that only brings back data not 'locked' by the current user
3. 'Unlock' through timeout exception flows and process completion to open things back up
Hope that at least gives you some ideas to play with
© 2020 Appian. All rights reserved.