Interface IHangfireFlowTrigger
- Namespace
- FlowOrchestrator.Hangfire
- Assembly
- FlowOrchestrator.Hangfire.dll
Entry point for starting flow runs via Hangfire background jobs. Implemented by FlowOrchestrator.Hangfire.HangfireFlowOrchestrator.
public interface IHangfireFlowTrigger
Methods
TriggerAsync(ITriggerContext, PerformContext?)
Starts a new flow run from the given trigger context, enqueuing the entry steps as Hangfire jobs. Handles idempotency key deduplication when a key is present in the trigger headers.
ValueTask<object?> TriggerAsync(ITriggerContext triggerContext, PerformContext? performContext = null)
Parameters
triggerContextITriggerContextThe trigger context including the flow, trigger event, and run metadata.
performContextPerformContextHangfire job context providing the background job ID; null when called outside a Hangfire job.
Returns
TriggerByScheduleAsync(Guid, string, PerformContext?)
Resolves the flow by flowId and starts a run via its cron trigger.
Called by the Hangfire recurring job registered for the flow's schedule.
ValueTask<object?> TriggerByScheduleAsync(Guid flowId, string triggerKey, PerformContext? performContext = null)
Parameters
flowIdGuidThe flow to trigger.
triggerKeystringThe manifest trigger key (e.g.
"schedule").performContextPerformContextHangfire job context; null when called outside a Hangfire job.