Sometimes the only way to know what the next state should be is if you let the system tell you. So it would be nice to be able to have the Result of Run in the NextState callback. Right now I am modifying the state in the post condition.
For example in a CRUD application you can know all of the parameters except for the unique id that gets generated by the system.
Concrete use case:
-
command: create user
- next state: save user with id to model state.
- post condition: ensure creation response conforms
-
command: get user
- pre condition: at least one user must exist
- post condition: ensure application response matches model state
Sometimes the only way to know what the next state should be is if you let the system tell you. So it would be nice to be able to have the Result of Run in the NextState callback. Right now I am modifying the state in the post condition.
For example in a CRUD application you can know all of the parameters except for the unique id that gets generated by the system.
Concrete use case:
command: create user
command: get user