state machines

2 views
Skip to first unread message

Jamie Orchard-Hays

unread,
Jun 4, 2015, 10:25:05 AM6/4/15
to refac...@googlegroups.com
In the Ruby world, what's your favorite state-machine gem and why? What have you used it for?

Cheers,

Jamie


paul damer

unread,
Jun 5, 2015, 10:39:10 AM6/5/15
to refac...@googlegroups.com
I've only used the state_machine gem which has been abandoned and replaced with https://github.com/state-machines/state_machines.

It is the basis order processing in the spree project.  It is very good for a single implementation of a state machine but when you override or extend the same state machine across several gems/plugins/engines/your own app you can easily cause trouble with callbacks being missing or overridden.

-Paul




--
You received this message because you are subscribed to the Google Groups "RefactorRVA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to refactorrva...@googlegroups.com.
To post to this group, send email to refac...@googlegroups.com.
Visit this group at http://groups.google.com/group/refactorrva.
For more options, visit https://groups.google.com/d/optout.

David Bock

unread,
Jun 5, 2015, 1:54:03 PM6/5/15
to refac...@googlegroups.com
I have used acts_as_state_machine a dozen times in various backoffice workflow contexts... things like an 'application' that has data_entry, review, approval, analysys, conclusion steps, sometimes with complicated state entry/exit logic.

AASM has its issues, but for that use case, I love it.

-db


On Thu, Jun 4, 2015 at 10:25 AM, Jamie Orchard-Hays <jami...@gmail.com> wrote:

Max Schubert

unread,
Jun 6, 2015, 12:02:34 PM6/6/15
to refac...@googlegroups.com
I agree with David Bock - it creates it's own maintenance load, but for more complex state flows it's great - for simple state changes it's much lighter weight and easier to maintain to hand roll something instead of using a state machine gem.
Reply all
Reply to author
Forward
0 new messages