Open MerrionComputing opened 4 years ago
Needs to be on a per Domain basis so command handlers can be set up to watch a single domain.
Each command is backed by an event stream
The life cycle for a command should be something along the lines of:-
Creation
Parameter(s) set
Validations performed
Action step(s) performed
At any stage the current parameter(s), and the current progress of the command can be attained by running a projection over the command event stream.
Projections required:-
Command parameters - because parameters can be added or changed while the command is in flight (by the command handler itself usually) it is handy to be able to get the set of parameters as at a given point in time.
Command state - is the command complete, in error, running etc.
Question: should there be an explicit "Command Complete" event?
Added a Command.GetExecutionState() method to get the current state of the command orchestration
Needs a way to get the current state of a command from HTTP request
Command functions
Need to have a Command class which can be bound to a parameter on an Azure function with autoresolve properties for command name and unique identifier.
If the unique identifier is not set, use a GUID
This will create an event stream to use to orchestrate execution of the step(s) required to process the command.