Table of Contents

Class HangfireFlowOrchestratorBuilderExtensions

Namespace
FlowOrchestrator.Hangfire
Assembly
FlowOrchestrator.Hangfire.dll

Registers Hangfire as the FlowOrchestrator runtime: options.UseHangfire() inside AddFlowOrchestrator(options => …).

public static class HangfireFlowOrchestratorBuilderExtensions
Inheritance
HangfireFlowOrchestratorBuilderExtensions
Inherited Members

Methods

UseHangfire(FlowOrchestratorBuilder)

Selects Hangfire as the step-execution and cron runtime: steps become Hangfire background jobs and cron triggers become Hangfire recurring jobs.

public static FlowOrchestratorBuilder UseHangfire(this FlowOrchestratorBuilder builder)

Parameters

builder FlowOrchestratorBuilder

The FlowOrchestrator builder to register into.

Returns

FlowOrchestratorBuilder

The same builder for chaining.

Remarks

Hangfire itself is not configured here — register it as usual with services.AddHangfire(…) and services.AddHangfireServer(), which provide the Hangfire.IBackgroundJobClient and Hangfire.IRecurringJobManager the adapters use.

The runtime services are added with TryAdd, so if another runtime was already selected earlier in the same callback that runtime keeps the dispatcher slots. Also installs FlowOrchestrator.Hangfire.Telemetry.TraceContextHangfireFilter into Hangfire.GlobalJobFilters once per process so W3C trace context crosses the enqueue / perform boundary.

On Hangfire.PostgreSql job storage, a hosted check logs a warning at startup when DistributedLockTimeout is longer than InvisibilityTimeout: that storage's locks outlive a killed process, so a step whose worker died mid state change waits for the lock timeout before it runs again.