Skip to content

Instantly share code, notes, and snippets.

Created July 6, 2011 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1066604 to your computer and use it in GitHub Desktop.
Save anonymous/1066604 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'ruote'
engine = Ruote::Engine.new(Ruote::Worker.new(Ruote::HashStorage.new))
pdef = Ruote.define do
alice
bob
end
engine.register do
catchall # all goes in the storage_participant
end
engine.noisy = true
wfid = engine.launch(pdef)
engine.wait_for(:alice)
ps = engine.ps(wfid)
root = ps.expressions.first
root.update_tree([ "define", {}, [
[ "alice", {}, [] ],
[ "charly", {}, [] ],
[ "bob", {}, [] ]
] ])
root.persist
wi = engine.storage_participant.first
engine.storage_participant.proceed(wi)
engine.wait_for(:charly)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment