Class StateStoredOrchestratingAggregate<C, S, E>

State stored orchestrating aggregate is using/delegating a decider of type IDecider<C, S, E> to handle commands and produce new state. In order to handle the command, aggregate needs to fetch the current state via StateRepository.fetchState function first, and then delegate the command to the decider which can produce new state as a result. If the decider is combined out of many deciders via combine function, an optional saga could be used to react on new events and send new commands to the decider recursively, in one transaction.

New state is then stored via StateRepository.save function.

Author

Иван Дугалић / Ivan Dugalic /

Idugalic

Type Parameters

  • C

    Commands of type C that this aggregate can handle

  • S

    Aggregate state of type S

  • E

    Events of type E that this aggregate can publish

Hierarchy

Implements

Constructors

Properties

decider: IDecider<C, S, E>
initialState: S
saga: ISaga<E, C>
stateRepository: StateRepository<C, S>

Methods

Generated using TypeDoc