cpee 2.1.119 → 2.1.120
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/cpee.gemspec +2 -1
- data/server/executionhandlers/eval/connection.rb +5 -2
- data/server/executionhandlers/eval/controller.rb +5 -3
- data/server/executionhandlers/ruby/connection.rb +50 -50
- data/server/routing/end.pid +1 -1
- data/server/routing/forward-events-00.pid +1 -1
- data/server/routing/forward-votes.pid +1 -1
- data/server/routing/persist.pid +1 -1
- metadata +21 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bd002e776366ffd4053f69d04e34e88d6e17cede48668ddeec71dd0a8d423c1
|
|
4
|
+
data.tar.gz: f7141f31c96892dbd83146f6bfe56de06d620f2a1958282815f26db58575ea96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 92fe3afab3035858ff7be53198418be5364b50e10b39a294a662ddb285d241f12bbb8ac44ce3dca207862f841d73ae47ad6f9c209b5bea9979dfe74829c39da9
|
|
7
|
+
data.tar.gz: eae4fc2fc3cd2b4f9c206c0318198e9bd6295ea61b49366217b3c81a3c5426aebab5b4e6ea8d99af813d46cc2be7bfb42c65ad018245c556327b6033a924fd0c
|
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.
|
|
3
|
+
s.version = "2.1.120"
|
|
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."
|
|
@@ -33,4 +33,5 @@ Gem::Specification.new do |s|
|
|
|
33
33
|
s.add_runtime_dependency 'get_process_mem', '~>0.2'
|
|
34
34
|
s.add_runtime_dependency 'webrick', '~>1.7'
|
|
35
35
|
s.add_runtime_dependency 'by', '~> 1.1', '>= 1.1.0'
|
|
36
|
+
s.add_runtime_dependency 'concurrent-ruby', '~> 1.3', '>= 1.3.5'
|
|
36
37
|
end
|
|
@@ -356,7 +356,7 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
|
356
356
|
|
|
357
357
|
def prepare(__lock,__dataelements,__endpoints,__status,__local,__additional,__code,__exec_endpoints,__exec_parameters) #{{{
|
|
358
358
|
__struct = if __code
|
|
359
|
-
manipulate(true,__lock,__dataelements,__endpoints,__status,__local,__additional,__code,'
|
|
359
|
+
manipulate(true,__lock,__dataelements,__endpoints,__status,__local,__additional,__code,'prepare')
|
|
360
360
|
else
|
|
361
361
|
WEEL::ReadStructure.new(__dataelements,__endpoints,__local,__additional)
|
|
362
362
|
end
|
|
@@ -381,7 +381,10 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
|
381
381
|
def test_condition(__eid,__dataelements,__endpoints,__local,__additional,__code,__args={}) #{{{
|
|
382
382
|
__struct = WEEL::ReadStructure.new(__dataelements,__endpoints,__local,__additional).instance_eval(__code,'Condition',1)
|
|
383
383
|
|
|
384
|
-
|
|
384
|
+
__struct = 'false' unless __struct
|
|
385
|
+
__struct = (__struct == 'false' || __struct == 'null' || __struct == 'nil' || __struct == false ? false : true)
|
|
386
|
+
|
|
387
|
+
@controller.notify("gateway/decide", :eid => __eid, :instance_uuid => @controller.uuid, :code => __code, :condition => __struct)
|
|
385
388
|
@controller.notify("gateway/annotation", :eid => __eid, :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :annotations => {})
|
|
386
389
|
__struct
|
|
387
390
|
end #}}}
|
|
@@ -22,6 +22,7 @@ require 'cpee/attributes_helper'
|
|
|
22
22
|
require 'cpee/message'
|
|
23
23
|
require 'cpee/redis'
|
|
24
24
|
require 'cpee/persistence'
|
|
25
|
+
require 'get_process_mem'
|
|
25
26
|
|
|
26
27
|
require 'ostruct'
|
|
27
28
|
class ParaStruct < OpenStruct
|
|
@@ -47,7 +48,6 @@ class Controller
|
|
|
47
48
|
end
|
|
48
49
|
|
|
49
50
|
@attributes_helper = AttributesHelper.new
|
|
50
|
-
@attributes_translated = @attributes_helper.translate(attributes,dataelements,endpoints)
|
|
51
51
|
@thread = nil
|
|
52
52
|
@opts = opts
|
|
53
53
|
@instance = nil
|
|
@@ -99,12 +99,14 @@ class Controller
|
|
|
99
99
|
attr_reader :id
|
|
100
100
|
attr_reader :attributes
|
|
101
101
|
attr_reader :loop_guard
|
|
102
|
-
|
|
102
|
+
|
|
103
|
+
def attributes_translated
|
|
104
|
+
@attributes_translated || @attributes_translated = @attributes_helper.translate(attributes,dataelements,endpoints)
|
|
105
|
+
end
|
|
103
106
|
|
|
104
107
|
def uuid
|
|
105
108
|
@attributes['uuid']
|
|
106
109
|
end
|
|
107
|
-
|
|
108
110
|
def host
|
|
109
111
|
@opts[:host]
|
|
110
112
|
end
|
|
@@ -372,79 +372,79 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
|
372
372
|
end
|
|
373
373
|
end
|
|
374
374
|
|
|
375
|
-
def argument_eval(
|
|
375
|
+
def argument_eval(__code,__struct)
|
|
376
376
|
send = []
|
|
377
|
-
send.push Riddl::Parameter::Simple::new('code',
|
|
378
|
-
send.push Riddl::Parameter::Complex::new('dataelements','application/json', JSON::generate(
|
|
379
|
-
send.push Riddl::Parameter::Complex::new('local','application/json', JSON::generate(
|
|
380
|
-
send.push Riddl::Parameter::Complex::new('endpoints','application/json', JSON::generate(
|
|
381
|
-
send.push Riddl::Parameter::Complex::new('additional','application/json', JSON::generate(
|
|
377
|
+
send.push Riddl::Parameter::Simple::new('code',__code)
|
|
378
|
+
send.push Riddl::Parameter::Complex::new('dataelements','application/json', JSON::generate(__struct.data))
|
|
379
|
+
send.push Riddl::Parameter::Complex::new('local','application/json', JSON::generate(__struct.local)) if __struct.local
|
|
380
|
+
send.push Riddl::Parameter::Complex::new('endpoints','application/json', JSON::generate(__struct.endpoints))
|
|
381
|
+
send.push Riddl::Parameter::Complex::new('additional','application/json', JSON::generate(__struct.additional))
|
|
382
382
|
|
|
383
383
|
status, ret, headers = Riddl::Client.new(@controller.url_code).request 'put' => send
|
|
384
384
|
recv = if status >= 200 && status < 300
|
|
385
385
|
ret.empty? ? nil : JSON::parse(ret[0].value.read)
|
|
386
386
|
else
|
|
387
|
-
code_error_handling ret, 'Parameter ' +
|
|
387
|
+
code_error_handling ret, 'Parameter ' + __code
|
|
388
388
|
end
|
|
389
389
|
recv
|
|
390
390
|
end
|
|
391
391
|
|
|
392
|
-
def prepare(
|
|
393
|
-
|
|
394
|
-
manipulate(true,
|
|
392
|
+
def prepare(__lock,__dataelements,__endpoints,__status,__local,__additional,__code,__exec_endpoints,__exec_parameters) #{{{
|
|
393
|
+
__struct = if __code
|
|
394
|
+
manipulate(true,__lock,__dataelements,__endpoints,__status,__local,__additional,__code,'prepare')
|
|
395
395
|
else
|
|
396
|
-
WEEL::ReadStructure.new(
|
|
396
|
+
WEEL::ReadStructure.new(__dataelements,__endpoints,__local,__additional)
|
|
397
397
|
end
|
|
398
|
-
@handler_endpoint =
|
|
398
|
+
@handler_endpoint = __exec_endpoints.is_a?(Array) ? __exec_endpoints.map{ |ep| __struct.endpoints[ep] }.compact : __struct.endpoints[__exec_endpoints]
|
|
399
399
|
if @controller.attributes['sim_engine']
|
|
400
400
|
@handler_endpoint_orig = @handler_endpoint
|
|
401
401
|
@handler_endpoint = @controller.attributes['sim_engine'].to_s + '?original_endpoint=' + Riddl::Protocols::Utils::escape(@handler_endpoint)
|
|
402
402
|
end
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
if
|
|
408
|
-
|
|
409
|
-
elsif
|
|
410
|
-
argument_transform_value
|
|
403
|
+
__params = __exec_parameters.dup
|
|
404
|
+
__params[:arguments] = __params[:arguments].dup if __params[:arguments]
|
|
405
|
+
__params[:arguments]&.map! do |__ele|
|
|
406
|
+
__tmp = __ele.dup
|
|
407
|
+
if __tmp.value.is_a?(WEEL::ProcString)
|
|
408
|
+
__tmp.value = argument_eval(__tmp.value.code, __struct)
|
|
409
|
+
elsif __tmp.value.is_a?(Array) || __tmp.value.is_a?(Hash)
|
|
410
|
+
argument_transform_value __tmp.value, __struct
|
|
411
411
|
end
|
|
412
|
-
|
|
412
|
+
__tmp
|
|
413
413
|
end
|
|
414
|
-
|
|
414
|
+
__params
|
|
415
415
|
end #}}}
|
|
416
|
-
def test_condition(
|
|
416
|
+
def test_condition(__eid,__dataelements,__endpoints,__local,__additional,__code,__args={}) #{{{
|
|
417
417
|
send = []
|
|
418
|
-
send.push Riddl::Parameter::Simple::new('code',
|
|
419
|
-
send.push Riddl::Parameter::Complex::new('dataelements','application/json', JSON::generate(
|
|
420
|
-
send.push Riddl::Parameter::Complex::new('local','application/json', JSON::generate(
|
|
421
|
-
send.push Riddl::Parameter::Complex::new('endpoints','application/json', JSON::generate(
|
|
422
|
-
send.push Riddl::Parameter::Complex::new('additional','application/json', JSON::generate(
|
|
418
|
+
send.push Riddl::Parameter::Simple::new('code',__code)
|
|
419
|
+
send.push Riddl::Parameter::Complex::new('dataelements','application/json', JSON::generate(__dataelements))
|
|
420
|
+
send.push Riddl::Parameter::Complex::new('local','application/json', JSON::generate(__local)) if __local
|
|
421
|
+
send.push Riddl::Parameter::Complex::new('endpoints','application/json', JSON::generate(__endpoints))
|
|
422
|
+
send.push Riddl::Parameter::Complex::new('additional','application/json', JSON::generate(__additional))
|
|
423
423
|
|
|
424
424
|
status, ret, headers = Riddl::Client.new(@controller.url_code).request 'put' => send
|
|
425
|
-
|
|
425
|
+
__struct = if status >= 200 && status < 300
|
|
426
426
|
ret.empty? ? nil : JSON::parse(ret[0].value.read)
|
|
427
427
|
else
|
|
428
428
|
code_error_handling ret, 'Condition ' + code, WEEL::Signal::Error
|
|
429
429
|
end
|
|
430
|
-
|
|
431
|
-
|
|
430
|
+
__struct = 'false' unless __struct
|
|
431
|
+
__struct = (__struct == 'false' || __struct == 'null' || __struct == 'nil' || __struct == false ? false : true)
|
|
432
432
|
|
|
433
|
-
@controller.notify("gateway/decide", :eid =>
|
|
434
|
-
@controller.notify("gateway/annotation", :eid =>
|
|
435
|
-
|
|
433
|
+
@controller.notify("gateway/decide", :eid => __eid, :instance_uuid => @controller.uuid, :code => __code, :condition => __struct)
|
|
434
|
+
@controller.notify("gateway/annotation", :eid => __eid, :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :annotations => {})
|
|
435
|
+
__struct
|
|
436
436
|
end #}}}
|
|
437
|
-
def manipulate(
|
|
438
|
-
|
|
437
|
+
def manipulate(__readonly,__lock,__dataelements,__endpoints,__status,__local,__additional,__code,__where,__result=nil,__options=nil) #{{{
|
|
438
|
+
__lock.synchronize do
|
|
439
439
|
send = []
|
|
440
|
-
send.push Riddl::Parameter::Simple::new('code',
|
|
441
|
-
send.push Riddl::Parameter::Complex::new('dataelements','application/json', JSON::generate(
|
|
442
|
-
send.push Riddl::Parameter::Complex::new('local','application/json', JSON::generate(
|
|
443
|
-
send.push Riddl::Parameter::Complex::new('endpoints','application/json', JSON::generate(
|
|
444
|
-
send.push Riddl::Parameter::Complex::new('additional','application/json', JSON::generate(
|
|
445
|
-
send.push Riddl::Parameter::Complex::new('status','application/json', JSON::generate(
|
|
446
|
-
send.push Riddl::Parameter::Complex::new('call_result','application/json', JSON::generate(
|
|
447
|
-
send.push Riddl::Parameter::Complex::new('call_headers','application/json', JSON::generate(
|
|
440
|
+
send.push Riddl::Parameter::Simple::new('code',__code)
|
|
441
|
+
send.push Riddl::Parameter::Complex::new('dataelements','application/json', JSON::generate(__dataelements))
|
|
442
|
+
send.push Riddl::Parameter::Complex::new('local','application/json', JSON::generate(__local)) if __local
|
|
443
|
+
send.push Riddl::Parameter::Complex::new('endpoints','application/json', JSON::generate(__endpoints))
|
|
444
|
+
send.push Riddl::Parameter::Complex::new('additional','application/json', JSON::generate(__additional))
|
|
445
|
+
send.push Riddl::Parameter::Complex::new('status','application/json', JSON::generate(__status)) if __status
|
|
446
|
+
send.push Riddl::Parameter::Complex::new('call_result','application/json', JSON::generate(__result))
|
|
447
|
+
send.push Riddl::Parameter::Complex::new('call_headers','application/json', JSON::generate(__options))
|
|
448
448
|
|
|
449
449
|
stat, ret, headers = Riddl::Client.new(@controller.url_code).request 'put' => send
|
|
450
450
|
|
|
@@ -457,16 +457,16 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
|
|
|
457
457
|
changed_endpoints = JSON::parse(ret.shift.value.read) if ret.any? && ret[0].name == 'changed_endpoints'
|
|
458
458
|
changed_status = JSON::parse(ret.shift.value.read) if ret.any? && ret[0].name == 'changed_status'
|
|
459
459
|
|
|
460
|
-
|
|
461
|
-
WEEL::ReadStructure.new(
|
|
460
|
+
__struct = if __readonly
|
|
461
|
+
WEEL::ReadStructure.new(__dataelements,__endpoints,__local,__additional)
|
|
462
462
|
else
|
|
463
|
-
WEEL::ManipulateStructure.new(
|
|
463
|
+
WEEL::ManipulateStructure.new(__dataelements, __endpoints, __status, __local, __additional)
|
|
464
464
|
end
|
|
465
|
-
|
|
465
|
+
__struct.update(changed_dataelements,changed_endpoints,changed_status)
|
|
466
466
|
|
|
467
|
-
|
|
467
|
+
__struct
|
|
468
468
|
else
|
|
469
|
-
code_error_handling ret,
|
|
469
|
+
code_error_handling ret, __where
|
|
470
470
|
end
|
|
471
471
|
end
|
|
472
472
|
end #}}}
|
data/server/routing/end.pid
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2029031
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2029049
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2029043
|
data/server/routing/persist.pid
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
2029037
|
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.
|
|
4
|
+
version: 2.1.120
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Juergen eTM Mangler
|
|
@@ -191,6 +191,26 @@ dependencies:
|
|
|
191
191
|
- - ">="
|
|
192
192
|
- !ruby/object:Gem::Version
|
|
193
193
|
version: 1.1.0
|
|
194
|
+
- !ruby/object:Gem::Dependency
|
|
195
|
+
name: concurrent-ruby
|
|
196
|
+
requirement: !ruby/object:Gem::Requirement
|
|
197
|
+
requirements:
|
|
198
|
+
- - "~>"
|
|
199
|
+
- !ruby/object:Gem::Version
|
|
200
|
+
version: '1.3'
|
|
201
|
+
- - ">="
|
|
202
|
+
- !ruby/object:Gem::Version
|
|
203
|
+
version: 1.3.5
|
|
204
|
+
type: :runtime
|
|
205
|
+
prerelease: false
|
|
206
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
207
|
+
requirements:
|
|
208
|
+
- - "~>"
|
|
209
|
+
- !ruby/object:Gem::Version
|
|
210
|
+
version: '1.3'
|
|
211
|
+
- - ">="
|
|
212
|
+
- !ruby/object:Gem::Version
|
|
213
|
+
version: 1.3.5
|
|
194
214
|
description: see http://cpee.org
|
|
195
215
|
email: juergen.mangler@gmail.com
|
|
196
216
|
executables:
|