![]() ![]() When this queue is full (this is configurable), the job will be unlocked and re-inserted into its table. The thread pool executing the jobs uses an in-memory queue from which to take jobs. This thread will lock these jobs for the current Flowable engine and pass it to the async executor. These are jobs that are present in the table that are not locked. Similar to the thread that checks for new timers, the async executor has a thread that 'acquires' new async jobs. If the Flowable engine does not have the async executor enabled, the async job is inserted in the ACT_RU_JOB table without being locked. To do this, the async executor has a configurable thread pool from which a thread will execute the job and continue the process asynchronously. A transaction listener that fires on a successful commit of the API call triggers the async executor of the same engine to execute the job (so the data is guaranteed to be in the database). This means that the job entry is inserted in the ACT_RU_JOB table and will have a lock owner and a lock expiration time set. If the async executor is active for the current Flowable engine, the async job is actually already locked. When that happens, the timer is removed and an async job is created.Īn async job is inserted in the database during the execution of process instance steps (which means, during some API call that was made). There is a thread in the async executor that periodically checks if there are new timers that should fire (in other words, the due date is 'before' the current time). ![]() Timers are the easiest to explain: they are persisted in the ACT_RU_TIMER_JOB table with a certain due date. Two types of jobs exist: timers (such as those belonging to a boundary event on a user task) and async continuations (belonging to a service task with the flowable:async="true" attribute). For V6, the async executor has been completely refactored for optimal performance and pluggability, while still being compatible with existing APIs. ![]() The Async Executor has proved to be more performant than the old job executor by many users of Flowable and in our benchmarks.įrom Flowable V6, the async executor is the only one available. In Flowable v5, the Async executor was added in addition to the existing job executor. As such, a certain proficiency and experience with Flowable is advised to understand the topics described here. The following sections cover advanced use cases of Flowable, that go beyond typical execution of BPMN 2.0 processes. ![]()
0 Comments
Leave a Reply. |