Header menu logo FCQRS

EventAction<'T> Type

Defines the possible actions an aggregate or saga actor can take after processing a command or event. The type of the event payload associated with the action (e.g., for PersistEvent).

Union cases

Union case Description

DeferEvent 'T

Full Usage: DeferEvent 'T

Parameters:
    Item : 'T

Publish and fold the event in the live actor without storing it or incrementing the persisted version.

Item : 'T

IgnoreEvent

Full Usage: IgnoreEvent

Ignore the event or command completely. No persistence, publishing, or state update occurs.

PersistAllEvents 'T list

Full Usage: PersistAllEvents 'T list

Parameters:
    Item : 'T list

Persist several events from one command as a single journal AtomicWrite: all land or none do (one DB transaction in the SQL plugins), and no state update, publish or saga wake-up happens until the whole batch is durable. Versions are allocated sequentially. Atomic for THIS aggregate instance only — atomicity across aggregates is saga territory. Note the read side still projects the batch event-by-event (durability is atomic, read-model visibility is not).

Item : 'T list

PersistAndSnapshot 'T

Full Usage: PersistAndSnapshot 'T

Parameters:
    Item : 'T

Persist the event and, once it is durable and folded, immediately save a snapshot — a manual checkpoint, independent of the SnapshotPolicy cadence.

Item : 'T

PersistEvent 'T

Full Usage: PersistEvent 'T

Parameters:
    Item : 'T

Persist the event to the journal. The actor's state will be updated using the event handler *after* persistence succeeds.

Item : 'T

PublishEvent Event<'T>

Full Usage: PublishEvent Event<'T>

Parameters:

Publish the event immediately to the mediator without persisting it. The actor's state is not updated.

Item : Event<'T>

RunAsync obj

Full Usage: RunAsync obj

Parameters:
    Item : obj

Dispatch an async side effect (e.g. an AI/oracle read) as a "mini saga" without the saga's persistence ceremony. The payload is an INSPECTABLE DATA description of the effect (boxed) — NOT a closure — so `decide` stays a pure `(command, state) -> effect` function you can unit-test by asserting `decide cmd state = RunAsync (box (ClusterThemes texts))` without any runtime. The oracle lives in the runner registered at `Fcqrs.aggregateWithEffects`, which maps the description to a command; that command is sent back to THIS aggregate (reusing the originating CID) and re-enters `decide`, re-validated against current state. EPHEMERAL: the in-flight work is process state, NOT journaled. A crash, restart, or shard rebalance while it runs loses it SILENTLY — nothing re-issues it. Use this only when that loss is tolerable; when the result MUST survive a crash, use a saga (which persists its intent). TOTAL: the registered runner must map every outcome (oracle error, timeout) to a command (e.g. `ClusteringFailed`), never let an exception escape — `Fcqrs.total` helps. An escaping exception fail-fasts the process, like a throwing fold.

Item : obj

Stash EventAction<'T>

Full Usage: Stash EventAction<'T>

Parameters:
Item : EventAction<'T>

StateChangedEvent 'T

Full Usage: StateChangedEvent 'T

Parameters:
    Item : 'T

Indicate that the state of a saga has changed (used internally by sagas for persistence).

Item : 'T

UnhandledEvent

Full Usage: UnhandledEvent

Indicate that the command or event could not be handled in the current state.

Unstash EventAction<'T>

Full Usage: Unstash EventAction<'T>

Parameters:
Item : EventAction<'T>

UnstashAll EventAction<'T>

Full Usage: UnstashAll EventAction<'T>

Parameters:
Item : EventAction<'T>

Instance members

Instance member Description

this.IsDeferEvent

Full Usage: this.IsDeferEvent

Returns: bool
Returns: bool

this.IsIgnoreEvent

Full Usage: this.IsIgnoreEvent

Returns: bool
Returns: bool

this.IsPersistAllEvents

Full Usage: this.IsPersistAllEvents

Returns: bool
Returns: bool

this.IsPersistAndSnapshot

Full Usage: this.IsPersistAndSnapshot

Returns: bool
Returns: bool

this.IsPersistEvent

Full Usage: this.IsPersistEvent

Returns: bool
Returns: bool

this.IsPublishEvent

Full Usage: this.IsPublishEvent

Returns: bool
Returns: bool

this.IsRunAsync

Full Usage: this.IsRunAsync

Returns: bool
Returns: bool

this.IsStash

Full Usage: this.IsStash

Returns: bool
Returns: bool

this.IsStateChangedEvent

Full Usage: this.IsStateChangedEvent

Returns: bool
Returns: bool

this.IsUnhandledEvent

Full Usage: this.IsUnhandledEvent

Returns: bool
Returns: bool

this.IsUnstash

Full Usage: this.IsUnstash

Returns: bool
Returns: bool

this.IsUnstashAll

Full Usage: this.IsUnstashAll

Returns: bool
Returns: bool

Type something to start searching.