cpee 2.1.88 → 2.1.91

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f85c648e6732a4b5508cd6131378d1f3eeb461366f5e9a96e5038cd98607de4
4
- data.tar.gz: 14d215d10a904998811c28109b15f209bc44e2aa0da37e5861fc2358588c7c54
3
+ metadata.gz: 7826a9cc5914c6a2d2c33e1fbfc64bef917aef446ca899599edaf13dc9c52fdd
4
+ data.tar.gz: 9c25629356d3c85efe04ce7fd6b1317bfc053465ecd3384fd0d3a2bfc0df6190
5
5
  SHA512:
6
- metadata.gz: '0107678fb2ac36f1242134f86d76fb3a367f78ab9871cc326c27e72a4060fd568a1456e11672466e128a64359aa91db57e752eedeaf0963b977e3b300cc8bda3'
7
- data.tar.gz: 2124c327fee32b4f36bf52ed5dc9c38c44ad015a7a6b68551654672598a7a52cf3e9b918c9fade228dcbe680902ecbd738d4227296d466add7d0713c51b932fd
6
+ metadata.gz: 86cc1b6157b1e05dcd6bde0417f15e027e565e032cc4aa9714de25506a3dd3b1dd5802580552ab047c1e776b9f0a8f0286a9935f3a84edea6428720443519db3
7
+ data.tar.gz: 6b23dd951e896591748d05ff281fa673710d0eb5828c5e93d1fb64e03276092b26bbb49b86840576c91dc658e2bb63352fe8e585d7557b2e315e74c026bbdddb
data/cpee.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.1.88"
3
+ s.version = "2.1.91"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0-or-later"
6
6
  s.summary = "The cloud process execution engine (cpee.org). If you just need workflow execution, without a rest service exposing it, then use WEEL."
@@ -29,29 +29,29 @@ module CPEE
29
29
 
30
30
  SERVER = File.expand_path(File.join(__dir__,'..','cpee.xml'))
31
31
  PROPERTIES_PATHS_FULL = %w{
32
- /p:properties/p:executionhandler
33
- /p:properties/p:positions/p:*
34
- /p:properties/p:positions/p:*/@*
35
- /p:properties/p:dataelements/p:*
36
- /p:properties/p:endpoints/p:*
37
- /p:properties/p:attributes/p:*
38
- /p:properties/p:transformation/p:*
39
- /p:properties/p:transformation/p:*/@*
40
- /p:properties/p:description
41
- /p:properties/p:dslx
42
- /p:properties/p:dsl
43
- /p:properties/p:status/p:id
44
- /p:properties/p:status/p:message
45
- /p:properties/p:state/@changed
46
- /p:properties/p:state
32
+ /p:*/p:executionhandler
33
+ /p:*/p:positions/p:*
34
+ /p:*/p:positions/p:*/@*
35
+ /p:*/p:attributes/p:*
36
+ /p:*/p:dataelements/p:*
37
+ /p:*/p:endpoints/p:*
38
+ /p:*/p:transformation/p:*
39
+ /p:*/p:transformation/p:*/@*
40
+ /p:*/p:description
41
+ /p:*/p:dslx
42
+ /p:*/p:dsl
43
+ /p:*/p:status/p:id
44
+ /p:*/p:status/p:message
45
+ /p:*/p:state/@changed
46
+ /p:*/p:state
47
47
  }
48
48
  PROPERTIES_PATHS_INDEX_UNORDERED = %w{
49
- /p:properties/p:positions/p:*
49
+ /p:*/p:positions/p:*
50
50
  }
51
51
  PROPERTIES_PATHS_INDEX_ORDERED = %w{
52
- /p:properties/p:dataelements/p:*
53
- /p:properties/p:endpoints/p:*
54
- /p:properties/p:attributes/p:*
52
+ /p:*/p:dataelements/p:*
53
+ /p:*/p:endpoints/p:*
54
+ /p:*/p:attributes/p:*
55
55
  }
56
56
  def self::implementation(opts)
57
57
  opts[:see_instances] ||= opts[:see_instances].nil? ? false : opts[:see_instances]
@@ -318,7 +318,9 @@ module CPEE
318
318
  doc.register_namespace 'p', 'http://cpee.org/ns/properties/2.0'
319
319
  doc.register_namespace 'sub', 'http://riddl.org/ns/common-patterns/notifications-producer/2.0'
320
320
 
321
- id, uuid = NewInstance::create(opts,redis,doc.find('string(/*/p:attributes/p:info)'))
321
+ name = doc.find('string(/*/p:attributes/p:info)')
322
+
323
+ id, uuid = NewInstance::create(opts,redis,name,doc)
322
324
 
323
325
  subscriptions = []
324
326
  (doc.find('/*/sub:subscriptions/sub:subscription') rescue []).each do |s|
@@ -343,7 +345,13 @@ module CPEE
343
345
  CPEE::Persistence::set_handler(id,opts,*sub)
344
346
  end
345
347
 
346
- CPEE::Properties::Put::change_first(id,opts,doc)
348
+ content = {
349
+ :state => 'ready',
350
+ :attributes => CPEE::Persistence::extract_list(id,opts,'attributes').to_h
351
+ }
352
+ CPEE::Message::send(:event,'state/change',File.join(opts[:url],'/'),id,uuid,name,content,redis)
353
+
354
+ CPEE::Properties::Put::change_first(id,opts,doc) # change again, for proper event sending
347
355
  CPEE::Properties::PutState::run(id,opts,'running') if doc.find('string(/*/p:state)') == 'running'
348
356
 
349
357
  @headers << Riddl::Header.new("CPEE-INSTANCE", id.to_s)
@@ -357,15 +365,15 @@ module CPEE
357
365
  class NewInstance < Riddl::Implementation #{{{
358
366
  def self::path(e)
359
367
  ret = []
360
- until e.qname.name == 'properties'
368
+ until e.parent.is_a? XML::Smart::Dom
361
369
  ret << (e.class == XML::Smart::Dom::Attribute ? '@' : '') + e.qname.name
362
370
  e = e.parent
363
371
  end
364
372
  File.join(*ret.reverse)
365
373
  end
366
374
 
367
- def self::create(opts,redis,name)
368
- doc = XML::Smart::open_unprotected(opts[:properties_init])
375
+ def self::create(opts,redis,name,doc=nil)
376
+ doc = XML::Smart::open_unprotected(opts[:properties_init]) if doc.nil?
369
377
  doc.register_namespace 'p', 'http://cpee.org/ns/properties/2.0'
370
378
  id = CPEE::Persistence::new_object(opts)
371
379
  uuid = SecureRandom.uuid
@@ -373,11 +381,12 @@ module CPEE
373
381
  redis.multi do |multi|
374
382
  multi.zadd('instances',id,id)
375
383
  doc.root.find(PROPERTIES_PATHS_FULL.join(' | ')).each do |e|
384
+ p = NewInstance::path(e)
376
385
  if e.class == XML::Smart::Dom::Element && e.element_only?
377
386
  val = e.find('*').map { |f| f.dump }.join
378
- multi.set(File.join(instance, NewInstance::path(e)), val)
387
+ multi.set(File.join(instance, p), val)
379
388
  else
380
- multi.set(File.join(instance, NewInstance::path(e)), e.text)
389
+ multi.set(File.join(instance, p), e.text)
381
390
  end
382
391
  end
383
392
  doc.root.find(PROPERTIES_PATHS_INDEX_UNORDERED.join(' | ')).each do |e|
@@ -408,13 +417,8 @@ module CPEE
408
417
  multi.zadd(File.join(instance, 'attributes'), -1, 'info')
409
418
  multi.set(File.join(instance, 'state', '@changed'), Time.now.xmlschema(3))
410
419
  end
411
- content = {
412
- :state => 'ready',
413
- :attributes => CPEE::Persistence::extract_list(id,opts,'attributes').to_h
414
- }
415
- CPEE::Message::send(:event,'state/change',File.join(opts[:url],'/'),id,uuid,name,content,redis)
416
420
 
417
- return id, uuid
421
+ [id, uuid]
418
422
  end
419
423
 
420
424
  def response
@@ -423,6 +427,11 @@ module CPEE
423
427
  name = @p[0].value
424
428
 
425
429
  id, uuid = NewInstance::create(opts,redis,name)
430
+ content = {
431
+ :state => 'ready',
432
+ :attributes => CPEE::Persistence::extract_list(id,opts,'attributes').to_h
433
+ }
434
+ CPEE::Message::send(:event,'state/change',File.join(opts[:url],'/'),id,uuid,name,content,redis)
426
435
 
427
436
  @headers << Riddl::Header.new("CPEE-INSTANCE", id.to_s)
428
437
  @headers << Riddl::Header.new("CPEE-INSTANCE-URL", File.join(opts[:url].to_s,id.to_s,'/'))
@@ -1 +1 @@
1
- 1030515
1
+ 1396178
@@ -1 +1 @@
1
- 1030533
1
+ 1396198
@@ -1 +1 @@
1
- 1030527
1
+ 1396191
@@ -1 +1 @@
1
- 1030521
1
+ 1396184
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.1.88
4
+ version: 2.1.91
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
@@ -9,7 +9,7 @@ authors:
9
9
  - Gerhard Stuermer
10
10
  bindir: tools
11
11
  cert_chain: []
12
- date: 2025-07-08 00:00:00.000000000 Z
12
+ date: 1980-01-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: riddl
@@ -961,7 +961,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
961
961
  - !ruby/object:Gem::Version
962
962
  version: '0'
963
963
  requirements: []
964
- rubygems_version: 3.6.2
964
+ rubygems_version: 3.6.7
965
965
  specification_version: 4
966
966
  summary: The cloud process execution engine (cpee.org). If you just need workflow
967
967
  execution, without a rest service exposing it, then use WEEL.