Class WorkflowTimerProcessor
OptimaJet.Workflow.Core.Runtime.Timers.WorkflowTimerProcessor
Provides timer processing for workflow runtime instances.
Namespace: OptimaJet.Workflow.Core.Runtime.Timers
public class WorkflowTimerProcessorConstructors
public WorkflowTimerProcessor(WorkflowRuntime workflowRuntime, CancellationToken token) #Initializes a new instance of the WorkflowTimerProcessor class.
Parameters
Name
Type
Description
workflowRuntimeWorkflowRuntimeWorkflow runtime used to execute timer actions and update process state.
tokenCancellationTokenCancellation token observed while processing timers.
Methods
public Func<Task> GetTimerProcessorAsyncAction(IGrouping<Guid, WorkflowTimer> timersGroup) #Creates an asynchronous delegate that processes all timers in the specified group.
Parameters
Name
Type
Description
timersGroupIGrouping<Guid, WorkflowTimer>A collection of workflow timers grouped by root process identifier.
Returns
Type
Description
Func<Task>A delegate that can be executed to process all timers in
timersGroup sequentially.Remarks
The returned action orders timers by WorkflowTimer.NextExecutionDateTime, locks each timer before execution, executes it through the runtime timer execution flow, and then removes the timer or resets process state as needed.