github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

kennethkalmer / ruote-kit

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 22
    • 3
  • Source
  • Commits
  • Network (3)
  • Issues (0)
  • Downloads (2)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (2)
    • filter_by_fields
    • master ✓
  • Tags (2)
    • 2.1.4.1
    • 2.1.4
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

RESTful wrapper for ruote workflow engine — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Improve Storage Participant integration 
tosch (author)
Tue Feb 09 00:18:55 -0800 2010
kennethkalmer (committer)
Tue Feb 09 01:13:56 -0800 2010
commit  6422e9aaeeb7e114ff72f939630af84d8352f4c6
tree    d19dad8beb4335340ce4d163667b2a611c305262
parent  779a9a5c1966fe1df3a38176f414aac2d52fb6b8
ruote-kit /
name age
history
message
file .document Wed Jan 06 07:19:04 -0800 2010 Yard attempts [kennethkalmer]
file .gitignore Wed Jan 06 07:30:10 -0800 2010 Ignore pkg [kennethkalmer]
file Gemfile Mon Jan 11 04:08:25 -0800 2010 First release at 2.1.4 [kennethkalmer]
file README.rdoc Thu Feb 04 06:58:54 -0800 2010 Catchall, readme & middlewares * Catchall part... [kennethkalmer]
file Rakefile Mon Jan 11 04:15:27 -0800 2010 Keep bundler's bin files out the gemspec [kennethkalmer]
file config.ru Thu Feb 04 06:58:54 -0800 2010 Catchall, readme & middlewares * Catchall part... [kennethkalmer]
directory lib/ Tue Feb 09 01:13:56 -0800 2010 Improve Storage Participant integration * refa... [tosch]
file ruote-kit.gemspec Tue Jan 12 05:24:48 -0800 2010 Bugfix & version bump [kennethkalmer]
directory spec/ Tue Feb 09 00:18:55 -0800 2010 Improve Storage Participant integration * refa... [tosch]
README.rdoc

ruote-kit (RESTful BPM & middleware)

  • kit.rubyforge.org/ruote (soon)
  • kit.rubyforge.org/ruote/rdoc (soon)

A RESTful wrapper around the ruote workflow engine, built as a modular sinatra application.

Follow development:

  • #ruote on Freenode
  • groups.google.com/group/openwferu-users
  • opensourcery.co.za
  • @kennethkalmer on Twitter

Alpha Status

ruote-kit is under heavy development and will likely change violently over the coming weeks (albeit for the better).

Dependencies you currently need is:

  • bundler (gem install bundler)
  • sinatra
  • haml
  • json
  • rspec (only to run the specs)

ruote-kit uses bundler to setup and maintain its environment. Before running ruote-kit for the first time you need to install bundler and then run:

  $ gem bundle

Bundler will download all the required gems and unpack them in ‘vendor/gems’ for you.

Getting started quickly

Once you have the dependencies installed, get going by running ‘rackup’ from inside the ruote-kit project.

If ruote-kit starts up without any issues (ie missing dependencies), you can point your browser to ‘localhost:9292/_ruote/’ to get going. By default ruote-kit binds to all IP addresses, so this works out the box remotely too.

Plugging ruote-kit into your rack-stack

ruote-kit is fully self-sufficient piece of rack, but can be slotted into any rack middleware stack without issues.

Example:

  RuoteKit.configure do |config|
    # make changes if needed
  end

  # Register participants if needed
  RuoteKit.engine.register_participant :toto do |wi|
    #
  end

  # Register the catchall participant if needed
  RuoteKit.configure_catchall!

  # Slot into the stack
  use RuoteKit::Application

Notes for Rails

Add this line to your +config/environment.rb+ file:

  config.gem 'ruote-kit'

Then register ruote-kit with Rails’ middleware stack (also in +config/environment.rb+):

  config.middleware.use 'RuoteKit::Application'

Then install and unpack the gem

  $ rake gems:install
  $ rake gems:unpack GEM=ruote-kit

Then you can create an initializer to configure and start the engine in +config/initializers/ruote-kit.rb+:

  RuoteKit.configure do |config|
    # make changes if needed
  end

  # Register participants if needed
  RuoteKit.engine.register_participant :toto do |wi|
    #
  end

  # Register the catchall participant if needed
  RuoteKit.configure_catchall!

Then run +script/server+ and access RuoteKit through +localhost:3000/_ruote+

Configuring ruote-kit & ruote

ruote-kit can be configured using RuoteKit#configure, after which it will start the engine. From that point the engine is accessible through RuoteKit.engine.

Without any configuration ruote-kit will use file system persistence, and save the work in a sub-folder of the current working directory named +work_<env>+, where env is the RACK_ENV or RAILS_ENV.

You’ll also need to register a catchall participant to utilize the workitems resource. Do this after you’ve registered your own participants:

  RuoteKit.configure_catchall!

Running workers

If you’re using ruote-kit as part of your rack stack you’ll need to start at least one worker separately or the workflows will be executed. You won’t need more than one worker unless you are running hundreds of processes at the same time.

To run a worker you need to setup a worker scripts similar to the rake example below:

  require 'rake'
  require 'ruote-kit'

  desc "Run a ruote-kit worker"
  task :ruote_kit_worker do

    RuoteKit.configure do |config|
      # Setup your configuration
    end

    RuoteKit.run_worker!
  end

This will only work correctly if using the default file system persistence. Support for ruote-couch is coming soon.

Feedback & bug reports

Please bear in mind that the project is still in its alpha days. Keep bug reports and suggestions limited to the google group and #ruote channel, at least for the time being.

Please do not hesitate to come back with any feedback.

License

(The MIT License)

Copyright © 2009 Kenneth Kalmer (Internet Exchange CC, Clear Planet Information Solutions Pty Ltd)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server