lorefnon / workflow-orchestrator

Ruby DSL for modelling workflows as state machines
MIT License
11 stars 4 forks source link

Difference with geekq/workflow? #3

Open emclab opened 8 years ago

emclab commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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

emclab commented 8 years ago

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.