Skip to content

Instantly share code, notes, and snippets.

@jmettraux
Created January 27, 2009 13:16
Show Gist options
  • Select an option

  • Save jmettraux/53338 to your computer and use it in GitHub Desktop.

Select an option

Save jmettraux/53338 to your computer and use it in GitHub Desktop.
$: << File.expand_path('~/ruote/lib')
require 'rubygems'
require 'openwfe/expressions/rprocdef'
pdef0 = OpenWFE.process_definition :name => 'test0' do
sequence do
participant :ref => 'alpha'
participant :ref => 'bravo'
end
end
p pdef0
# =>
#
# [ "process-definition",
# { "name" => "test0" },
# [ [ "sequence",
# {},
# [ [ "participant", { "ref" => "alpha" }, [] ],
# [ "participant", { "ref" => "bravo" }, []]]]]]
pdef1 = OpenWFE.process_definition :name => 'test0' do
concurrence do
participant :ref => 'alpha'
participant :ref => 'bravo'
end
end
p pdef1
# =>
#
# [ "process-definition",
# { "name" => "test0" },
# [ [ "concurrence",
# {},
# [ [ "participant", { "ref" => "alpha" }, [] ],
# [ "participant", { "ref" => "bravo" }, []]]]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment