Job acquisition order

Hi Flowable team,

In Flowable documentation, we can read how the async executor works but nothing is mentioned on the acquisition order of jobs to execute.
Reading the Flowable source code (mainly in module flowable-job-service), I have not be able to identified a specific order for job acquisition. Can you confirm that no acquisition order exists, or explain us which one is used ?

Thanks for your help,
Regards,
Christophe D.

No, there’s no guaranteed order. The query that is executed to fetch jobs is by design very simple: https://github.com/flowable/flowable-engine/blob/master/modules/flowable-job-service/src/main/resources/org/flowable/job/service/db/mapping/entity/Job.xml#L43. The reason for this is to fetch the jobs as fast as possible and minimising the chance for table scans.

Thanks a lot @joram !!

Stay healthy and safe.

Regards,
Christophe