It takes a long time to change the status in Camunda

After sending the form, it takes a very long time (40 seconds) for the status to change from SAVED to TO-AUTHORIZED

After the form is saved, the process on camunda is launched and it is responsible for changing the status.
The delay is due to the camunda’s questing mechanism. The status change handler queries camunda for new tasks. If there are no new tasks, the frequency of request is decreasing by delay. The delay time is calculated based on the formula:

time = 0.5s*2^number of attempts

If the calculated time is greater than a minute, one minute is assumed. So the longer we don’t have any new tasks, the less we ask for them.
Hence, the maximum time to undertake a task (in this case, a status change) may be up to one minute.

1 Like