Interface ISagaProcess
- Namespace
- Stratara.Sagas.Abstractions
- Assembly
- Stratara.Sagas.dll
The untyped face of SagaProcess<TState> the runtime works with.
public interface ISagaProcess : ISaga
- Extension Methods
Properties
StateType
The state type, an aggregate of the process's own.
Type StateType { get; }
Property Value
Methods
CorrelationOf(IEvent)
The correlation the fact belongs to; one process instance per correlation.
Guid CorrelationOf(IEvent @event)
Parameters
eventIEventA fact the process handles.
Returns
- Guid
The correlation id of the process instance the fact advances.
HandleAsync(object, IEvent, ISagaProcessContext, CancellationToken)
Advances the process.
Task HandleAsync(object state, IEvent @event, ISagaProcessContext context, CancellationToken cancellationToken)
Parameters
stateobjectThe folded state.
eventIEventThe fact.
contextISagaProcessContextWhere emitted events and timeouts go.
cancellationTokenCancellationTokenPropagated to the handling.
Returns
- Task
A task that completes when the step has been decided.
Handles(IEvent)
Whether the process starts or advances on this fact.
bool Handles(IEvent @event)
Parameters
eventIEventA fact from the store.
Returns
OnTimeoutAsync(object, string, ISagaProcessContext, CancellationToken)
A scheduled timeout is due.
Task OnTimeoutAsync(object state, string purpose, ISagaProcessContext context, CancellationToken cancellationToken)
Parameters
stateobjectThe folded state.
purposestringThe purpose the timeout was scheduled with.
contextISagaProcessContextWhere emitted events and timeouts go.
cancellationTokenCancellationTokenPropagated to the handling.
Returns
- Task
A task that completes when the step has been decided.