Syncing P34 1
ready
DefaultHandlerWrapper
3
Visa_12345
null
[]
Vienna
Prague
0
http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php
http://gruppe.wst.univie.ac.at/~mangler/services/approval.php
http://gruppe.wst.univie.ac.at/~mangler/services/airline.php
activity :a1, :call, :bookAir, :method => "post", :parameters => [ { :from => data.from }, { :to => data.to }, { :persons => data.persons } ] do |result|
data.airline = result.value('id')
data.costs += result.value('costs').to_f
status.update 1, 'Hotel'
end
parallel do
loop pre_test{data.persons > 0} do
parallel_branch data.persons do |p|
activity :a2, :call, :bookHotel, :method => "post", :parameters => [ { :to => data.to } ] do |result|
data.hotels << result.value('id')
data.costs += result.value('costs').to_f
end
end
activity :a3, :manipulate do
data.persons -= 1
end
end
end
choose do
alternative data.costs > 700 do
activity :a4, :call, :approve, :method => "post", :parameters => [ { :costs => data.costs } ]
end
end
0
undefined
post
data.from
data.to
data.persons
data.airline = result.value('id')
data.costs += result.value('costs').to_f
status.update 1, 'Hotel'
post
data.to
data.hotels << result.value('id')
data.costs += result.value('costs').to_f
data.persons -= 1
post
data.costs
2
1
activity :
, :call, :
, :manipulate
parallel
:wait =>
do
1
end
loop
pre_test{
}
post_test{
}
do
1
end
choose do
1
end
critical :
do
1
end
1
alternative
do
1
end
1
otherwise do
1
end
1
parallel_branch
do
|
|
1
end
, :
=>
[
]
"
"
{ :
=>
}
,
do
|
|
1
end