Class StateStoredOrchestratingAggregate<C, S, E, V, CM, SM>
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 IStateRepository.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 IStateRepository.save function.
State stored orchestrating aggregate is using/delegating a
decider
of typeIDecider
<C
,S
,E
> to handle commands and produce new state. In order to handle the command, aggregate needs to fetch the current state viaIStateRepository.fetchState
function first, and then delegate the command to thedecider
which can produce new state as a result. If thedecider
is combined out of many deciders viacombine
function, an optionalsaga
could be used to react on new events and send new commands to thedecider
recursively, in one transaction.New state is then stored via
IStateRepository.save
function.Author
Иван Дугалић / Ivan Dugalic /
Idugalic