cpee 2.0 → 2.0.1

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: 97540332122030fa3cc477f5f47bcff6ddbd5f0977a530075c9c901cfdd2d9b1
4
- data.tar.gz: 0a7e55a6145144ab94b304e202b0d550489dd3868b8fa0cf015bf0427c358c50
3
+ metadata.gz: e789aa5259bacd7b1a1cd8e9c819e078c4acc084983e727347b051c8f861956d
4
+ data.tar.gz: eb7cbc79394315d929140f424e0f3d02ee11766cb4275433437d0fe8f49dfd8d
5
5
  SHA512:
6
- metadata.gz: b69f463b07d093c897b2d1b39bbb089b8a9e6e32cd2ae58632111c72b3d9e0c1945f31e67059f524ba2d1b822e84e75b3cbd8150c6849ae52779ac95950aef32
7
- data.tar.gz: ab3ab54ff2bb5956ab00fd1b5bbc1b76258fdd6e3f2b96754131d90ad29a44a36072799e2898b61b1840d87ee238d342dde66e8f94d9f265101355f24878d457
6
+ metadata.gz: e06026cedecdf072de2db0a66f2083f72e83a638d672543509f7f02af50c1aac06a1c20baef44afc20a9112b245f756b73da0d84ed38293981f07396dd076aa2
7
+ data.tar.gz: ca785378c81867e507086938e449ef78c3d00d737eedc078541c8cd67e64d20573d51145a2e841bd2e70858c5d628e17ae6ccc4f607cc27aa4468b2ff122ab43
@@ -1,15 +1,6 @@
1
1
  <testset>
2
2
  <positions xmlns="http://cpee.org/ns/properties/2.0"/>
3
3
  <handlerwrapper xmlns="http://cpee.org/ns/properties/2.0">DefaultHandlerWrapper</handlerwrapper>
4
- <handlers>
5
- <handler url="http://localhost:9299/">
6
- <events topic="activity">calling,receiving,done</events>
7
- <events topic="dataelements">change</events>
8
- <events topic="endpoints">change</events>
9
- <events topic="attributes">change</events>
10
- <events topic="task">instantiation</events>
11
- </handler>
12
- </handlers>
13
4
  <dataelements xmlns="http://cpee.org/ns/properties/2.0">
14
5
  <persons>3</persons>
15
6
  <card>Visa_12345</card>
@@ -74,4 +74,4 @@
74
74
  <dataelements type="rest"/>
75
75
  <endpoints type="rest"/>
76
76
  </transformation>
77
- </testset>
77
+ </testset>
@@ -74,4 +74,4 @@
74
74
  <dataelements type="rest"/>
75
75
  <endpoints type="rest"/>
76
76
  </transformation>
77
- </testset>
77
+ </testset>
@@ -74,4 +74,4 @@
74
74
  <dataelements type="rest"/>
75
75
  <endpoints type="rest"/>
76
76
  </transformation>
77
- </testset>
77
+ </testset>
@@ -114,4 +114,4 @@
114
114
  </element>
115
115
  </element>
116
116
  </element>
117
- </element>
117
+ </element>
@@ -114,4 +114,4 @@
114
114
  </element>
115
115
  </element>
116
116
  </element>
117
- </element>
117
+ </element>
@@ -114,4 +114,4 @@
114
114
  </element>
115
115
  </element>
116
116
  </element>
117
- </element>
117
+ </element>
@@ -114,4 +114,4 @@
114
114
  </element>
115
115
  </element>
116
116
  </element>
117
- </element>
117
+ </element>
@@ -114,4 +114,4 @@
114
114
  </element>
115
115
  </element>
116
116
  </element>
117
- </element>
117
+ </element>
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.0"
3
+ s.version = "2.0.1"
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."
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
  s.executables = ['cpee']
15
15
  s.test_files = Dir['{test/*,test/*/tc_*.rb}']
16
16
 
17
- s.required_ruby_version = '>=2.4.0'
17
+ s.required_ruby_version = '>=2.7.0'
18
18
 
19
19
  s.authors = ['Juergen eTM Mangler','Ralph Vigne','Gerhard Stuermer']
20
20
 
@@ -204,6 +204,20 @@ module CPEE
204
204
  p = path(e)
205
205
  multi.zadd(File.join(instance, File.dirname(p)), i, File.basename(p))
206
206
  end
207
+ Dir[File.join(opts[:notifications_init],'*','subscription.xml')].each do |f|
208
+ XML::Smart::open_unprotected(f) do |doc|
209
+ doc.register_namespace 'np', 'http://riddl.org/ns/common-patterns/notifications-producer/2.0'
210
+ key = File.basename(File.dirname(f))
211
+ url = doc.find('string(/np:subscription/@url)')
212
+ multi.sadd("instance:#{id}/handlers",key)
213
+ multi.set("instance:#{id}/handlers/#{key}/url",url)
214
+ doc.find('/np:subscription/np:topic/*').each do |e|
215
+ c = File.join(e.parent.attributes['id'],e.qname.name,e.text)
216
+ multi.sadd("instance:#{id}/handlers/#{key}",c)
217
+ multi.sadd("instance:#{id}/handlers/#{c}",key)
218
+ end
219
+ end rescue nil # all the ones that are not ok, are ignored
220
+ end
207
221
  multi.set(File.join(instance, 'attributes', 'uuid'), SecureRandom.uuid)
208
222
  multi.zadd(File.join(instance, 'attributes'), -2, 'uuid')
209
223
  multi.set(File.join(instance, 'attributes', 'info'), name)
@@ -146,7 +146,9 @@ module CPEE
146
146
  end
147
147
 
148
148
  if (node = doc.find('/p:properties/p:positions')).any?
149
- CPEE::Properties::PatchPositions::set id, opts, node.first.dump
149
+ if node.first.find('p:*').any?
150
+ CPEE::Properties::PatchPositions::set id, opts, node.first.dump
151
+ end
150
152
  end
151
153
 
152
154
  if (node = doc.find('/p:properties/p:state')).any?
@@ -185,7 +187,9 @@ module CPEE
185
187
  end
186
188
 
187
189
  if (node = doc.find('/p:properties/p:positions')).any?
188
- CPEE::Properties::PutPositions::set id, opts, node.first.dump
190
+ if node.first.find('p:*').any?
191
+ CPEE::Properties::PutPositions::set id, opts, node.first.dump
192
+ end
189
193
  end
190
194
 
191
195
  if (node = doc.find('/p:properties/p:state')).any?
@@ -3,7 +3,11 @@ require 'yaml'
3
3
  opts = YAML::load_file(File.join(__dir__,'opts.yaml'))
4
4
  opts[:pidf] = __FILE__ + '.pid'
5
5
  opts[:pid] = Process.pid
6
- require_relative '../../../lib/cpee/controller'
6
+ if File.exist? '../../../lib/cpee/controller'
7
+ require_relative '../../../lib/cpee/controller'
8
+ else
9
+ require 'cpee/controller'
10
+ end
7
11
 
8
12
  Dir[File.join(opts[:global_handlerwrappers],'*.rb')].each do |h|
9
13
  require h
@@ -507,11 +507,11 @@
507
507
  <xsl:text>nil</xsl:text>
508
508
  </xsl:when>
509
509
  <xsl:when test="child::node()[not(self::text())]">
510
- <!-- FUUUU, there is probably much more TODO -->
510
+ <!-- FUUUU, there is probably much more TODO. Updated Matthias und Juergen, we tested for ing-opcua/execute -->
511
511
  <xsl:choose>
512
- <xsl:when test="child::*/child::* and count(child::*[not(name()=name(../child::*[1]))])=0">
512
+ <xsl:when test="child::* and name(child::*)=concat(name(.),'_item') and count(child::*[not(name()=name(../child::*[1]))])=0">
513
513
  <xsl:text>"[ </xsl:text>
514
- <xsl:apply-templates select="*" mode="JSON"/>
514
+ <xsl:apply-templates select="*" mode="JSONArrayItem"/>
515
515
  <xsl:text>]"</xsl:text>
516
516
  </xsl:when>
517
517
  <xsl:otherwise>
@@ -655,6 +655,15 @@
655
655
  <xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
656
656
  </xsl:choose>
657
657
  </xsl:template>
658
+ <xsl:template match="*" mode="JSONArrayItem">
659
+ <xsl:call-template name="JSONProperties">
660
+ <xsl:with-param name="parent" select="'Yes'"></xsl:with-param>
661
+ </xsl:call-template>
662
+ <xsl:choose>
663
+ <xsl:when test="following-sibling::*">, </xsl:when>
664
+ <xsl:otherwise><xsl:text> </xsl:text></xsl:otherwise>
665
+ </xsl:choose>
666
+ </xsl:template>
658
667
 
659
668
  <!-- JSON Object Properties -->
660
669
  <xsl:template name="JSONProperties">
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'
4
+ version: 2.0.1
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-05 00:00:00.000000000 Z
13
+ date: 2020-10-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl
@@ -526,7 +526,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
526
526
  requirements:
527
527
  - - ">="
528
528
  - !ruby/object:Gem::Version
529
- version: 2.4.0
529
+ version: 2.7.0
530
530
  required_rubygems_version: !ruby/object:Gem::Requirement
531
531
  requirements:
532
532
  - - ">="