I have microflow button that generates a Task from a process, lets call it Process A, Task then generates a Questionnaire (Questionnaire from the App Store). Each process should only have one Task, thus one Questionnaire. The microflow button settings are set to Call type Synchronous, with a Blocking Pop-up (to prevent multiple clicks). I also have a validation check that when a user clicks the button after the task has been generated - then show an error msg. So it doesn't seem like the users are clicking the button more than once, however I'm getting duplicate Tasks and Questionnaire combinations. Sometimes more than 2. I noticed that when this occurs, it takes a significant time to create the questionnaire from when the task is created, typically this takes 2-3 seconds from when the user clicks the microflow. This is what I noticed on a duplicate record: 1st Task Created: 12:36:59 PM, Questionnaire Created:12:44:34 PM 2nd Task Created: 12:39:55 PM, Questionnaire Created: 12:44:45 PM As you can see the 2nd task was created prior to the completion of the microflow for the first task, which was 12:44:34 PM. Have you guys see this type of behavior?
The user could click twice very quickly. You can always do a check at the end of your microflow to see if there is an entry in the db that is not itself.
Checking for these concurrency issues at the beginning of a microflow might not work since it is milliseconds or less in between actions, whereas if the microflow lasts several seconds, checking at the end will give you a smaller margin of error.