Skip to content

Pass Result to NextState callback #39

@onepunchtech

Description

@onepunchtech

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions