Skip to content

Instantly share code, notes, and snippets.

@raphael
Created November 30, 2008 00:53
Show Gist options
  • Save raphael/30350 to your computer and use it in GitHub Desktop.
Save raphael/30350 to your computer and use it in GitHub Desktop.
#
# TEST 4
class Test4 < OpenWFE::ProcessDefinition
sequence :on_error => 'parent_rescue' do
_print '0'
sequence :on_error => 'rescue' do
_print '1'
alpha
_print '1'
end
end
define 'rescue' do
_print 'rescue'
bravo
_print '3'
end
define 'parent_rescue' do
_print 'parent_rescue'
end
end
def test_4
@engine.register_participant :alpha do |fexp, workitem|
raise 'houston, we have a problem'
end
@engine.register_participant :bravo do |fexp, workitem|
_print '2'
raise 'houston, we''ve had a problem'
_print '1'
end
dotest Test4, %w{ 0 1 rescue 2 parent_rescue }.join("\n")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment