Method WaitForSignal
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
namestringSignal name; matched with
correlate.correlateExpression<Func<TData, string>>Pure selector of the correlation id from the document.
bindAction<TData, TPayload>Applies the payload to the document when the signal arrives.
timeoutTimeSpan?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.