Package com.axelor.workflow.exec
Class WorkflowRunner
java.lang.Object
com.axelor.workflow.exec.WorkflowRunner
Compiles a definition, runs its graph, times it and records the outcome: the one run-and-record
path for automatic and programmatic runs. Re-entrancy and once/time state belong to the callers.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrunAndRecord(MetaWorkflow def, RecordRef record, TriggerKind trigger, WorkflowEvent event, Long episode) Compiledefand run it, for callers without aWorkflowRegistration.runAndRecord(MetaWorkflow def, WorkflowPlan plan, RecordRef record, TriggerKind trigger, WorkflowEvent event, Long episode, Long parentRunId, String subflowNode, WorkflowRunContext parentContext, MessageDelivery delivery, String callerParkKey) Run as a child ofparentRunId, forSubflowSteps.runAndRecord(WorkflowRegistration registration, RecordRef record, TriggerKind trigger, WorkflowEvent event, Long episode) Run a pre-compiled registration: the after-commit hot path.runAndRecord(WorkflowRegistration registration, RecordRef record, TriggerKind trigger, WorkflowEvent event, Long episode, MessageDelivery delivery) The same, for a run started by a message, which the walk reads asmessage.runEscapeBranch(MetaWorkflowRun hostRun, WorkflowPlan plan, String boundaryId, String next, MessageDelivery delivery) Begin a non-cancelling boundary's escape branch as a child run on the host's pinned revision, and walk it from the boundary'snext, synchronously on the firing thread.
-
Constructor Details
-
WorkflowRunner
public WorkflowRunner()
-
-
Method Details
-
runAndRecord
public WorkflowResult runAndRecord(MetaWorkflow def, RecordRef record, TriggerKind trigger, WorkflowEvent event, Long episode) Compiledefand run it, for callers without aWorkflowRegistration. -
runAndRecord
public WorkflowResult runAndRecord(WorkflowRegistration registration, RecordRef record, TriggerKind trigger, WorkflowEvent event, Long episode) Run a pre-compiled registration: the after-commit hot path. -
runAndRecord
public WorkflowResult runAndRecord(WorkflowRegistration registration, RecordRef record, TriggerKind trigger, WorkflowEvent event, Long episode, MessageDelivery delivery) The same, for a run started by a message, which the walk reads asmessage. -
runAndRecord
public WorkflowResult runAndRecord(MetaWorkflow def, WorkflowPlan plan, RecordRef record, TriggerKind trigger, WorkflowEvent event, Long episode, Long parentRunId, String subflowNode, WorkflowRunContext parentContext, MessageDelivery delivery, String callerParkKey) Run as a child ofparentRunId, forSubflowSteps. -
runEscapeBranch
public WorkflowResult runEscapeBranch(MetaWorkflowRun hostRun, WorkflowPlan plan, String boundaryId, String next, MessageDelivery delivery) Begin a non-cancelling boundary's escape branch as a child run on the host's pinned revision, and walk it from the boundary'snext, synchronously on the firing thread.
-