Skip to content

Instantly share code, notes, and snippets.

@p
Created June 11, 2010 20:17
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 p/434980 to your computer and use it in GitHub Desktop.
Save p/434980 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'ruote'
# preparing the engine
engine = Ruote::Engine.new(
Ruote::Worker.new(
Ruote::HashStorage.new))
pdef = Ruote.process_definition :name => 'test' do
# literal output
echo 'test'
# top-level variable
echo '${foo}'
# or use f: prefix
echo '${f:foo}'
# variable in a hash?
echo '${f:foo_hash["key"]}'
end
# launching, creating a process instance
wfid = engine.launch(pdef,
'foo' => 'bar',
'foo_hash' => {'key' => 'value'})
engine.wait_for(wfid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment