Job Executor
The job executor runs the jobs of the process engine in background threads. The Flowable documentation calls it the async executor and describes how it works, see Async Executor.
Job Types
The process engine creates jobs for:
-
Asynchronous continuations: elements with the Asynchronous or Asynchronous leave property.
Retries and Failed Jobs
If a job throws an exception, the process engine rolls back the job’s transaction and retries the job later.
By default, a job has 3 retries.
To change the default, call setAsyncExecutorNumberOfRetries() in a process engine configurer.
To set the number of retries and the delay between them for a service task, use its Failed job retry time cycle property.
When a job has no retries left, it becomes a failed job, which Flowable calls a dead letter job. The job executor doesn’t execute failed jobs. To see, restore or delete them, use the Failed jobs tab of the process instance detail view.
Retries apply only to jobs. If an element runs in the transaction of an API call, for example, a service task that follows a user task, an exception rolls back this transaction to the last wait state and goes to the caller. See Transactions.
Job Executor Configuration
To configure how the job executor acquires and locks jobs, use the flowable.process.async.executor.* application properties.
See Configuring Async Executors in the Flowable documentation, which also explains which thread pool the job executor uses.