Unable to stop the Race conditions in a process model

 When I select the items in the grid and click on the button in the background the process model should trigger, and it must complete successfully, But when I click the button instantly twice or thrice immediately another process model is triggering the items which have selected becomes duplicate in next section. So, Here race condition occurs. Actually, we tried to restrict that button not to click it a second time by the user. The problem is before writing to the DB by the first process model in the fraction of seconds processes model also. In the interface, we are passing the selected items through the start process and try to capture the output. But nothing works. Let me know is there any way to stop the race condition either in an interfcae or process model

  Discussion posts and replies are publicly visible