You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A common business rule is to only allow a state change if the current state is equal to or is not equal to a single or group of values. It's currently tedious to protect against this, and as such I suspect may be just left out of testing or forgotten in the command handler.
I suggest we take the focus of the message type ( commandMap and eventMap), and work on a pipeline for external state-change messages stateChangeMap? Mapping to a handler would be part of this, but only after enforcing state change rules as defined. It could throw a generic Space.Error like InvalidState.
As part of this we will need to abstract the mapping of internal state-change events into fields rather than just mapping an event type to a handler. This will be easier to test, and ensure dependencies are not being used to manipulate data once saved
The text was updated successfully, but these errors were encountered:
there’s maybe still potential to reduce boilerplate and confusion by providing a more expressive API, but I doubt we can achieve much past the state change validation
A common business rule is to only allow a state change if the current state is equal to or is not equal to a single or group of values. It's currently tedious to protect against this, and as such I suspect may be just left out of testing or forgotten in the command handler.
Now
I suggest we take the focus of the message type (
commandMap
andeventMap
), and work on a pipeline for external state-change messagesstateChangeMap
? Mapping to a handler would be part of this, but only after enforcing state change rules as defined. It could throw a generic Space.Error likeInvalidState
.As part of this we will need to abstract the mapping of internal state-change events into fields rather than just mapping an event type to a handler. This will be easier to test, and ensure dependencies are not being used to manipulate data once
save
dThe text was updated successfully, but these errors were encountered: