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
Back on 1.2 and 2.0.3 I used AASM and fellows - lately I've been trying out state_machine - but then I googled 'dynamic state machine' and Mountain View 'coughed up' this gem!
Pitch
I'd like to allow users to setting up workflows themselves, selecting from a bunch of available events/transistions, and in the proces I18n'ifying the body of the work :)
One use case would be several groups of users processing workflows on the same codebase - but with totally different workflow use cases (multi-site)
One other use case would be users adjusting workflows to changes to business policies - like: we at Corp XYZ are now 'green' and thus our SourcingOrders should not print before they are emailed/faxed to our suppliers - unless the Order Total exceeds 1,000,000...
UI design
I'm working off of a generic abstract_action_base.rb model which gets inherited by models like Project, Product, Item, Partner, etc. and then (as STI models) like Partner being inherited by models like Customer, Supplier, Bank, etc
Ideally I'd like my abstract_action_base to provide the workflow_states as a Hash
and all state_questions to work like Product.find(419).sourcing_requested? and persisted to ActiveRecord (AR) in a quasi-searchable fashion - something along the lines of:
workflow_states = '----1R--2O--3B----'
which would allow quick searches on workflow states like:
Product.where{ workflow_states.like_all [ '-1R-','-3B-'] }.where( "workflow_states like '%-2O-% " )
Workflow transitions
Workflow transitions would - again ideally - be persisted to AR as something like:
t.string :transition_label # what to label the transition and use as key for I18n.translations
t.text :guard # code to eval true/false guarding the transition on an instance
t.text :from_to # hash of transition like { drafted: { requested: :some_condition_attribute_or_method, archived: :other_condition_or_method }, requested: {} }
# persisted as serialized object
Epilogue
Am I totally loosing it here? Or does you (the reader) see dynamically formulated workflows fly at all?
The text was updated successfully, but these errors were encountered:
Back on 1.2 and 2.0.3 I used AASM and fellows - lately I've been trying out state_machine - but then I googled 'dynamic state machine' and Mountain View 'coughed up' this gem!
Pitch
I'd like to allow users to setting up workflows themselves, selecting from a bunch of available events/transistions, and in the proces I18n'ifying the body of the work :)
One use case would be several groups of users processing workflows on the same codebase - but with totally different workflow use cases (multi-site)
One other use case would be users adjusting workflows to changes to business policies - like: we at Corp XYZ are now 'green' and thus our SourcingOrders should not print before they are emailed/faxed to our suppliers - unless the Order Total exceeds 1,000,000...
UI design
I'm working off of a generic abstract_action_base.rb model which gets inherited by models like Project, Product, Item, Partner, etc. and then (as STI models) like Partner being inherited by models like Customer, Supplier, Bank, etc
Ideally I'd like my abstract_action_base to provide the workflow_states as a Hash
and all state_questions to work like Product.find(419).sourcing_requested? and persisted to ActiveRecord (AR) in a quasi-searchable fashion - something along the lines of:
which would allow quick searches on workflow states like:
Workflow transitions
Workflow transitions would - again ideally - be persisted to AR as something like:
Epilogue
Am I totally loosing it here? Or does you (the reader) see dynamically formulated workflows fly at all?
The text was updated successfully, but these errors were encountered: