Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
participant : setting the field 'params'
- Loading branch information
Showing
6 changed files
with
65 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
# | ||
# Testing Ruote (OpenWFEru) | ||
# | ||
# Wed Jul 1 09:51:30 JST 2009 | ||
# | ||
|
||
require File.dirname(__FILE__) + '/base' | ||
|
||
require 'ruote/part/hash_participant' | ||
|
||
|
||
class FtParticipantParamsTest < Test::Unit::TestCase | ||
include FunctionalBase | ||
|
||
def test_params | ||
|
||
pdef = Ruote.process_definition do | ||
sequence do | ||
alpha | ||
alpha :activity => 'buy groceries' | ||
alpha | ||
end | ||
end | ||
|
||
alpha = @engine.register_participant :alpha, Ruote::HashParticipant | ||
|
||
#noisy | ||
|
||
wfid = @engine.launch(pdef) | ||
|
||
wait_for(:alpha) | ||
assert_equal({ 'ref' => 'alpha' }, alpha.first.fields['params']) | ||
alpha.reply(alpha.first) | ||
|
||
wait_for(:alpha) | ||
assert_equal('buy groceries', alpha.first.fields['params']['activity']) | ||
alpha.reply(alpha.first) | ||
|
||
wait_for(:alpha) | ||
assert_equal({ 'ref' => 'alpha' }, alpha.first.fields['params']) | ||
alpha.reply(alpha.first) | ||
end | ||
end | ||
|