cpee 1.3.175 → 1.3.176
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/cockpit/index.html +1 -1
- data/cockpit/js/instance.js +40 -37
- data/cockpit/lib/relaxngui.js +4 -0
- data/cockpit/lib/ui.css +0 -5
- data/cockpit/lib/ui.js +6 -2
- data/cockpit/rngtest.html +74 -0
- data/cockpit/rngtest.rng +60 -0
- data/cockpit/rngtest.xml +15 -0
- data/cockpit/testsets/Concurrent.xml +2 -2
- data/cockpit/testsets/Coopis Testset.xml +4 -4
- data/cockpit/testsets/Linear.xml +3 -3
- data/cockpit/testsets/Mangler 1.xml +1 -1
- data/cockpit/testsets/Mangler 2.xml +8 -8
- data/cockpit/testsets/SOPROMO Test Sonification.xml +10 -10
- data/cockpit/testsets/Syncing P34 1.xml +4 -4
- data/cockpit/testsets/Syncing P34 2.xml +4 -4
- data/cockpit/testsets/Syncing P34 3.xml +4 -4
- data/cockpit/testsets/Syncing P34.xml +4 -4
- data/cockpit/testsets/TEST - Wrong Positions.xml +20 -20
- data/cockpit/testsets/Update.xml +11 -0
- data/cockpit/testsets/Worklist Test.xml +39 -0
- data/cockpit/testsets/testsets.xml +4 -0
- data/cpee.gemspec +1 -1
- data/lib/cpee/callback.rb +6 -2
- data/lib/cpee/controller.rb +8 -8
- data/lib/cpee/handler_notifications.rb +4 -4
- data/lib/cpee/handler_properties.rb +5 -5
- data/lib/cpee/implementation.rb +1 -1
- data/server/handlerwrappers/default.rb +30 -25
- data/server/handlerwrappers/soap.rb +13 -13
- data/server/instances/1/properties.xml +69 -101
- data/server/instances/10/properties.xml +106 -70
- data/server/instances/11/properties.xml +133 -73
- data/server/instances/12/properties.xml +1 -0
- data/server/instances/14/notifications/5bcce90b170116a77fb25aea4e133acc/consumer-secret +1 -0
- data/server/instances/14/notifications/5bcce90b170116a77fb25aea4e133acc/producer-secret +1 -0
- data/server/instances/{13/notifications/4ff0cde5161c44dae49b263cbc12eaf8 → 14/notifications/5bcce90b170116a77fb25aea4e133acc}/subscription.xml +0 -0
- data/server/instances/14/properties.xml +160 -160
- data/server/instances/15/properties.xml +28 -314
- data/server/instances/16/properties.xml +28 -249
- data/server/instances/17/properties.xml +28 -130
- data/server/instances/18/properties.xml +3 -2
- data/server/instances/19/properties.xml +0 -1
- data/server/instances/2/properties.xml +191 -44
- data/server/instances/20/properties.xml +46 -0
- data/server/instances/21/properties.xml +46 -0
- data/server/instances/22/notifications/f9c504b8c715ec94a99fc3c6a660c53a/consumer-secret +1 -0
- data/server/instances/22/notifications/f9c504b8c715ec94a99fc3c6a660c53a/producer-secret +1 -0
- data/server/instances/22/notifications/f9c504b8c715ec94a99fc3c6a660c53a/subscription.xml +23 -0
- data/server/instances/22/properties.xml +112 -0
- data/server/instances/23/notifications/0a5a059f4ae897aee1446d560210dec0/consumer-secret +1 -0
- data/server/instances/23/notifications/0a5a059f4ae897aee1446d560210dec0/producer-secret +1 -0
- data/server/instances/23/notifications/0a5a059f4ae897aee1446d560210dec0/subscription.xml +23 -0
- data/server/instances/23/properties.xml +148 -0
- data/server/instances/24/properties.xml +66 -0
- data/server/instances/25/properties.xml +46 -0
- data/server/instances/26/properties.xml +112 -0
- data/server/instances/27/properties.xml +212 -0
- data/server/instances/28/properties.xml +363 -0
- data/server/instances/29/properties.xml +148 -0
- data/server/instances/3/properties.xml +70 -44
- data/server/instances/30/properties.xml +150 -0
- data/server/instances/31/properties.xml +52 -0
- data/server/instances/32/properties.xml +52 -0
- data/server/instances/33/properties.xml +60 -0
- data/server/instances/34/properties.xml +148 -0
- data/server/instances/35/properties.xml +148 -0
- data/server/instances/36/properties.xml +150 -0
- data/server/instances/37/notifications/2b67c793efcea22d88beaa28249001be/consumer-secret +1 -0
- data/server/instances/37/notifications/2b67c793efcea22d88beaa28249001be/producer-secret +1 -0
- data/server/instances/37/notifications/2b67c793efcea22d88beaa28249001be/subscription.xml +34 -0
- data/server/instances/37/notifications/5f979ed943f91ff75d75e551ba0642d6/consumer-secret +1 -0
- data/server/instances/37/notifications/5f979ed943f91ff75d75e551ba0642d6/producer-secret +1 -0
- data/server/instances/37/notifications/5f979ed943f91ff75d75e551ba0642d6/subscription.xml +33 -0
- data/server/instances/37/properties.xml +57 -0
- data/server/instances/4/properties.xml +28 -68
- data/server/instances/5/properties.xml +10 -70
- data/server/instances/6/properties.xml +175 -55
- data/server/instances/7/properties.xml +118 -52
- data/server/instances/8/properties.xml +112 -50
- data/server/instances/9/properties.xml +115 -47
- data/server/resources/topics.xml +15 -15
- data/server/resources/transformation_dslx.xsl +43 -5
- data/test/cb.rb +9 -0
- metadata +44 -9
- data/server/instances/12/notifications/8d7f2ae546a742fce3a0a488266ea51d/consumer-secret +0 -1
- data/server/instances/12/notifications/8d7f2ae546a742fce3a0a488266ea51d/producer-secret +0 -1
- data/server/instances/12/notifications/8d7f2ae546a742fce3a0a488266ea51d/subscription.xml +0 -6
- data/server/instances/13/notifications/4ff0cde5161c44dae49b263cbc12eaf8/consumer-secret +0 -1
- data/server/instances/13/notifications/4ff0cde5161c44dae49b263cbc12eaf8/producer-secret +0 -1
|
@@ -18,7 +18,7 @@ class NotificationsHandler < Riddl::Utils::Notifications::Producer::HandlerBase
|
|
|
18
18
|
end
|
|
19
19
|
def ws_close
|
|
20
20
|
@data.unserialize_notifications!(:del,@key)
|
|
21
|
-
@data.notify('
|
|
21
|
+
@data.notify('handler/change', :instance => @data.instance)
|
|
22
22
|
end
|
|
23
23
|
def ws_message(data)
|
|
24
24
|
begin
|
|
@@ -34,14 +34,14 @@ class NotificationsHandler < Riddl::Utils::Notifications::Producer::HandlerBase
|
|
|
34
34
|
|
|
35
35
|
def create
|
|
36
36
|
@data.unserialize_notifications!(:cre,@key)
|
|
37
|
-
@data.notify('
|
|
37
|
+
@data.notify('handler/change', :instance => @data.instance)
|
|
38
38
|
end
|
|
39
39
|
def delete
|
|
40
40
|
@data.unserialize_notifications!(:del,@key)
|
|
41
|
-
@data.notify('
|
|
41
|
+
@data.notify('handler/change', :instance => @data.instance)
|
|
42
42
|
end
|
|
43
43
|
def update
|
|
44
44
|
@data.unserialize_notifications!(:upd,@key)
|
|
45
|
-
@data.notify('
|
|
45
|
+
@data.notify('handler/change', :instance => @data.instance)
|
|
46
46
|
end
|
|
47
47
|
end
|
|
@@ -17,7 +17,7 @@ class PropertiesHandler < Riddl::Utils::Properties::HandlerBase
|
|
|
17
17
|
case @property
|
|
18
18
|
when 'handlerwrapper'
|
|
19
19
|
@data.unserialize_handlerwrapper!
|
|
20
|
-
@data.notify('
|
|
20
|
+
@data.notify('handlerwrapper/change', :instance => @data.instance)
|
|
21
21
|
when 'description'
|
|
22
22
|
nots = @data.unserialize_description!
|
|
23
23
|
nots.uniq.each do |noti|
|
|
@@ -25,17 +25,17 @@ class PropertiesHandler < Riddl::Utils::Properties::HandlerBase
|
|
|
25
25
|
end
|
|
26
26
|
when 'endpoints'
|
|
27
27
|
@data.unserialize_endpoints!
|
|
28
|
-
@data.notify('
|
|
28
|
+
@data.notify('endpoints/change', :instance => @data.instance)
|
|
29
29
|
when 'dataelements'
|
|
30
30
|
@data.unserialize_dataelements!
|
|
31
|
-
@data.notify('
|
|
31
|
+
@data.notify('dataelements/change', :instance => @data.instance)
|
|
32
32
|
when 'attributes'
|
|
33
33
|
@data.unserialize_attributes!
|
|
34
34
|
when 'positions'
|
|
35
35
|
@data.unserialize_positions!
|
|
36
|
-
@data.notify('
|
|
36
|
+
@data.notify('position/change', :instance => @data.instance)
|
|
37
37
|
when 'transformation'
|
|
38
|
-
@data.notify('
|
|
38
|
+
@data.notify('transformation/change', :instance => @data.instance)
|
|
39
39
|
when 'state'
|
|
40
40
|
@data.unserialize_state!
|
|
41
41
|
else
|
data/lib/cpee/implementation.rb
CHANGED
|
@@ -23,8 +23,9 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
|
23
23
|
end # }}}
|
|
24
24
|
|
|
25
25
|
def activity_handle(passthrough, parameters) # {{{
|
|
26
|
-
@controller.notify("
|
|
26
|
+
@controller.notify("activity/calling", :instance => @controller.instance, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
|
|
27
27
|
|
|
28
|
+
result = []
|
|
28
29
|
if passthrough.nil?
|
|
29
30
|
params = []
|
|
30
31
|
callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
|
@@ -53,21 +54,17 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
|
53
54
|
|
|
54
55
|
status, result, headers = client.request type => params
|
|
55
56
|
raise "Could not #{parameters[:method] || 'post'} #{@handler_endpoint}" if status != 200
|
|
56
|
-
result = simplify_result(result)
|
|
57
57
|
|
|
58
58
|
if headers["CPEE_CALLBACK"] && headers["CPEE_CALLBACK"] == 'true'
|
|
59
59
|
@controller.callbacks[callback] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
|
|
60
60
|
@handler_passthrough = callback
|
|
61
|
-
|
|
61
|
+
else
|
|
62
|
+
callback result
|
|
62
63
|
end
|
|
63
64
|
else
|
|
64
65
|
@controller.callbacks[passthrough] = CPEE::Callback.new("callback activity: #{@handler_position}",self,:callback,nil,nil,:http)
|
|
65
66
|
@handler_passthrough = passthrough
|
|
66
|
-
return
|
|
67
67
|
end
|
|
68
|
-
|
|
69
|
-
@handler_returnValue = result
|
|
70
|
-
@handler_continue.continue
|
|
71
68
|
end # }}}
|
|
72
69
|
|
|
73
70
|
def activity_result_status # {{{
|
|
@@ -92,51 +89,51 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
|
92
89
|
end # }}}
|
|
93
90
|
|
|
94
91
|
def inform_activity_done # {{{
|
|
95
|
-
@controller.notify("
|
|
92
|
+
@controller.notify("activity/done", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position)
|
|
96
93
|
end # }}}
|
|
97
94
|
def inform_activity_manipulate # {{{
|
|
98
|
-
@controller.notify("
|
|
95
|
+
@controller.notify("activity/manipulating", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position)
|
|
99
96
|
end # }}}
|
|
100
97
|
def inform_activity_failed(err) # {{{
|
|
101
98
|
puts err.message
|
|
102
99
|
puts err.backtrace
|
|
103
|
-
@controller.notify("
|
|
100
|
+
@controller.notify("activity/failed", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
|
|
104
101
|
end # }}}
|
|
105
102
|
|
|
106
103
|
def inform_syntax_error(err,code)# {{{
|
|
107
|
-
@controller.notify("
|
|
104
|
+
@controller.notify("description/error", :instance => @controller.instance, :message => err.message)
|
|
108
105
|
end# }}}
|
|
109
106
|
def inform_manipulate_change(status,changed_dataelements,changed_endpoints,dataelements,endpoints) # {{{
|
|
110
107
|
unless status.nil?
|
|
111
108
|
@controller.serialize_status!
|
|
112
|
-
@controller.notify("
|
|
109
|
+
@controller.notify("status/change", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position, :id => status.id, :message => status.message)
|
|
113
110
|
end
|
|
114
|
-
unless
|
|
111
|
+
unless changed_dataelements.nil?
|
|
115
112
|
@controller.serialize_dataelements!
|
|
116
|
-
@controller.notify("
|
|
113
|
+
@controller.notify("dataelements/change", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position, :changed => changed_dataelements)
|
|
117
114
|
end
|
|
118
|
-
unless
|
|
115
|
+
unless changed_endpoints.nil?
|
|
119
116
|
@controller.serialize_endpoints!
|
|
120
|
-
@controller.notify("
|
|
117
|
+
@controller.notify("endpoints/change", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position, :changed => changed_endpoints)
|
|
121
118
|
end
|
|
122
119
|
end # }}}
|
|
123
120
|
def inform_position_change(ipc={}) # {{{
|
|
124
121
|
@controller.serialize_positions!
|
|
125
122
|
ipc[:instance] = @controller.instance
|
|
126
|
-
@controller.notify("
|
|
123
|
+
@controller.notify("position/change", ipc)
|
|
127
124
|
end # }}}
|
|
128
125
|
def inform_state_change(newstate) # {{{
|
|
129
126
|
if @controller
|
|
130
127
|
@controller.serialize_state!
|
|
131
|
-
@controller.notify("
|
|
128
|
+
@controller.notify("state/change", :instance => @controller.instance, :state => newstate)
|
|
132
129
|
end
|
|
133
130
|
end # }}}
|
|
134
131
|
|
|
135
132
|
def vote_sync_after # {{{
|
|
136
|
-
@controller.call_vote("
|
|
133
|
+
@controller.call_vote("activity/syncing_after", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position)
|
|
137
134
|
end # }}}
|
|
138
135
|
def vote_sync_before(parameters=nil) # {{{
|
|
139
|
-
@controller.call_vote("
|
|
136
|
+
@controller.call_vote("activity/syncing_before", :endpoint => @handler_endpoint, :instance => @controller.instance, :activity => @handler_position)
|
|
140
137
|
end # }}}
|
|
141
138
|
|
|
142
139
|
def simplify_result(result)
|
|
@@ -158,12 +155,20 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
|
158
155
|
result
|
|
159
156
|
end
|
|
160
157
|
|
|
161
|
-
def callback(result)
|
|
158
|
+
def callback(result=nil,options={})
|
|
162
159
|
result = simplify_result(result)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
160
|
+
if options['CPEE_UPDATE']
|
|
161
|
+
@handler_returnValue = result
|
|
162
|
+
if options['CPEE_UPDATE_STATUS']
|
|
163
|
+
@controller.notify("activity/status", :instance => @controller.instance, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'])
|
|
164
|
+
end
|
|
165
|
+
@handler_continue.continue WEEL::Signal::Again
|
|
166
|
+
else
|
|
167
|
+
@controller.callbacks.delete(@handler_passthrough)
|
|
168
|
+
@handler_returnValue = result
|
|
169
|
+
@handler_passthrough = nil
|
|
170
|
+
@handler_continue.continue
|
|
171
|
+
end
|
|
167
172
|
end
|
|
168
173
|
|
|
169
174
|
def simulate(type,nesting,tid,parent,parameters={}) #{{{
|
|
@@ -26,7 +26,7 @@ class SOAPHandlerWrapper < WEEL::HandlerWrapperBase
|
|
|
26
26
|
end # }}}
|
|
27
27
|
|
|
28
28
|
def activity_handle(passthrough, parameters) # {{{
|
|
29
|
-
@controller.notify("
|
|
29
|
+
@controller.notify("activity/calling", :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
|
|
30
30
|
|
|
31
31
|
if passthrough.nil?
|
|
32
32
|
callback = Digest::MD5.hexdigest(Kernel::rand().to_s)
|
|
@@ -92,56 +92,56 @@ class SOAPHandlerWrapper < WEEL::HandlerWrapperBase
|
|
|
92
92
|
end # }}}
|
|
93
93
|
|
|
94
94
|
def inform_activity_done # {{{
|
|
95
|
-
@controller.notify("
|
|
95
|
+
@controller.notify("activity/done", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
|
|
96
96
|
end # }}}
|
|
97
97
|
def inform_activity_manipulate # {{{
|
|
98
|
-
@controller.notify("
|
|
98
|
+
@controller.notify("activity/manipulating", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
|
|
99
99
|
end # }}}
|
|
100
100
|
def inform_activity_failed(err) # {{{
|
|
101
101
|
puts err.message
|
|
102
102
|
puts err.backtrace
|
|
103
|
-
@controller.notify("
|
|
103
|
+
@controller.notify("activity/failed", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
|
|
104
104
|
end # }}}
|
|
105
105
|
|
|
106
106
|
def inform_syntax_error(err,code)# {{{
|
|
107
107
|
puts err.message
|
|
108
108
|
puts err.backtrace
|
|
109
|
-
@controller.notify("
|
|
109
|
+
@controller.notify("description/error", :instance => "#{@url}/#{@controller.id}", :message => err.message)
|
|
110
110
|
end# }}}
|
|
111
111
|
def inform_manipulate_change(status,dataelements,endpoints) # {{{
|
|
112
112
|
unless status.nil?
|
|
113
113
|
@controller.serialize_status!
|
|
114
|
-
@controller.notify("
|
|
114
|
+
@controller.notify("status/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :id => status.id, :message => status.message)
|
|
115
115
|
end
|
|
116
116
|
unless dataelements.nil?
|
|
117
117
|
@controller.serialize_dataelements!
|
|
118
|
-
@controller.notify("
|
|
118
|
+
@controller.notify("dataelements/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => dataelements)
|
|
119
119
|
end
|
|
120
120
|
unless endpoints.nil?
|
|
121
121
|
@controller.serialize_endpoints!
|
|
122
|
-
@controller.notify("
|
|
122
|
+
@controller.notify("endpoints/change", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position, :changed => endpoints)
|
|
123
123
|
end
|
|
124
124
|
end # }}}
|
|
125
125
|
def inform_position_change(ipc={}) # {{{
|
|
126
126
|
@controller.serialize_positions!
|
|
127
127
|
ipc[:instance] = "#{@url}/#{@controller.id}"
|
|
128
|
-
@controller.notify("
|
|
128
|
+
@controller.notify("position/change", ipc)
|
|
129
129
|
end # }}}
|
|
130
130
|
def inform_state_change(newstate) # {{{
|
|
131
131
|
if @controller
|
|
132
132
|
@controller.serialize_state!
|
|
133
|
-
@controller.notify("
|
|
133
|
+
@controller.notify("state/change", :instance => "#{@url}/#{@controller.id}", :state => newstate)
|
|
134
134
|
end
|
|
135
135
|
end # }}}
|
|
136
136
|
|
|
137
137
|
def vote_sync_after # {{{
|
|
138
|
-
@controller.call_vote("
|
|
138
|
+
@controller.call_vote("activity/syncing_after", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
|
|
139
139
|
end # }}}
|
|
140
140
|
def vote_sync_before # {{{
|
|
141
|
-
@controller.call_vote("
|
|
141
|
+
@controller.call_vote("activity/syncing_before", :endpoint => @handler_endpoint, :instance => "#{@url}/#{@controller.id}", :activity => @handler_position)
|
|
142
142
|
end # }}}
|
|
143
143
|
|
|
144
|
-
def callback(result)
|
|
144
|
+
def callback(result=nil,options={})
|
|
145
145
|
@handler_returnValue = result
|
|
146
146
|
@controller.callbacks.delete(@handler_passthrough)
|
|
147
147
|
@handler_passthrough = nil
|
|
@@ -1,90 +1,65 @@
|
|
|
1
1
|
<properties xmlns="http://riddl.org/ns/common-patterns/properties/1.0">
|
|
2
|
-
<info>
|
|
3
|
-
<state>
|
|
2
|
+
<info>asd</info>
|
|
3
|
+
<state>stopped</state>
|
|
4
4
|
<handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
|
|
5
|
-
<positions
|
|
5
|
+
<positions>
|
|
6
|
+
<a1>after</a1>
|
|
7
|
+
</positions>
|
|
6
8
|
<dataelements>
|
|
7
|
-
<
|
|
8
|
-
<card>Visa_12345</card>
|
|
9
|
-
<airline>null</airline>
|
|
10
|
-
<hotels>[]</hotels>
|
|
11
|
-
<from>Vienna</from>
|
|
12
|
-
<to>Prague</to>
|
|
13
|
-
<costs>0</costs>
|
|
9
|
+
<x/>
|
|
14
10
|
</dataelements>
|
|
15
11
|
<endpoints>
|
|
16
|
-
<
|
|
17
|
-
<bookHotel>http://gruppe.wst.univie.ac.at/~mangler/services/hotel.php</bookHotel>
|
|
18
|
-
<approve>http://gruppe.wst.univie.ac.at/~mangler/services/approval.php</approve>
|
|
12
|
+
<timeout>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</timeout>
|
|
19
13
|
</endpoints>
|
|
20
|
-
<dsl>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
status.update 1, 'Hotel'
|
|
24
|
-
end
|
|
25
|
-
parallel do
|
|
26
|
-
loop pre_test{data.persons > 0} do
|
|
27
|
-
parallel_branch data.persons do |p|
|
|
28
|
-
call :a2, :bookHotel, { :method => "post", :parameters => { :to => data.to } }, <<-end
|
|
29
|
-
data.hotels << result.value('id')
|
|
30
|
-
data.costs += result.value('costs').to_f
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
manipulate :a3, <<-end
|
|
34
|
-
data.persons -= 1
|
|
35
|
-
end
|
|
14
|
+
<dsl>parallel do
|
|
15
|
+
parallel_branch do
|
|
16
|
+
call :a4, :timeout, { :label => nil, :method => "post", :parameters => { :timeout => a } }
|
|
36
17
|
end
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
alternative data.costs > 700 do
|
|
40
|
-
call :a4, :approve, { :method => "post", :parameters => { :costs => data.costs } }
|
|
18
|
+
parallel_branch do
|
|
19
|
+
call :a5, :timeout, { :label => nil, :method => "post", :parameters => { :timeout => a } }
|
|
41
20
|
end
|
|
42
21
|
end
|
|
22
|
+
call :a2, :timeout, { :label => nil, :method => "post", :parameters => { :timeout => b } }, <<-end
|
|
23
|
+
data.x += "a2,"
|
|
24
|
+
end
|
|
43
25
|
</dsl>
|
|
44
26
|
<dslx>
|
|
45
27
|
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
</parameters>
|
|
54
|
-
</parameters>
|
|
55
|
-
<manipulate output="result"> data.airline = result.value('id')
|
|
56
|
-
data.costs += result.value('costs').to_f
|
|
57
|
-
status.update 1, 'Hotel'</manipulate>
|
|
58
|
-
</call>
|
|
59
|
-
<parallel>
|
|
60
|
-
<loop pre_test="data.persons > 0">
|
|
61
|
-
<parallel_branch pass="data.persons" local="p">
|
|
62
|
-
<call id="a2" endpoint="bookHotel">
|
|
28
|
+
<!--{{{-->
|
|
29
|
+
<parallel svg-label="">
|
|
30
|
+
<parallel_branch svg-label="">
|
|
31
|
+
<call id="a4" endpoint="timeout" svg-label="">
|
|
32
|
+
<parameters>
|
|
33
|
+
<label/>
|
|
34
|
+
<method>post</method>
|
|
63
35
|
<parameters>
|
|
64
|
-
<
|
|
65
|
-
<parameters>
|
|
66
|
-
<to>data.to</to>
|
|
67
|
-
</parameters>
|
|
36
|
+
<timeout>a</timeout>
|
|
68
37
|
</parameters>
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<
|
|
74
|
-
</loop>
|
|
75
|
-
</parallel>
|
|
76
|
-
<choose>
|
|
77
|
-
<alternative condition="data.costs > 700">
|
|
78
|
-
<call id="a4" endpoint="approve">
|
|
38
|
+
</parameters>
|
|
39
|
+
</call>
|
|
40
|
+
</parallel_branch>
|
|
41
|
+
<parallel_branch svg-label="">
|
|
42
|
+
<call id="a5" endpoint="timeout" svg-label="">
|
|
79
43
|
<parameters>
|
|
44
|
+
<label/>
|
|
80
45
|
<method>post</method>
|
|
81
46
|
<parameters>
|
|
82
|
-
<
|
|
47
|
+
<timeout>a</timeout>
|
|
83
48
|
</parameters>
|
|
84
49
|
</parameters>
|
|
85
50
|
</call>
|
|
86
|
-
</
|
|
87
|
-
</
|
|
51
|
+
</parallel_branch>
|
|
52
|
+
</parallel>
|
|
53
|
+
<call id="a2" endpoint="timeout">
|
|
54
|
+
<parameters>
|
|
55
|
+
<label/>
|
|
56
|
+
<method>post</method>
|
|
57
|
+
<parameters>
|
|
58
|
+
<timeout>b</timeout>
|
|
59
|
+
</parameters>
|
|
60
|
+
</parameters>
|
|
61
|
+
<manipulate>data.x += "a2,"</manipulate>
|
|
62
|
+
</call>
|
|
88
63
|
</description>
|
|
89
64
|
</dslx>
|
|
90
65
|
<status>
|
|
@@ -93,48 +68,41 @@ end
|
|
|
93
68
|
</status>
|
|
94
69
|
<description>
|
|
95
70
|
<description xmlns="http://cpee.org/ns/description/1.0">
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
</parameters>
|
|
104
|
-
</parameters>
|
|
105
|
-
<manipulate output="result"> data.airline = result.value('id')
|
|
106
|
-
data.costs += result.value('costs').to_f
|
|
107
|
-
status.update 1, 'Hotel'</manipulate>
|
|
108
|
-
</call>
|
|
109
|
-
<parallel>
|
|
110
|
-
<loop pre_test="data.persons > 0">
|
|
111
|
-
<parallel_branch pass="data.persons" local="p">
|
|
112
|
-
<call id="a2" endpoint="bookHotel">
|
|
71
|
+
<!--{{{-->
|
|
72
|
+
<parallel svg-label="">
|
|
73
|
+
<parallel_branch svg-label="">
|
|
74
|
+
<call id="a4" endpoint="timeout" svg-label="">
|
|
75
|
+
<parameters>
|
|
76
|
+
<label/>
|
|
77
|
+
<method>post</method>
|
|
113
78
|
<parameters>
|
|
114
|
-
<
|
|
115
|
-
<parameters>
|
|
116
|
-
<to>data.to</to>
|
|
117
|
-
</parameters>
|
|
79
|
+
<timeout>a</timeout>
|
|
118
80
|
</parameters>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
<
|
|
124
|
-
</loop>
|
|
125
|
-
</parallel>
|
|
126
|
-
<choose>
|
|
127
|
-
<alternative condition="data.costs > 700">
|
|
128
|
-
<call id="a4" endpoint="approve">
|
|
81
|
+
</parameters>
|
|
82
|
+
</call>
|
|
83
|
+
</parallel_branch>
|
|
84
|
+
<parallel_branch svg-label="">
|
|
85
|
+
<call id="a5" endpoint="timeout" svg-label="">
|
|
129
86
|
<parameters>
|
|
87
|
+
<label/>
|
|
130
88
|
<method>post</method>
|
|
131
89
|
<parameters>
|
|
132
|
-
<
|
|
90
|
+
<timeout>a</timeout>
|
|
133
91
|
</parameters>
|
|
134
92
|
</parameters>
|
|
135
93
|
</call>
|
|
136
|
-
</
|
|
137
|
-
</
|
|
94
|
+
</parallel_branch>
|
|
95
|
+
</parallel>
|
|
96
|
+
<call id="a2" endpoint="timeout">
|
|
97
|
+
<parameters>
|
|
98
|
+
<label/>
|
|
99
|
+
<method>post</method>
|
|
100
|
+
<parameters>
|
|
101
|
+
<timeout>b</timeout>
|
|
102
|
+
</parameters>
|
|
103
|
+
</parameters>
|
|
104
|
+
<manipulate>data.x += "a2,"</manipulate>
|
|
105
|
+
</call>
|
|
138
106
|
</description>
|
|
139
107
|
</description>
|
|
140
108
|
<transformation>
|