Package com.axelor.workflow.schedule
Class WorkflowScheduler
java.lang.Object
com.axelor.workflow.schedule.WorkflowScheduler
The engine's cluster-safe scheduler and its one threading seam. Each poll, per tenant, recovers
captures, delivers messages, recovers joins, and claims whatever is due (timer states, parked
runs and branches, approval deadlines) with a conditional update one node wins. Cost follows the
due rows, never a business table.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonStart(StartupEvent event) voidonStop(ShutdownEvent event) voidpoll()Process one batch for the current tenant.resumeAfterCommit(String parkKey) Resume the park underparkKeyonce the current transaction commits, on a worker of its own instead of the next poll.static voidsetResumeExecutorForTesting(Executor executor) voidstart()voidstop()
-
Constructor Details
-
WorkflowScheduler
public WorkflowScheduler()
-
-
Method Details
-
setResumeExecutorForTesting
-
onStart
-
onStop
-
start
public void start() -
stop
public void stop() -
resumeAfterCommit
Resume the park underparkKeyonce the current transaction commits, on a worker of its own instead of the next poll. Only a shortcut: when it never runs, the poll takes the park at the returned wake time, which stays clear of a resume already under way. -
poll
public void poll()Process one batch for the current tenant. Public for tests; the scheduler calls it per tenant.
-