cpee 2.0.11 → 2.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ec2d0a3e32433094917a00ceb63a0b31bf58f3d7cc0596a3578ea559c62f7d19
4
- data.tar.gz: e3c0b6196e91ce7453e29e280cc694dee44d2fa004b9a4734742d43558bd4944
3
+ metadata.gz: 8626501eb6fa91fc0c21782e57a5448f070fc717aa38d0cfb68bf783b5608794
4
+ data.tar.gz: a76f7036d8777a7b0d58eb1ba31b4a8c2cf6fe8b0ed45d34fe54001094224be8
5
5
  SHA512:
6
- metadata.gz: 8bd50b009072a41ae75dd650ddbd777802250baf2a667a212c0a79971a837018d9abccb555363c9708c0c1eea2133fba888958ff5b77631b4b9f76ea76288864
7
- data.tar.gz: af9862cf80d23a3653043e5a5b7ebd5015a64f825e521cf9ae57703d1995e5119691f8e85fbeb9444ee5fc9928d72a797b927fc0ba46e900669ff3e0a39a6d0c
6
+ metadata.gz: 4e7cc5e856f65f51c2bf89fdf1870cfede3e191c08b944f48a6eb03def8dea5bd5f9eb1e994863615068e6ff31f6ed33438cac119848b0626000f427125bcd80
7
+ data.tar.gz: 7d630f9034480e0ae433c9c983d30210cf24eaafcca8e89ef8afbacc7bb55e734a69505a91f807cb52c714cd2d1900f7140214519d40b3486f074e099f00ac1a
@@ -53,7 +53,7 @@ $(document).ready(function() {
53
53
  } else {
54
54
  $("body").attr('current-save',res_def['save-url']);
55
55
  }
56
- if (res['testsets-url']) {
56
+ if (res['templates-url']) {
57
57
  $("body").attr('current-templates',res['templates-url']);
58
58
  } else {
59
59
  $("body").attr('current-templates',res_def['templates-url']);
@@ -24,7 +24,7 @@
24
24
  <method>:post</method>
25
25
  <arguments>
26
26
  <behavior>wait_running</behavior>
27
- <url>http://localhost/flow/templates/instantiate.local/Take_Sub.xml</url>
27
+ <url>https://cpee.org/flow/templates/instantiate/Take_Sub.xml</url>
28
28
  <init>
29
29
  <time>4</time>
30
30
  </init>
@@ -15,10 +15,8 @@
15
15
  <method>:post</method>
16
16
  <arguments>
17
17
  <behavior>wait_running</behavior>
18
- <url>http://localhost/flow/templates/instantiate/Take_Perf.xml</url>
19
- <init>
20
- <time>!data.time</time>
21
- </init>
18
+ <url>https://cpee.org/flow/templates/instantiate/Take_Perf.xml</url
19
+ <init/>
22
20
  <endpoints/>
23
21
  <stream/>
24
22
  </arguments>
@@ -3,6 +3,7 @@
3
3
  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
4
4
  <endpoints>
5
5
  <start_url>https://cpee.org/flow/start/url/</start_url>
6
+ <timeout>https://cpee.org/services/timeout.php</timeout>
6
7
  </endpoints>
7
8
  <positions/>
8
9
  <description>
@@ -13,7 +14,7 @@
13
14
  <method>:post</method>
14
15
  <arguments>
15
16
  <behavior>wait_running</behavior>
16
- <url>https://cpee.org/flow/templates/instantiate/Take_Perf.xml</url>
17
+ <url>https://cpee.org/flow/templates/instantiate/Take_X.xml</url>
17
18
  <init/>
18
19
  <endpoints/>
19
20
  <stream/>
@@ -1,6 +1,6 @@
1
1
  <testset xmlns="http://cpee.org/ns/properties/2.0">
2
2
  <dataelements>
3
- <time>5</time>
3
+ <time>15</time>
4
4
  </dataelements>
5
5
  <handlerwrapper>DefaultHandlerWrapper</handlerwrapper>
6
6
  <endpoints>
@@ -19,4 +19,4 @@
19
19
  <data type="nonNegativeInteger" rngui:label="Times"/>
20
20
  </element>
21
21
  </element>
22
- </element>
22
+ </element>
@@ -18,4 +18,4 @@
18
18
  <data type="string"/>
19
19
  </attribute>
20
20
  </element>
21
- </element>
21
+ </element>
@@ -19,4 +19,4 @@
19
19
  <data type="nonNegativeInteger" rngui:label="Times"/>
20
20
  </element>
21
21
  </element>
22
- </element>
22
+ </element>
@@ -18,4 +18,4 @@
18
18
  <data type="string"/>
19
19
  </attribute>
20
20
  </element>
21
- </element>
21
+ </element>
@@ -19,4 +19,4 @@
19
19
  <data type="nonNegativeInteger" rngui:label="Times"/>
20
20
  </element>
21
21
  </element>
22
- </element>
22
+ </element>
@@ -18,4 +18,4 @@
18
18
  <data type="string"/>
19
19
  </attribute>
20
20
  </element>
21
- </element>
21
+ </element>
@@ -267,6 +267,7 @@ function WFAdaptorManifestation(adaptor) {
267
267
  var ep = self.endpoints[$(node).attr('endpoint')];
268
268
  var wait = $('_timing_wait',$(node).children('annotations')).text();
269
269
  var threshold = $('_timing_threshold',$(node).children('annotations')).text();
270
+ var adur = $('_timing_avg',$(node).children('annotations')).text();
270
271
  var lab = $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'');
271
272
  var ret = [ { column: 'ID', value: $(node).attr('id') } ];
272
273
  if (lab != '') {
@@ -278,6 +279,9 @@ function WFAdaptorManifestation(adaptor) {
278
279
  if (threshold != '') {
279
280
  ret.push({ column: 'Threshold', value: 'κ = ' + threshold });
280
281
  }
282
+ if (adur != '') {
283
+ ret.push({ column: 'Duration', value: '~T = ' + adur + 'm' });
284
+ }
281
285
  return ret;
282
286
  },
283
287
  'info': function(node){ return { 'element-endpoint': $(node).attr('endpoint') }; },
@@ -19,4 +19,4 @@
19
19
  <data type="nonNegativeInteger" rngui:label="Times"/>
20
20
  </element>
21
21
  </element>
22
- </element>
22
+ </element>
@@ -18,4 +18,4 @@
18
18
  <data type="string"/>
19
19
  </attribute>
20
20
  </element>
21
- </element>
21
+ </element>
@@ -19,4 +19,4 @@
19
19
  <data type="nonNegativeInteger" rngui:label="Times"/>
20
20
  </element>
21
21
  </element>
22
- </element>
22
+ </element>
@@ -18,4 +18,4 @@
18
18
  <data type="string"/>
19
19
  </attribute>
20
20
  </element>
21
- </element>
21
+ </element>
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.0.11"
3
+ s.version = "2.0.13"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Preliminary release of cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -227,7 +227,7 @@ module CPEE
227
227
  end
228
228
  end rescue nil # all the ones that are not ok, are ignored
229
229
  end
230
- multi.set(File.join(instance, 'attributes', 'uuid'), SecureRandom.uuid)
230
+ multi.set(File.join(instance, 'attributes', 'uuid'), uuid)
231
231
  multi.zadd(File.join(instance, 'attributes'), -2, 'uuid')
232
232
  multi.set(File.join(instance, 'attributes', 'info'), name)
233
233
  multi.zadd(File.join(instance, 'attributes'), -1, 'info')
@@ -102,28 +102,24 @@ module CPEE
102
102
  end
103
103
  end #}}}
104
104
 
105
- class CreateSubscription < Riddl::Implementation #{{{
105
+ class CreateSubscription < Riddl::Implementation #{{{
106
106
  def response
107
107
  id = @a[0]
108
108
  opts = @a[1]
109
109
 
110
- if opts[:statemachine].readonly? id
111
- @status = 423
112
- else
113
- key = Digest::MD5.hexdigest(Kernel::rand().to_s)
110
+ key = Digest::MD5.hexdigest(Kernel::rand().to_s)
114
111
 
115
- url = @p[0].name == 'url' ? @p.shift.value : nil
116
- values = []
117
- while @p.length > 0
118
- topic = @p.shift.value
119
- base = @p.shift
120
- type = base.name
121
- values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
122
- end
123
- @header = CPEE::Persistence::set_handler(id,opts,key,url,values)
124
-
125
- Riddl::Parameter::Simple.new('key',key)
112
+ url = @p[0].name == 'url' ? @p.shift.value : nil
113
+ values = []
114
+ while @p.length > 0
115
+ topic = @p.shift.value
116
+ base = @p.shift
117
+ type = base.name
118
+ values += base.value.split(',').map { |i| File.join(topic,type[0..-2],i) }
126
119
  end
120
+ @header = CPEE::Persistence::set_handler(id,opts,key,url,values)
121
+
122
+ Riddl::Parameter::Simple.new('key',key)
127
123
  end
128
124
  end #}}}
129
125
 
@@ -180,7 +176,7 @@ module CPEE
180
176
  state = mess.dig('content','state')
181
177
  if state == 'finished' || state == 'abandoned'
182
178
  opts.dig(:sse_connections,mess.dig('instance').to_i)&.each do |key,sse|
183
- EM.add_timer(2) do # just to be sure that all messages arrived
179
+ EM.add_timer(10) do # just to be sure that all messages arrived. 10 seconds should be enough ... we think ... therefore we are (not sure)
184
180
  sse.close
185
181
  end
186
182
  end
@@ -202,7 +198,7 @@ module CPEE
202
198
  @opts = @a[1]
203
199
  @id = @a[0]
204
200
  @key = @r[-2]
205
- if !@opts[:statemachine].readonly?(@id) && CPEE::Persistence::exists_handler?(@id,@opts,@key)
201
+ if CPEE::Persistence::exists_handler?(@id,@opts,@key)
206
202
  @opts[:sse_connections][@id] ||= {}
207
203
  @opts[:sse_connections][@id][@key] = self
208
204
  true
@@ -660,8 +660,11 @@ module CPEE
660
660
  @status = 422 # semantic error
661
661
  else
662
662
  begin
663
- PutDescription::set(id,opts,@p[0].value.read)
664
- rescue
663
+ # force-encoding because johannes managed to sneak in ascii special characters. why the browser is not sanitizing it is beyond me.
664
+ PutDescription::set(id,opts,@p[0].value.read.force_encoding('UTF-8'))
665
+ rescue => e
666
+ puts e.message
667
+ puts e.backtrace
665
668
  @status = 400
666
669
  end
667
670
  end
@@ -126,6 +126,9 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
126
126
  if headers['CPEE_INSTANTIATION']
127
127
  @controller.notify("task/instantiation", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']))
128
128
  end
129
+ if headers['CPEE_EVENT']
130
+ @controller.notify("task/#{headers['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :activity_uuid => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint)
131
+ end
129
132
  if headers['CPEE_CALLBACK'] && headers['CPEE_CALLBACK'] == 'true' && result.any?
130
133
  headers['CPEE_UPDATE'] = true
131
134
  callback result, headers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.11
4
+ version: 2.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: tools
12
12
  cert_chain: []
13
- date: 2020-10-23 00:00:00.000000000 Z
13
+ date: 2020-11-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl
@@ -508,16 +508,11 @@ files:
508
508
  - server/resources/topics.xml
509
509
  - server/resources/transformation.xml
510
510
  - server/resources/transformation_dslx.xsl
511
- - server/routing/end.pid
512
511
  - server/routing/end.rb
513
- - server/routing/forward-events.pid
514
512
  - server/routing/forward-events.rb
515
- - server/routing/forward-votes.pid
516
513
  - server/routing/forward-votes.rb
517
- - server/routing/persist.pid
518
514
  - server/routing/persist.rb
519
515
  - server/server.conf
520
- - server/server.pid
521
516
  - server/server.rb
522
517
  - tools/cpee
523
518
  - tools/server/resources/notifications/logging/subscription.xml
@@ -1 +0,0 @@
1
- 189089
@@ -1 +0,0 @@
1
- 189071
@@ -1 +0,0 @@
1
- 189081
@@ -1 +0,0 @@
1
- 189085
@@ -1 +0,0 @@
1
- 189185