cpee-instantiation 1.0.10 → 1.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: 4d4f2d6bb294992580a51fe2e5f4c5c122506fe31a327fcbae1e88845964e02f
4
- data.tar.gz: f2046e8bc78d8ff5d69feed0ba54ffc23d35da3afba9f58bf6417fe8963e01a2
3
+ metadata.gz: 0ff6b47e9462a3f92a2e6536974359fe3cc0b18b7583518d88f83998e2f79885
4
+ data.tar.gz: b881374ebad85ebe328cfe97534829979d3aec54ff8a0d976d89f79245a78d87
5
5
  SHA512:
6
- metadata.gz: 316d7c396535c85ba2030750591c3152e15a99142120925ed3b6758d0f755a1276e1b3da6c074caab507ae38f8159fdcd5843d556a7417a408e12396b72564e8
7
- data.tar.gz: 96dfd842fd444518894bc782c48eb6ca69bca06bb02077c64a1af503843f1bec454bfc4bbdb666b2477ae4bbbc040862586e02e6a3f5cb4a12205c1a8ace949d
6
+ metadata.gz: 9fd8d7ec4b66b06b94b53976886854548d27a1fc41faaf76b6fb994dbb1e58432c53be3a799eccbd23c9890723b8fab453e0375360a0f9dd981057097a672947
7
+ data.tar.gz: 3d3172e5b4a6a290a34ce06867539307bb0ba283c3a25a7770f17c0bba40a37f7bd05a02c29028f4c2b2cef50d52816391c42a08e750981e4c631e9c51c36b34
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee-instantiation"
3
- s.version = "1.0.10"
3
+ s.version = "1.0.13"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "Subprocess instantiation service for the cloud process execution engine (cpee.org)"
@@ -84,7 +84,6 @@ module CPEE
84
84
  end
85
85
  parts << Riddl::Parameter::Simple.new('url', s.attributes['url'])
86
86
  s.find('sub:topic').each do |t|
87
- p s.find('sub:event').map{ |e| e.text }
88
87
  if (evs = t.find('sub:event').map{ |e| e.text }.join(',')).length > 0
89
88
  parts << Riddl::Parameter::Simple.new('topic', t.attributes['id'])
90
89
  parts << Riddl::Parameter::Simple.new('events', evs)
@@ -137,7 +136,7 @@ module CPEE
137
136
  if data && !data.empty?
138
137
  content = XML::Smart.string('<dataelements xmlns="http://cpee.org/ns/properties/2.0"/>')
139
138
  JSON::parse(data).each do |k,v|
140
- content.root.add(k,v)
139
+ content.root.add(k,CPEE::ValueHelper::generate(v))
141
140
  end
142
141
  srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
143
142
  res = srv.resource("/#{instance}/properties/dataelements/")
@@ -293,19 +292,29 @@ module CPEE
293
292
  cblist = @a[2]
294
293
  instance = @p[1].value
295
294
 
296
- srv = Riddl::Client.new(cpee, File.join(cpee,'?riddl-description'))
297
- res = srv.resource("/#{instance}/properties/attributes/uuid")
295
+ srv = Riddl::Client.new(cpee)
296
+ res = srv.resource("/#{instance}/properties/attributes/uuid/")
298
297
  status, response = res.get
299
298
 
300
299
  if status >= 200 && status < 300
301
- uuid = XML::Smart::string(response.first.value).root.text
300
+ uuid = response.first.value
302
301
  handle_data cpee, instance, @p[2]&.value
303
302
  handle_waiting cpee, instance, uuid, @p[0].value, selfurl, cblist
304
303
  handle_starting cpee, instance, @p[0].value
304
+
305
+ send = {
306
+ 'CPEE-INSTANCE' => instance,
307
+ 'CPEE-INSTANCE-URL' => File.join(cpee,instance),
308
+ 'CPEE-INSTANCE-UUID' => uuid,
309
+ 'CPEE-BEHAVIOR' => @p[0].value
310
+ }
311
+
305
312
  if @p[0].value =~ /^wait/
306
313
  @headers << Riddl::Header.new('CPEE-CALLBACK','true')
307
314
  end
308
- return Riddl::Parameter::Simple.new("url",cpee + instance)
315
+ Riddl::Parameter::Complex.new('instance','application/json',JSON::generate(send))
316
+ else
317
+ @status = 500
309
318
  end
310
319
  end
311
320
  end #}}}
@@ -375,7 +384,7 @@ module CPEE
375
384
  run InstantiateGit, opts[:cpee], opts[:self], opts[:cblist] if post 'git'
376
385
  end
377
386
  on resource 'instance' do
378
- run HandleInstance, opts[:cpee] if post 'instance'
387
+ run HandleInstance, opts[:cpee], opts[:self], opts[:cblist] if post 'instance'
379
388
  end
380
389
  on resource 'callback' do
381
390
  on resource do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cpee-instantiation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
8
8
  autorequire:
9
9
  bindir: tools
10
10
  cert_chain: []
11
- date: 2021-06-17 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: riddl
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
108
  - !ruby/object:Gem::Version
109
109
  version: '0'
110
110
  requirements: []
111
- rubygems_version: 3.1.6
111
+ rubygems_version: 3.2.22
112
112
  signing_key:
113
113
  specification_version: 4
114
114
  summary: Subprocess instantiation service for the cloud process execution engine (cpee.org)