cpee 1.3.230 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/cockpit/js/wfadaptor.js +9 -1
- data/cockpit/themes/default/theme.js +4 -4
- data/cpee.gemspec +1 -1
- data/lib/cpee/implementation.rb +15 -15
- data/log/xes_yaml.rb +1 -1
- data/server/handlerwrappers/default.rb +2 -2
- data/server/resources/transformation_dslx.xsl +40 -4
- data/server/server.rb +3 -2
- data/tools/server/server.rb +7 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb1429c372aeadbd308ea2c3ee03f2d145fbaf0f
|
4
|
+
data.tar.gz: 78c26a41bd1c433956b407999fb274497870ec76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba3f71ee6ec2baf7525456d2358be59fa272e742936064606a736715063dde21180660ad0864eba16ab6015aa0a9ccc73fcd25ee54317267d45510185fc736dc
|
7
|
+
data.tar.gz: fa5629168bb3ad646c223fff779d52fc3f24d6967c5680caffe812067f3c808fa6d2999a63e1d443b5dacfd0ef833038b559e2a28cefd21063d7fc2cc46aa9a8
|
data/cockpit/js/wfadaptor.js
CHANGED
@@ -375,8 +375,16 @@ function WfDescription(wf_adaptor, wf_illustrator) { // Model {{{
|
|
375
375
|
var context_eval = this.context_eval = function(what) { // {{{
|
376
376
|
return eval(what);
|
377
377
|
} // }}}
|
378
|
-
var get_free_id = this.get_free_id = function() { // {{{
|
378
|
+
var get_free_id = this.get_free_id = function(other) { // {{{
|
379
379
|
var existing = new Array();
|
380
|
+
if (other) {
|
381
|
+
if ($(other).attr('id')) {
|
382
|
+
existing.push($(other).attr('id'));
|
383
|
+
}
|
384
|
+
$(other).find("[id]").each(function(k,v){
|
385
|
+
existing.push($(v).attr('id'));
|
386
|
+
});
|
387
|
+
}
|
380
388
|
$('*[id]', description).each(function(){existing.push($(this).attr('id'))});
|
381
389
|
var id = 1;
|
382
390
|
while ($.inArray('a' + id,existing) != -1) {
|
@@ -23,13 +23,13 @@ function WFAdaptorManifestation(adaptor) {
|
|
23
23
|
return($X(ntxt));
|
24
24
|
} else {
|
25
25
|
if (opts && opts == 'clone') {
|
26
|
+
base = base.clone();
|
26
27
|
if (base.attr('id')) {
|
27
|
-
base = base.clone();
|
28
|
-
// not very generic, because it is assumed that id is attribute of top level
|
29
|
-
// a better solution would be to parse rng for get_free_id()
|
30
|
-
// but: there is lots of lock-in to element-id, so fuck it
|
31
28
|
base.attr('id',self.adaptor.description.get_free_id());
|
32
29
|
}
|
30
|
+
base.find('*[id]').each(function(k,v){
|
31
|
+
$(v).attr('id',self.adaptor.description.get_free_id(base));
|
32
|
+
});
|
33
33
|
}
|
34
34
|
return base;
|
35
35
|
}
|
data/cpee.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "cpee"
|
3
|
-
s.version = "1.
|
3
|
+
s.version = "1.4.0"
|
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). If you just need workflow execution, without a rest/xmpp service exposing it, then use WEEL"
|
data/lib/cpee/implementation.rb
CHANGED
@@ -17,7 +17,7 @@ require 'riddl/server'
|
|
17
17
|
require 'riddl/client'
|
18
18
|
require 'riddl/utils/notifications_producer'
|
19
19
|
require 'riddl/utils/properties'
|
20
|
-
|
20
|
+
require_relative 'controller'
|
21
21
|
|
22
22
|
require 'ostruct'
|
23
23
|
class ParaStruct < OpenStruct
|
@@ -30,26 +30,26 @@ def ⭐(a); ParaStruct.new(a); end
|
|
30
30
|
|
31
31
|
module CPEE
|
32
32
|
|
33
|
-
SERVER = File.expand_path(File.
|
33
|
+
SERVER = File.expand_path(File.join(__dir__,'..','cpee.xml'))
|
34
34
|
|
35
35
|
def self::implementation(opts)
|
36
|
-
opts[:instances] ||= File.expand_path(File.
|
37
|
-
opts[:global_handlerwrappers] ||= File.expand_path(File.
|
36
|
+
opts[:instances] ||= File.expand_path(File.join(__dir__,'..','..','server','instances'))
|
37
|
+
opts[:global_handlerwrappers] ||= File.expand_path(File.join(__dir__,'..','..','server','handlerwrappers'))
|
38
38
|
opts[:handlerwrappers] ||= ''
|
39
|
-
opts[:topics] ||= File.expand_path(File.
|
40
|
-
opts[:properties_init] ||= File.expand_path(File.
|
41
|
-
opts[:properties_schema_active] ||= File.expand_path(File.
|
42
|
-
opts[:properties_schema_finished] ||= File.expand_path(File.
|
43
|
-
opts[:properties_schema_inactive] ||= File.expand_path(File.
|
44
|
-
opts[:transformation_dslx] ||= File.expand_path(File.
|
45
|
-
opts[:transformation_service] ||= File.expand_path(File.
|
46
|
-
opts[:empty_dslx] ||= File.expand_path(File.
|
39
|
+
opts[:topics] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','topics.xml'))
|
40
|
+
opts[:properties_init] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.init'))
|
41
|
+
opts[:properties_schema_active] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.schema.active'))
|
42
|
+
opts[:properties_schema_finished] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.schema.finished'))
|
43
|
+
opts[:properties_schema_inactive] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','properties.schema.inactive'))
|
44
|
+
opts[:transformation_dslx] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','transformation_dslx.xsl'))
|
45
|
+
opts[:transformation_service] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','transformation.xml'))
|
46
|
+
opts[:empty_dslx] ||= File.expand_path(File.join(__dir__,'..','..','server','resources','empty_dslx.xml'))
|
47
47
|
opts[:notifications_init] ||= nil
|
48
48
|
opts[:infinite_loop_stop] ||= 10000
|
49
49
|
|
50
|
-
opts[:
|
50
|
+
opts[:runtime_cmds] << [
|
51
51
|
"startclean", "Delete instances before starting.", Proc.new { |status|
|
52
|
-
Dir.glob(File.expand_path(File.
|
52
|
+
Dir.glob(File.expand_path(File.join(opts[:instances],'*'))).each do |d|
|
53
53
|
FileUtils.rm_r(d) if File.basename(d) =~ /^\d+$/
|
54
54
|
end
|
55
55
|
}
|
@@ -64,7 +64,7 @@ module CPEE
|
|
64
64
|
end unless opts[:handlerwrappers].strip == ''
|
65
65
|
|
66
66
|
controller = {}
|
67
|
-
Dir[opts[:instances]
|
67
|
+
Dir[File.join(opts[:instances],'*','properties.xml')].each do |e|
|
68
68
|
id = ::File::basename(::File::dirname(e))
|
69
69
|
(controller[id.to_i] = (Controller.new(id,opts)) rescue nil)
|
70
70
|
end
|
data/log/xes_yaml.rb
CHANGED
@@ -12,7 +12,7 @@ class Logging < Riddl::Implementation #{{{
|
|
12
12
|
uuid = notification['instance_uuid']
|
13
13
|
return unless uuid
|
14
14
|
|
15
|
-
activity = notification[
|
15
|
+
activity = notification['activity']
|
16
16
|
parameters = notification['parameters']
|
17
17
|
receiving = notification['received']
|
18
18
|
|
@@ -127,11 +127,11 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
|
|
127
127
|
end
|
128
128
|
unless changed_dataelements.nil?
|
129
129
|
@controller.serialize_dataelements!
|
130
|
-
@controller.notify("dataelements/change", :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements)
|
130
|
+
@controller.notify("dataelements/change", :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements.select{|k,v| changed_dataelements.include?(k)})
|
131
131
|
end
|
132
132
|
unless changed_endpoints.nil?
|
133
133
|
@controller.serialize_endpoints!
|
134
|
-
@controller.notify("endpoints/change", :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints)
|
134
|
+
@controller.notify("endpoints/change", :endpoint => @handler_endpoint, :label => @label, :instance_name => @controller.info, :instance => @controller.instance, :instance_uuid => @controller.uuid, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints.select{|k,v| changed_endpoints.include?(k)})
|
135
135
|
end
|
136
136
|
end # }}}
|
137
137
|
|
@@ -553,7 +553,16 @@
|
|
553
553
|
</xsl:when>
|
554
554
|
<xsl:otherwise>
|
555
555
|
<xsl:text>\"</xsl:text>
|
556
|
-
<xsl:
|
556
|
+
<xsl:choose>
|
557
|
+
<xsl:when test="substring(.,1,1) = '!'">
|
558
|
+
<xsl:text>#{</xsl:text>
|
559
|
+
<xsl:value-of select="str:replace(str:replace(substring(.,2),'\','\\'),'"','\\\"')"/>
|
560
|
+
<xsl:text>}</xsl:text>
|
561
|
+
</xsl:when>
|
562
|
+
<xsl:otherwise>
|
563
|
+
<xsl:value-of select="str:replace(str:replace(.,'\','\\'),'"','\\\"')"/>
|
564
|
+
</xsl:otherwise>
|
565
|
+
</xsl:choose>
|
557
566
|
<xsl:text>\"</xsl:text>
|
558
567
|
</xsl:otherwise>
|
559
568
|
</xsl:choose>
|
@@ -568,7 +577,16 @@
|
|
568
577
|
</xsl:when>
|
569
578
|
<xsl:otherwise>
|
570
579
|
<xsl:text>\"</xsl:text>
|
571
|
-
<xsl:
|
580
|
+
<xsl:choose>
|
581
|
+
<xsl:when test="substring(.,1,1) = '!'">
|
582
|
+
<xsl:text>#{</xsl:text>
|
583
|
+
<xsl:value-of select="str:replace(str:replace(substring(.,2),'\','\\'),'"','\\\"')"/>
|
584
|
+
<xsl:text>}</xsl:text>
|
585
|
+
</xsl:when>
|
586
|
+
<xsl:otherwise>
|
587
|
+
<xsl:value-of select="str:replace(str:replace(.,'\','\\'),'"','\\\"')"/>
|
588
|
+
</xsl:otherwise>
|
589
|
+
</xsl:choose>
|
572
590
|
<xsl:text>\"</xsl:text>
|
573
591
|
</xsl:otherwise>
|
574
592
|
</xsl:choose>
|
@@ -593,7 +611,16 @@
|
|
593
611
|
<xsl:if test="text()[normalize-space(.)]">
|
594
612
|
<xsl:text>, </xsl:text>
|
595
613
|
<xsl:text>\"</xsl:text>
|
596
|
-
<xsl:
|
614
|
+
<xsl:choose>
|
615
|
+
<xsl:when test="substring(.,1,1) = '!'">
|
616
|
+
<xsl:text>#{</xsl:text>
|
617
|
+
<xsl:value-of select="str:replace(str:replace(substring(.,2),'\','\\'),'"','\\\"')"/>
|
618
|
+
<xsl:text>}</xsl:text>
|
619
|
+
</xsl:when>
|
620
|
+
<xsl:otherwise>
|
621
|
+
<xsl:value-of select="str:replace(str:replace(.,'\','\\'),'"','\\\"')"/>
|
622
|
+
</xsl:otherwise>
|
623
|
+
</xsl:choose>
|
597
624
|
<xsl:text>\"</xsl:text>
|
598
625
|
<xsl:text>]</xsl:text>
|
599
626
|
</xsl:if>
|
@@ -612,7 +639,16 @@
|
|
612
639
|
</xsl:when>
|
613
640
|
<xsl:otherwise>
|
614
641
|
<xsl:text>\"</xsl:text>
|
615
|
-
<xsl:
|
642
|
+
<xsl:choose>
|
643
|
+
<xsl:when test="substring(.,1,1) = '!'">
|
644
|
+
<xsl:text>#{</xsl:text>
|
645
|
+
<xsl:value-of select="str:replace(str:replace(substring(.,2),'\','\\'),'"','\\\"')"/>
|
646
|
+
<xsl:text>}</xsl:text>
|
647
|
+
</xsl:when>
|
648
|
+
<xsl:otherwise>
|
649
|
+
<xsl:value-of select="str:replace(str:replace(.,'\','\\'),'"','\\\"')"/>
|
650
|
+
</xsl:otherwise>
|
651
|
+
</xsl:choose>
|
616
652
|
<xsl:text>\"</xsl:text>
|
617
653
|
</xsl:otherwise>
|
618
654
|
</xsl:choose>
|
data/server/server.rb
CHANGED
@@ -15,12 +15,13 @@
|
|
15
15
|
# <http://www.gnu.org/licenses/>.
|
16
16
|
|
17
17
|
require 'rubygems'
|
18
|
+
require 'memory_profiler'
|
18
19
|
gem 'nokogiri'
|
19
20
|
require File.expand_path(File.dirname(__FILE__) + '/../lib/cpee/implementation')
|
20
21
|
|
21
|
-
Riddl::Server.new(CPEE::SERVER, :port => 8298) do
|
22
|
+
Riddl::Server.new(CPEE::SERVER, :port => 8298) do |opts|
|
22
23
|
accessible_description true
|
23
24
|
cross_site_xhr true
|
24
25
|
|
25
|
-
use CPEE::implementation(
|
26
|
+
use CPEE::implementation(opts)
|
26
27
|
end.loop!
|
data/tools/server/server.rb
CHANGED
@@ -2,13 +2,14 @@
|
|
2
2
|
require 'rubygems'
|
3
3
|
require 'cpee/implementation'
|
4
4
|
|
5
|
-
Riddl::Server.new(CPEE::SERVER, :host => 'localhost', :port => 8298) do
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
Riddl::Server.new(CPEE::SERVER, :host => 'localhost', :port => 8298) do |opts|
|
6
|
+
opts[:instances] = File.join(__dir__,'instances')
|
7
|
+
opts[:handlerwrappers] = File.join(__dir__,'handlerwrappers')
|
8
|
+
opts[:notifications_init] = File.join(__dir__,'resources','notifications')
|
9
|
+
opts[:properties_init] = File.join(__dir__,'resources','properties.init')
|
10
|
+
|
10
11
|
accessible_description true
|
11
12
|
cross_site_xhr true
|
12
13
|
|
13
|
-
use CPEE::implementation(
|
14
|
+
use CPEE::implementation(opts)
|
14
15
|
end.loop!
|
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: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Juergen eTM Mangler
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: tools
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-
|
14
|
+
date: 2018-04-24 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: riddl
|