Table of Contents

Method WaitForSignal

Namespace
Millrace.Workflows
Assembly
Millrace.dll

WaitForSignal<TPayload>(string, Expression<Func<TData, string>>, Action<TData, TPayload>, TimeSpan?)

Suspends until a correlated signal arrives, binding its payload into the document.

IWorkflowBuilder<TData> WaitForSignal<TPayload>(string name, Expression<Func<TData, string>> correlate, Action<TData, TPayload> bind, TimeSpan? timeout = null)

Parameters

name string

Signal name; matched with correlate.

correlate Expression<Func<TData, string>>

Pure selector of the correlation id from the document.

bind Action<TData, TPayload>

Applies the payload to the document when the signal arrives.

timeout TimeSpan?

Optional: after this, the wait gives up and the sequence continues.

Returns

IWorkflowBuilder<TData>

Type Parameters

TPayload

Remarks

A waiting instance holds no job โ€” only a bookmark โ€” so a workflow parked for a month costs nothing but a row (ยง6.3).

The payload type is declared here and the sender uses the matching typed overload, so shape mismatches are compile-time errors. The wire format stays plain JSON, which keeps webhook and cross-language senders possible.