Table of Contents

Class HangfireStepEnvelope

Namespace
FlowOrchestrator.Hangfire
Assembly
FlowOrchestrator.Hangfire.dll

The single argument of a Hangfire step job: identifiers, the step's resolved inputs and its scheduling data — nothing else.

public sealed class HangfireStepEnvelope
Inheritance
HangfireStepEnvelope
Inherited Members

Remarks

Before 2.0 a step job carried the whole IExecutionContext and IStepInstance as interface-typed arguments, so Hangfire's Newtonsoft.Json argument store wrote $type metadata for them, the trigger body and headers travelled twice (once on each object), and any user payload value was deserialised under the job store's TypeNameHandling.

The envelope mirrors the Service Bus runtime's slim message: trigger data and headers are not carried at all — the engine re-reads both from IOutputsRepository on every step execution — and the inputs travel as one System.Text.Json string (InputsJson). Newtonsoft.Json only ever sees that string, so keys such as "$type" inside a ForEach item or trigger-derived input are inert data, never type metadata. The worker rebuilds the inputs as plain JSON-shaped CLR values (string, long, double, bool, Dictionary<TKey, TValue>, List<T>, null).

The engine's exactly-once guarantees are unaffected: the claim guard keys on (RunId, StepKey), both of which the envelope carries verbatim.

Properties

FlowId

The flow that owns the step; resolved on the worker through FlowRegistry.

public Guid FlowId { get; set; }

Property Value

Guid

Index

Zero-based loop iteration index, when the step runs inside a ForEach scope.

public int Index { get; set; }

Property Value

int

InputsJson

The step's inputs as a System.Text.Json object, or null when the step has none.

public string? InputsJson { get; set; }

Property Value

string

PrincipalId

The principal that started the run, when one was recorded on the execution context.

public string? PrincipalId { get; set; }

Property Value

string

RunId

The run the step belongs to.

public Guid RunId { get; set; }

Property Value

Guid

ScheduledTime

Wall-clock time the step was planned; feeds the queue-delay metric.

public DateTimeOffset ScheduledTime { get; set; }

Property Value

DateTimeOffset

StepKey

The step's manifest key, or its runtime loop path (e.g. "loop.3.child").

public string StepKey { get; set; }

Property Value

string

StepType

The handler type name the step is mapped to.

public string StepType { get; set; }

Property Value

string