Project

yawl

0.0
No commit activity in last 3 years
No release in over 3 years
Yet Another Workflow Library for Ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Yawl

Yawl is Yet another workflow library.

The target audience is for those who have workflows that are mostly sequential and don't need to create complex branching logic.

Installation

Add this line to your application's Gemfile:

gem 'yawl'

And then execute:

$ bundle

Or install it yourself as:

$ gem install yawl

Usage

The way you go about using it is:

  1. You define a set of steps where most of your logic will go
Yawl::Steps.set :morning_routine do
  step :first_thing do
    def run
      puts "brush teeth"
    end
  end
end
  1. You define a process which references set(s) of steps, this will be the name you call when you want to run the process.
Yawl::ProcessDefinitions.add(:wake_up) do |process|
  Yawl::Steps.realize_set_on(:morning_routine)
end
  1. You call the process with the name you defined in step 2, and add any variables that you need to the Yawl::Process#config json field.
p = Yawl::Process.create(:desired_state => "wake_up", :config => {})
p.start

Running the Example

bundle exec sequel -m migrations/ postgres://localhost/yawl_examples
bundle exec ruby examples/cook_worker.rb &
bundle exec ruby examples/cook.rb

Credit

Originally written by @dpiddy, extracted by @ricardochimal from a larger project into its own gem.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request