ecto_state_machine icon indicating copy to clipboard operation
ecto_state_machine copied to clipboard

State machine pattern for Ecto

Results 16 ecto_state_machine issues
Sort by recently updated
recently updated
newest added

This isn't really an issue but a query. I am looking for a FSM solution with built in persistence where events and state transitions can be configured at run-time. Does...

Allow custom mapping between the atomic state names and their corresponding database values.

We have a use case in which we want to call an EctoStateMachine event on an existing changeset of the model with the state machine. I could achieve this with...

Model can get its available events.

We came into a case where we needed to do state transitions on our Ecto models, but the new state would be received from user input (e.g an API call)...

Is it possible to mimick the https://github.com/ericentin/gen_state_machine api? The only difference between that lib and this lib seems to be this stores the state in ecto. I may be misunderstanding...

Would be nice to use multiple callbacks in order to support things like `Ecto.Multi`. So instead of just having a :callback which needs to call :validate_state_transition which expects an `Ecto.Changeset`,...

So let's say we have our `User.can_confirm?`, we could also create in our macro: `User.confirmable(query)` which would just do a `from u in query, where: [state: [..available_states..]` This fits in...

By defining a state machine on a model, I can non longer define a changeset in my model. If I `import Ecto.Changeset` after I've defined my state machine, things tend...