Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Difference with geekq/workflow? #3

Open
emclab opened this issue Apr 6, 2016 · 6 comments
Open

Difference with geekq/workflow? #3

emclab opened this issue Apr 6, 2016 · 6 comments

Comments

@emclab
Copy link

emclab commented Apr 6, 2016

This gem actively maintained. We are currently using geekq/workflow which is not being actively maintained. workflow-orchestrator is a fork out. What's the idea/purpose behind this gem? Is it a bug fix or constant improvement? If we want to use the gem, is there any changes (in gemfile for sure for the gem name) in model setup? The model setup seems to be exactly the same as geekq's. Thanks.

@lorefnon
Copy link
Owner

lorefnon commented Apr 6, 2016

The idea is to continue with the original goals of workflow gem - to provide an elegant DSL for modelling business logic in Ruby using state machines.

Like you, I was actively using workflow in few of my projects and some of the proposed pull requests were useful for my use cases. I intend to continue maintaining this repo - especially fix issues and regressions.

Long term plans include refactoring out the activerecord specific parts to a different gem and provide integration with a few additional data stores - especially rethinkdb which I have begun using recently in a project of mine. However in the longer term API level compatibility with the original repo is not an aim.

@lorefnon
Copy link
Owner

lorefnon commented Apr 6, 2016

I would encourage you to use this fork, and suggest any features you might find useful and report bugs that you encounter. I will try to help with the issues as and when time permits. Pull requests are more than welcome.

@emclab
Copy link
Author

emclab commented Apr 6, 2016

lorefnon, thank you for the info. It is great someone there is someone like you to keep maintaining the gem and make it better.

@emclab
Copy link
Author

emclab commented Apr 6, 2016

In our Rails app, the workflow gem needs to be stored for each group of users with a unique token. Basically Model.workflow_spec needs to become Model.workflow_spec(token). Need to have {token => workflow_spec}. We are thinking about wrap up current workflow gem. Any comments or suggestion is more than welcome!

@lorefnon
Copy link
Owner

lorefnon commented Apr 6, 2016

Why not create a Token model that includes Workflow which has_many Users ?

@emclab
Copy link
Author

emclab commented Apr 6, 2016

Never thought about a token model. Can you provide more details? We want to keep the current structure. There are 2 issues: 1) definition of the workflow_spec associated with token. Currently it is workflow do ... end defined in model class level. Also 2) in the state transition, the action needs to consult the spec with token.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants