Ruby on Rails Workflow Engine (Like Ibm Workflow)

Ruby on rails workflow engine (like IBM WorkFlow)

Check rails_workflow. (http://github.com/madzhuga/rails_workflow). It has no graphical editor for business schemes but it allows you to configure processes and this may be close to what you need.

rails_workflow

How to record when a state changes in Workflow Gem in Ruby

I ended up building a solution from scratch, following Ryan Bate's excellent screencast at:

http://railscasts.com/episodes/392-a-tour-of-state-machines?view=asciicast

Storing workflows (state machines) in the DB. What's the best way?

Don't know of any gems... but, you could use meta-programming to load how your workflows function.

Let's say you could store your workflow definitions in the database. Something like:

Account.new.extend_workflow(@user.account_workflows)

The #extend_workflow and the account_workflows are completely custom and written by you... in this way, your Account could have custom state machine definitions and rulesets.

Not for the faint of heart, but could solve your problem here.

Am I the only one that queries more than one database?

I really honestly think that most ORM designers don't seem to take the thought that users may want to access more than one database into account. This seems to be a pretty common limitation in the ORM universe.

Database.yml configuration options

I found a gist of database.yml examples using mysql, postgres, and sqlite3, and the Rails 3.2 source code for connection adapters provides good insight as well.

Looks to me that the following are the most widely used options:

  • adapter
  • encoding
  • database
  • pool
  • username
  • password
  • socket
  • host
  • port
  • timeout

The Rails 3.2 connection_specification.rb file looks like it simply merges any options you include, so I'd say what options you include are dependant on the database adapter you choose to use (lines 58-74):

def connection_url_to_hash(url) # :nodoc:
config = URI.parse url
adapter = config.scheme
adapter = "postgresql" if adapter == "postgres"
spec = { :adapter => adapter,
:username => config.user,
:password => config.password,
:port => config.port,
:database => config.path.sub(%r{^/},""),
:host => config.host }
spec.reject!{ |_,value| !value }
if config.query
options = Hash[config.query.split("&").map{ |pair| pair.split("=") }].symbolize_keys
spec.merge!(options)
end
spec
end


Related Topics



Leave a reply



Submit