cpee 1.3.134 → 1.3.136
Sign up to get free protection for your applications and to get access to all the features.
- data/cpee.gemspec +1 -1
- data/lib/cpee/implementation.rb +6 -2
- data/lib/cpee/processtransformation/bpmn2.rb +7 -3
- data/lib/cpee/processtransformation/cpee.rb +17 -6
- data/lib/cpee/processtransformation/structures.rb +7 -1
- metadata +2 -5
- data/server/instances/10/notifications/357012173866e5c3e592444c274e5eda/consumer-secret +0 -1
- data/server/instances/10/notifications/357012173866e5c3e592444c274e5eda/producer-secret +0 -1
- data/server/instances/10/notifications/357012173866e5c3e592444c274e5eda/subscription.xml +0 -28
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.
|
3
|
+
s.version = "1.3.136"
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
s.license = "LGPL-3"
|
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
@@ -25,7 +25,8 @@ module CPEE
|
|
25
25
|
|
26
26
|
def self::implementation(opts)
|
27
27
|
opts[:instances] ||= File.expand_path(File.dirname(__FILE__) + '/../../server/instances')
|
28
|
-
opts[:
|
28
|
+
opts[:global_handlerwrappers] ||= File.expand_path(File.dirname(__FILE__) + '/../../server/handlerwrappers')
|
29
|
+
opts[:handlerwrappers] ||= ''
|
29
30
|
opts[:topics] ||= File.expand_path(File.dirname(__FILE__) + '/../../server/resources/topics.xml')
|
30
31
|
opts[:properties_init] ||= File.expand_path(File.dirname(__FILE__) + '/../../server/resources/properties.init')
|
31
32
|
opts[:properties_schema_active] ||= File.expand_path(File.dirname(__FILE__) + '/../../server/resources/properties.schema.active')
|
@@ -36,9 +37,12 @@ module CPEE
|
|
36
37
|
opts[:empty_dslx] ||= File.expand_path(File.dirname(__FILE__) + '/../../server/resources/empty_dslx.xml')
|
37
38
|
|
38
39
|
Proc.new do
|
40
|
+
Dir[opts[:global_handlerwrappers] + "/*.rb"].each do |h|
|
41
|
+
require h
|
42
|
+
end unless opts[:global_handlerwrappers].strip == ''
|
39
43
|
Dir[opts[:handlerwrappers] + "/*.rb"].each do |h|
|
40
44
|
require h
|
41
|
-
end
|
45
|
+
end unless opts[:handlerwrappers].strip == ''
|
42
46
|
|
43
47
|
controller = {}
|
44
48
|
Dir[opts[:instances] + '/*/properties.xml'].map{|e|::File::basename(::File::dirname(e))}.each do |id|
|
@@ -185,7 +185,7 @@ module CPEE
|
|
185
185
|
if branch.condition?
|
186
186
|
li = @graph.link(branch.id,traces.first_node.id)
|
187
187
|
unless li.nil?
|
188
|
-
branch.condition << li.condition
|
188
|
+
branch.condition << li.condition unless li.condition.nil?
|
189
189
|
branch.condition_type = "text/javascript"
|
190
190
|
end
|
191
191
|
end
|
@@ -199,14 +199,18 @@ module CPEE
|
|
199
199
|
end
|
200
200
|
else
|
201
201
|
loops = traces.loops
|
202
|
-
if node.type == :exclusiveGateway
|
202
|
+
if node.type == :exclusiveGateway || traces.length == 1
|
203
203
|
### as the first is a decision node, just remove and continue
|
204
204
|
if node.incoming == 2
|
205
205
|
node.incoming = 1
|
206
206
|
branch << Loop.new(node.id)
|
207
207
|
### remove the gateway itself, as for a single loop it is no longer used.
|
208
208
|
### the condition will the loop condition
|
209
|
-
traces.
|
209
|
+
if traces.length == 1
|
210
|
+
loops.first.pop
|
211
|
+
else
|
212
|
+
traces.shift_all
|
213
|
+
end
|
210
214
|
loops.remove_empty
|
211
215
|
build_ttree branch.last, loops, nil, debug
|
212
216
|
else
|
@@ -38,8 +38,8 @@ module CPEE
|
|
38
38
|
def generate_for_list(list,res)
|
39
39
|
list.each do |e|
|
40
40
|
nam = e.class.name.gsub(/\w+:+/,'')
|
41
|
-
|
42
|
-
|
41
|
+
send("print_#{nam}".to_sym,e,res)
|
42
|
+
end
|
43
43
|
end
|
44
44
|
private :generate_for_list
|
45
45
|
|
@@ -51,11 +51,15 @@ module CPEE
|
|
51
51
|
s1 = res.add('loop', 'pre_test' => 'true')
|
52
52
|
generate_for_list(node,s1)
|
53
53
|
end
|
54
|
-
def
|
55
|
-
s1 = res.add('loop', 'pre_test' => node.condition.join(' && '))
|
54
|
+
def print_Loop_default(node,res)
|
55
|
+
s1 = res.add('loop', 'pre_test' => node.condition.empty? ? 'true' : node.condition.join(' && '))
|
56
56
|
s1.attributes['language'] = node.condition_type unless node.condition_type.nil?
|
57
57
|
generate_for_list(node,s1)
|
58
|
+
s1
|
58
59
|
end
|
60
|
+
private :print_Loop_default
|
61
|
+
def print_Loop(node,res); print_Loop_default(node,res); end
|
62
|
+
private :print_Loop
|
59
63
|
|
60
64
|
def print_Node(node,res)
|
61
65
|
if node.endpoints.empty? && !node.script.nil? && node.script.strip != ''
|
@@ -83,16 +87,19 @@ module CPEE
|
|
83
87
|
end
|
84
88
|
private :print_Node
|
85
89
|
|
86
|
-
def
|
90
|
+
def print_Parallel_default(node,res)
|
87
91
|
s1 = res.add('parallel','wait' => node.wait)
|
88
92
|
node.sub.each do |branch|
|
89
93
|
s2 = s1.add('parallel_branch')
|
90
94
|
generate_for_list(branch,s2)
|
91
95
|
end
|
96
|
+
s1
|
92
97
|
end
|
98
|
+
private :print_Parallel_default
|
99
|
+
def print_Parallel(node,res); print_Parallel_default(node,res); end
|
93
100
|
private :print_Parallel
|
94
101
|
|
95
|
-
def
|
102
|
+
def print_Conditional_default(node,res)
|
96
103
|
s1 = res.add('d:choose', 'mode' => node.mode)
|
97
104
|
node.sub.each do |branch|
|
98
105
|
s2 = if branch.condition.any?
|
@@ -107,8 +114,12 @@ module CPEE
|
|
107
114
|
if (x = s1.find('d:otherwise')).any?
|
108
115
|
s1.add x
|
109
116
|
end
|
117
|
+
s1
|
110
118
|
end
|
119
|
+
private :print_Conditional_default
|
120
|
+
def print_Conditional(node,res); print_Conditional_default(node,res); end
|
111
121
|
private :print_Conditional
|
122
|
+
|
112
123
|
end
|
113
124
|
|
114
125
|
end
|
@@ -24,11 +24,12 @@ module CPEE
|
|
24
24
|
|
25
25
|
class Link #{{{
|
26
26
|
attr_accessor :from, :to
|
27
|
-
attr_reader :condition
|
27
|
+
attr_reader :condition, :attributes
|
28
28
|
def initialize(from,to,cond=nil)
|
29
29
|
@from = from
|
30
30
|
@to = to
|
31
31
|
@condition = cond
|
32
|
+
@attributes = {}
|
32
33
|
end
|
33
34
|
end #}}}
|
34
35
|
|
@@ -296,6 +297,11 @@ module CPEE
|
|
296
297
|
num == self.length
|
297
298
|
end
|
298
299
|
|
300
|
+
def infinite_loop_fix
|
301
|
+
self << self.first.dup
|
302
|
+
self.last.pop
|
303
|
+
end
|
304
|
+
|
299
305
|
def add_breaks
|
300
306
|
trueloops = self.find_all{ |t| t.last == t.first }.length
|
301
307
|
if trueloops == self.length
|
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.3.
|
4
|
+
version: 1.3.136
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2014-07-
|
14
|
+
date: 2014-07-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: riddl
|
@@ -99,9 +99,6 @@ files:
|
|
99
99
|
- server/instances/1/properties.xml
|
100
100
|
- server/instances/3/properties.xml
|
101
101
|
- server/instances/9/properties.xml
|
102
|
-
- server/instances/10/notifications/357012173866e5c3e592444c274e5eda/consumer-secret
|
103
|
-
- server/instances/10/notifications/357012173866e5c3e592444c274e5eda/producer-secret
|
104
|
-
- server/instances/10/notifications/357012173866e5c3e592444c274e5eda/subscription.xml
|
105
102
|
- server/instances/10/properties.xml
|
106
103
|
- server/instances/4/properties.xml
|
107
104
|
- server/instances/7/properties.xml
|
@@ -1 +0,0 @@
|
|
1
|
-
a2b3fecfeb290b16e456360752d9311f
|
@@ -1 +0,0 @@
|
|
1
|
-
dda3c195855aab42bc7845764181bab7
|
@@ -1,28 +0,0 @@
|
|
1
|
-
<subscription xmlns="http://riddl.org/ns/common-patterns/notifications-producer/1.0">
|
2
|
-
<topic id="running">
|
3
|
-
<event>activity_calling</event>
|
4
|
-
<event>activity_manipulating</event>
|
5
|
-
<event>activity_failed</event>
|
6
|
-
<event>activity_done</event>
|
7
|
-
<vote>syncing_after</vote>
|
8
|
-
</topic>
|
9
|
-
<topic id="properties/description">
|
10
|
-
<event>change</event>
|
11
|
-
<event>error</event>
|
12
|
-
</topic>
|
13
|
-
<topic id="properties/position">
|
14
|
-
<event>change</event>
|
15
|
-
</topic>
|
16
|
-
<topic id="properties/state">
|
17
|
-
<event>change</event>
|
18
|
-
</topic>
|
19
|
-
<topic id="properties/dataelements">
|
20
|
-
<event>change</event>
|
21
|
-
</topic>
|
22
|
-
<topic id="properties/endpoints">
|
23
|
-
<event>change</event>
|
24
|
-
</topic>
|
25
|
-
<topic id="properties/handlers">
|
26
|
-
<event>change</event>
|
27
|
-
</topic>
|
28
|
-
</subscription>
|