Skip to content

Instantly share code, notes, and snippets.

Created August 20, 2010 23:25
Show Gist options
  • Save anonymous/541411 to your computer and use it in GitHub Desktop.
Save anonymous/541411 to your computer and use it in GitHub Desktop.
require File.join(File.dirname(__FILE__), 'base')
#require 'ruote/part/hash_participant'
class EftConcurrenceTest < Test::Unit::TestCase
include FunctionalBase
def test_issue
#pdef = Ruote.process_definition do
# sequence do
# concurrence :merge_type => :mix do
# alpha
# bravo
# end
# charlie
# end
#end
pdef = %{
<process-definition>
<sequence>
<concurrence merge-type="mix">
<alpha/>
<bravo/>
</concurrence>
<charlie/>
</sequence>
</process-definition>
}
alpha = @engine.register_participant :alpha do |workitem|
workitem.fields['alpha_entry'] = 'done'
end
bravo = @engine.register_participant :bravo do |workitem|
workitem.fields['bravo_entry'] = 'done'
end
charlie = @engine.register_participant :charlie do |workitem|
#p workitem.fields
end
wfid = @engine.launch(pdef)
r = @engine.wait_for(wfid)
assert_equal 'done', r['workitem']['fields']['alpha_entry']
assert_equal 'done', r['workitem']['fields']['bravo_entry']
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment