I have a process definition, I am submitting a form from drupal to the process definition. The issue is, I get a curl timeout error when I submit the form as the process is not commited to the database until the end. I suppose the whole process runs in memory and there is a long running operation in my process definition. So the form submit does not get a response for 30 sec and it gets timed out.
I have tried to put Async before in the start process, I do not get the curl timeout error now, but all my scripts in the process is executed more than once.
Could someone please help me with this. I want the process instance to be created as soon as the form is submitted and I do not want my tasks in the process to run more than once.
The job executor which runs an async continuation will typically lock a job for 5 minutes. If the job has not completed after 5 minutes, the job executor may assume that the prior attempt failed and thus it may acquire and initiate the job again. This can explain why your tasks get run more than once.