Created
August 20, 2010 23:25
-
-
Save anonymous/541411 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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