Header menu logo FCQRS

Saga<'Data, 'State, 'OriginatorEvent> Type

A pure saga definition. HandleEvent is obj-based so a single saga can match events from several aggregates; ApplySideEffects returns the transition plus the commands to dispatch.

Record fields

Record Field Description

ApplySideEffects

Full Usage: ApplySideEffects

Field type: SagaState<'Data, 'State> -> bool -> SagaTransition<'State> * ExecuteCommand list
Field type: SagaState<'Data, 'State> -> bool -> SagaTransition<'State> * ExecuteCommand list

HandleEvent

Full Usage: HandleEvent

Field type: obj -> SagaState<'Data, 'State option> -> EventAction<'State>
Field type: obj -> SagaState<'Data, 'State option> -> EventAction<'State>

InitialData

Full Usage: InitialData

Field type: 'Data
Field type: 'Data

Name

Full Usage: Name

Field type: string
Field type: string

Originator

Full Usage: Originator

Field type: AggregateFactory

The aggregate the saga starts from (its commands' Originator target).

Field type: AggregateFactory

Snapshots

Full Usage: Snapshots

Field type: SnapshotPolicy

Snapshot cadence: Default (config / 30), NoSnapshots, or Every n.

Field type: SnapshotPolicy

StartOn

Full Usage: StartOn

Field type: Event<'OriginatorEvent> -> bool

Which originator events spawn an instance of this saga. Typed to the originator's event so 'OriginatorEvent is inferred from the definition — there is no type argument to remember (or to get silently wrong).

Field type: Event<'OriginatorEvent> -> bool

Type something to start searching.