cpee 2.0.20 → 2.0.25

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/CPEE.xml +8 -0
  3. data/cockpit/Signavio.xml +8 -0
  4. data/cockpit/css/model.css +2 -0
  5. data/cockpit/css/replay.css +55 -0
  6. data/cockpit/css/ui.css +3 -1
  7. data/cockpit/edit.html +260 -0
  8. data/cockpit/index.html +2 -2
  9. data/cockpit/js/edit.js +32 -0
  10. data/cockpit/js/instance.js +34 -36
  11. data/cockpit/js/model.js +0 -25
  12. data/cockpit/js/parameters.js +3 -0
  13. data/cockpit/js/replay.js +40 -0
  14. data/cockpit/js/ui.js +7 -0
  15. data/cockpit/model.html +4 -1
  16. data/cockpit/replay.html +52 -0
  17. data/cockpit/templates/instantiate.local/Take_Sub.xml +1 -1
  18. data/cockpit/themes/compact/rngs/call.rng +93 -41
  19. data/cockpit/themes/compact/rngs/callmanipulate.rng +113 -40
  20. data/cockpit/themes/compact/theme.js +57 -25
  21. data/cockpit/themes/{diana → control}/rngs/alternative.rng +0 -0
  22. data/cockpit/themes/control/rngs/call.rng +174 -0
  23. data/cockpit/themes/control/rngs/callmanipulate.rng +218 -0
  24. data/cockpit/themes/{diana → control}/rngs/choose.rng +0 -0
  25. data/cockpit/themes/{diana → control}/rngs/closed_loop.rng +0 -0
  26. data/cockpit/themes/{diana → control}/rngs/closed_loop_cancel.rng +0 -0
  27. data/cockpit/themes/{diana → control}/rngs/closed_loop_control.rng +0 -0
  28. data/cockpit/themes/{diana → control}/rngs/closed_loop_measuring.rng +0 -0
  29. data/cockpit/themes/{diana → control}/rngs/critical.rng +0 -0
  30. data/cockpit/themes/{diana → control}/rngs/escape.rng +0 -0
  31. data/cockpit/themes/{diana → control}/rngs/group.rng +0 -0
  32. data/cockpit/themes/{diana → control}/rngs/loop.rng +0 -0
  33. data/cockpit/themes/{diana → control}/rngs/manipulate.rng +0 -0
  34. data/cockpit/themes/{diana → control}/rngs/otherwise.rng +0 -0
  35. data/cockpit/themes/{diana → control}/rngs/parallel.rng +0 -0
  36. data/cockpit/themes/{diana → control}/rngs/parallel_branch.rng +0 -0
  37. data/cockpit/themes/{diana → control}/rngs/scripts.rng +0 -0
  38. data/cockpit/themes/{diana → control}/rngs/stop.rng +0 -0
  39. data/cockpit/themes/{diana → control}/rngs/terminate.rng +0 -0
  40. data/cockpit/themes/{diana → control}/symbols/alternative.svg +0 -0
  41. data/cockpit/themes/{diana → control}/symbols/arrow.svg +0 -0
  42. data/cockpit/themes/{diana → control}/symbols/call.svg +0 -0
  43. data/cockpit/themes/{diana → control}/symbols/callmanipulate.svg +0 -0
  44. data/cockpit/themes/{diana → control}/symbols/choose.svg +0 -0
  45. data/cockpit/themes/{diana → control}/symbols/choose_exclusive.svg +0 -0
  46. data/cockpit/themes/{diana → control}/symbols/choose_inclusive.svg +0 -0
  47. data/cockpit/themes/{diana → control}/symbols/closed_loop.svg +0 -0
  48. data/cockpit/themes/{diana → control}/symbols/closed_loop_cancel.svg +0 -0
  49. data/cockpit/themes/{diana → control}/symbols/closed_loop_control.svg +0 -0
  50. data/cockpit/themes/{diana → control}/symbols/closed_loop_measuring.svg +0 -0
  51. data/cockpit/themes/{diana → control}/symbols/complex.svg +0 -0
  52. data/cockpit/themes/{diana → control}/symbols/critical.svg +0 -0
  53. data/cockpit/themes/{diana → control}/symbols/end.svg +0 -0
  54. data/cockpit/themes/{diana → control}/symbols/escape.svg +0 -0
  55. data/cockpit/themes/{diana → control}/symbols/event_end.svg +0 -0
  56. data/cockpit/themes/{diana → control}/symbols/loop.svg +0 -0
  57. data/cockpit/themes/{diana → control}/symbols/manipulate.svg +0 -0
  58. data/cockpit/themes/{diana → control}/symbols/otherwise.svg +0 -0
  59. data/cockpit/themes/{diana → control}/symbols/parallel.svg +0 -0
  60. data/cockpit/themes/{diana → control}/symbols/parallel_branch.svg +0 -0
  61. data/cockpit/themes/{diana → control}/symbols/parallel_branch_compact.svg +0 -0
  62. data/cockpit/themes/{diana → control}/symbols/parallel_branch_event.svg +0 -0
  63. data/cockpit/themes/{diana → control}/symbols/parallel_branch_normal.svg +0 -0
  64. data/cockpit/themes/{diana → control}/symbols/scripts.svg +0 -0
  65. data/cockpit/themes/{diana → control}/symbols/start.svg +0 -0
  66. data/cockpit/themes/{diana → control}/symbols/stop.svg +0 -0
  67. data/cockpit/themes/{diana → control}/symbols/terminate.svg +0 -0
  68. data/cockpit/themes/{diana → control}/theme.js +74 -28
  69. data/cockpit/themes/default/rngs/call.rng +93 -41
  70. data/cockpit/themes/default/rngs/callmanipulate.rng +113 -40
  71. data/cockpit/themes/default/theme.js +1318 -0
  72. data/cockpit/themes/extended/rngs/call.rng +93 -41
  73. data/cockpit/themes/extended/rngs/callmanipulate.rng +113 -40
  74. data/cockpit/themes/extended/theme.js +50 -19
  75. data/cockpit/themes/model/rngs/call.rng +21 -20
  76. data/cockpit/themes/model/rngs/callmanipulate.rng +23 -22
  77. data/cockpit/themes/model/theme.js +51 -20
  78. data/cockpit/themes/packed/rngs/call.rng +93 -41
  79. data/cockpit/themes/packed/rngs/callmanipulate.rng +113 -40
  80. data/cockpit/themes/packed/theme.js +50 -19
  81. data/cockpit/themes/preset/rngs/call.rng +93 -41
  82. data/cockpit/themes/preset/rngs/callmanipulate.rng +113 -40
  83. data/cockpit/themes/preset/theme.js +49 -18
  84. data/cockpit/track.html +0 -7
  85. data/cockpit/transformations.xml +4 -0
  86. data/cpee.gemspec +2 -2
  87. data/lib/callbacks.xml +5 -0
  88. data/lib/cpee/controller.rb +29 -27
  89. data/lib/cpee/implementation_callbacks.rb +53 -0
  90. data/server/handlerwrappers/default.rb +17 -5
  91. data/server/resources/notifications/logging/subscription.xml +6 -0
  92. data/server/resources/transformation_dslx.xsl +1 -1
  93. data/server/routing/end.pid +1 -0
  94. data/server/routing/forward-events.pid +1 -0
  95. data/server/routing/forward-votes.pid +1 -0
  96. data/server/routing/persist.pid +1 -0
  97. data/server/routing/persist.rb +3 -3
  98. data/server/server.pid +1 -0
  99. metadata +63 -50
  100. data/cockpit/edit.html +0 -1
  101. data/cockpit/themes/diana/rngs/call.rng +0 -122
  102. data/cockpit/themes/diana/rngs/callmanipulate.rng +0 -145
@@ -49,6 +49,16 @@ function WFAdaptorManifestation(adaptor) {
49
49
  });
50
50
  return svgid;
51
51
  }; //}}}
52
+ //{{{ Return the json for all marked tasks
53
+ this.marked_text = function(){
54
+ var nodes = [];
55
+ var markymark = _.uniq(self.marked());
56
+ $(markymark).each(function(key,svgid){
57
+ var node = self.adaptor.description.get_node_by_svg_id(svgid);
58
+ nodes.push($(node).serializePrettyXML());
59
+ });
60
+ return JSON.stringify(nodes);
61
+ }; //}}}
52
62
  //{{{ Render the details from rng (right hand side of graph tab)
53
63
  this.update_details = function(svgid){
54
64
  var tab = $('#dat_details');
@@ -76,35 +86,46 @@ function WFAdaptorManifestation(adaptor) {
76
86
  }; //}}}
77
87
 
78
88
  function copyOrMove(menu,group,xml_node,mode) { //{{{
79
- var markymark = _.uniq(self.marked());
89
+ var nodes = localStorage.getItem('marked');
90
+
91
+ if (typeof(nodes) != "string") { return; }
92
+
93
+ nodes = JSON.parse(nodes);
94
+ $(nodes).each(function(key,str) {
95
+ nodes[key] = $X(str);;
96
+ });
97
+
80
98
  var check1 = [];
81
99
  var check2 = [];
82
- $(markymark).each(function(key,svgid){
83
- var node = self.adaptor.description.get_node_by_svg_id(svgid);
100
+ $(nodes).each(function(key,node){
84
101
  check1.push($(node).attr('svg-type'));
85
102
  });
86
103
  $(group).each(function(key,value){
87
104
  check2.push(value.type);
88
105
  });
89
106
 
90
- if (markymark.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
91
- var nodes = [];
92
- $(markymark).each(function(key,svgid){
93
- var node = self.adaptor.description.get_node_by_svg_id(svgid);
94
- nodes.unshift(node);
95
- });
96
-
107
+ if (nodes.length > 0 && _.uniq(check1).length == _.intersection(check1,check2).length) {
108
+ if (myid == localStorage.getItem('marked_from')) {
109
+ $(nodes).each(function(key,node){
110
+ nodes[key] = self.adaptor.description.get_node_by_svg_id($(node).attr('svg-id'));
111
+ });
112
+ }
113
+ nodes.reverse();
97
114
  var iconm = self.resources['arrow'].clone();
98
115
  var iconc = self.resources['arrow'].clone();
99
116
  iconm.children('.rfill').addClass('menu');
117
+ if (myid == localStorage.getItem('marked_from')) {
118
+ menu.push(
119
+ {
120
+ 'label': '<em>Move Marked Elements</em>',
121
+ 'function_call': mode,
122
+ 'menu_icon': iconm,
123
+ 'type': undefined,
124
+ 'params': [nodes, xml_node]
125
+ }
126
+ );
127
+ }
100
128
  menu.push(
101
- {
102
- 'label': '<em>Move Marked Elements</em>',
103
- 'function_call': mode,
104
- 'menu_icon': iconm,
105
- 'type': undefined,
106
- 'params': [nodes, xml_node]
107
- },
108
129
  {
109
130
  'label': '<em>Copy Marked Elements</em>',
110
131
  'function_call': mode,
@@ -223,10 +244,20 @@ function WFAdaptorManifestation(adaptor) {
223
244
  tab.empty();
224
245
  var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
225
246
  if (vtarget.length > 0) {
226
- vtarget.parents('g.element[element-id]').toggleClass('marked');
247
+ var vt = vtarget.parents('g.element[element-id]');
248
+ vt.toggleClass('marked');
249
+ if (vt.hasClass('marked')) {
250
+ localStorage.setItem('marked',self.marked_text());
251
+ localStorage.setItem('marked_from',myid);
252
+ } else {
253
+ localStorage.removeItem('marked');
254
+ localStorage.removeItem('marked_from');
255
+ }
227
256
  }
228
257
  } else {
229
258
  self.adaptor.illustrator.get_elements().removeClass('marked');
259
+ localStorage.removeItem('marked');
260
+ localStorage.removeItem('marked_from');
230
261
 
231
262
  var vtarget = self.adaptor.illustrator.get_node_by_svg_id(svgid);
232
263
  if (vtarget.length > 0) {
data/cockpit/track.html CHANGED
@@ -111,13 +111,6 @@
111
111
  </svg>
112
112
  </button>
113
113
  <span id="state_extended">
114
- <button name="state_replay" title='replay'>
115
- <svg viewBox="0 -1.5 7 12" width="10" height="16">
116
- <path
117
- style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
118
- d="m -0.24999978,8.9999993 c 0,-2.7488167 0,-5.4976332 0,-8.24644997 C 1.1183278,0.76955385 2.4884861,0.71666052 3.8555376,0.79065567 4.5083287,0.83810218 5.2238942,1.0790874 5.5755039,1.7307256 6.1661398,2.7080902 6.0299484,4.2180754 5.1108772,4.9019222 4.7622397,5.1617467 4.3480204,5.2956156 3.9336064,5.3605366 4.9287868,5.9394132 5.4254071,7.0996814 6.0167729,8.0858876 6.1549588,8.3769029 6.4657247,8.7723933 6.5,8.9999999 c -0.5944185,0 -1.1888371,0 -1.7832559,0 C 4.0758679,7.9893475 3.4946311,6.9294648 2.7923497,5.9678488 2.4230355,5.5319748 1.8508715,5.5458842 1.3513114,5.5576027 c -0.1507526,-0.00412 -0.044576,0.272902 -0.076255,0.3990664 0,1.0144436 0,2.028887 0,3.0433307 -0.50835205,-3e-7 -1.01670555,8e-7 -1.52505618,-5e-7 z M 1.2750578,4.2411336 C 2.111059,4.2189781 2.9581852,4.3060525 3.7849326,4.1387394 4.4863715,3.8915585 4.5732952,2.6432813 3.9026802,2.2941453 3.5098807,2.068434 3.050719,2.1857044 2.6267379,2.1489138 c -0.4505578,-0.00242 -0.90112,0.00147 -1.3516801,-3.456e-4 0,0.6975176 0,1.3950347 0,2.0925522 z"
119
- </svg>
120
- </button>
121
114
  <button name="state_abandon" title='abandon'>
122
115
  <svg viewBox="0 -1.5 7 12" width="10" height="16">
123
116
  <path
@@ -0,0 +1,4 @@
1
+ <transformations>
2
+ <transformation>CPEE</transformation>
3
+ <transformation>Signavio</transformation>
4
+ </transformations>
data/cpee.gemspec CHANGED
@@ -1,13 +1,13 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.0.20"
3
+ s.version = "2.0.25"
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."
7
7
 
8
8
  s.description = "see http://cpee.org"
9
9
 
10
- s.files = Dir['{example/**/*,server/**/*,tools/**/*,tools/archive,lib/**/*,cockpit/**/*,cockpit/themes/*/*/*,contrib/logo*,contrib/Screen*}'] - Dir['{server/instances/**/*,cockpit/js_libs/**/*,server/redis*}'] + %w(COPYING FEATURES.md INSTALL.md Rakefile cpee.gemspec README.md AUTHORS)
10
+ s.files = Dir['{example/**/*,server/**/*,tools/**/*,tools/archive,lib/**/*,cockpit/**/*,cockpit/templates/.templates.xml,cockpit/templates/.transformations.xml,cockpit/templates/.Signavio.xml,cockpit/templates/.CPEE.xml,cockpit/*.html,cockpit/themes/*/*,cockpit/themes/*/*/*,contrib/logo*,contrib/Screen*}'] - Dir['{server/instances/**/*,cockpit/js_libs/**/*,server/redis*}'] + %w(COPYING FEATURES.md INSTALL.md Rakefile cpee.gemspec README.md AUTHORS)
11
11
  s.require_path = 'lib'
12
12
  s.extra_rdoc_files = ['README.md']
13
13
  s.bindir = 'tools'
data/lib/callbacks.xml CHANGED
@@ -20,11 +20,16 @@
20
20
  <xi:include href="callbacks/callbacks.rng"/>
21
21
  </parameter>
22
22
  </message>
23
+ <message name="callback">
24
+ <parameter name="callback" mimetype="application/json"/>
25
+ </message>
23
26
 
24
27
  <resource>
25
28
  <doc:documentation>xb</doc:documentation>
26
29
  <get in="*" out="callbacks"/>
27
30
  <resource>
31
+ <get out="callback"/>
32
+ <delete/>
28
33
  <put in="*"/>
29
34
  </resource>
30
35
  </resource>
@@ -52,6 +52,34 @@ module CPEE
52
52
  @opts = opts
53
53
  @instance = nil
54
54
  @loop_guard = {}
55
+
56
+ @callback_keys = {}
57
+ @psredis = @opts[:redis_dyn].call
58
+
59
+ Thread.new do
60
+ @psredis.psubscribe('callback-response:*','callback-end:*') do |on|
61
+ on.pmessage do |pat, what, message|
62
+ if pat == 'callback-response:*' && @callback_keys.has_key?(what[18..-1])
63
+ index = message.index(' ')
64
+ mess = message[index+1..-1]
65
+ instance = message[0...index]
66
+ m = JSON.parse(mess)
67
+ resp = []
68
+ m['content']['values'].each do |e|
69
+ if e[1][0] == 'simple'
70
+ resp << Riddl::Parameter::Simple.new(e[0],e[1][1])
71
+ elsif e[1][0] == 'complex'
72
+ resp << Riddl::Parameter::Complex.new(e[0],e[1][1],File.open(e[1][2]))
73
+ end
74
+ end
75
+ @callback_keys[what[18..-1]].send(:callback,resp,m['content']['headers'])
76
+ end
77
+ if pat == 'callback-end:*'
78
+ @callback_keys.delete(what[13..-1])
79
+ end
80
+ end
81
+ end
82
+ end
55
83
  end
56
84
 
57
85
  attr_reader :id
@@ -160,33 +188,7 @@ module CPEE
160
188
 
161
189
  def callback(hw,key,content)
162
190
  CPEE::Message::send(:callback,'activity/content',base,@id,uuid,info,content.merge(:key => key),@redis)
163
-
164
- psredis = @opts[:redis_dyn].call
165
- response = nil
166
- Thread.new do
167
- psredis.subscribe('callback-response:' + key, 'callback-end:' + key) do |on|
168
- on.message do |what, message|
169
- if what == 'callback-response:' + key
170
- index = message.index(' ')
171
- mess = message[index+1..-1]
172
- instance = message[0...index]
173
- m = JSON.parse(mess)
174
- resp = []
175
- m['content']['values'].each do |e|
176
- if e[1][0] == 'simple'
177
- resp << Riddl::Parameter::Simple.new(e[0],e[1][1])
178
- elsif e[1][0] == 'complex'
179
- resp << Riddl::Parameter::Complex.new(e[0],e[1][1],File.open(e[1][2]))
180
- end
181
- end
182
- hw.send(:callback,resp,m['content']['headers'])
183
- end
184
- if what == 'callback-end:' + key
185
- psredis.unsubscribe
186
- end
187
- end
188
- end
189
- end
191
+ @callback_keys[key] = hw
190
192
  end
191
193
 
192
194
  def cancel_callback(key)
@@ -7,6 +7,8 @@ module CPEE
7
7
  Proc.new do
8
8
  run CPEE::Callbacks::Callbacks, id, opts if get
9
9
  on resource do
10
+ run CPEE::Callbacks::GetCallback, id, opts if get
11
+ run CPEE::Callbacks::DelCallback, id, opts if delete
10
12
  run CPEE::Callbacks::ExCallback, id, opts if put
11
13
  end
12
14
  end
@@ -26,6 +28,57 @@ module CPEE
26
28
  ret.to_s
27
29
  end
28
30
  end
31
+ end # }}}
32
+
33
+ class GetCallback < Riddl::Implementation #{{{
34
+ def response
35
+ id = @a[0]
36
+ opts = @a[1]
37
+ callback = @r[-1]
38
+
39
+ res = {}
40
+ res[:uuid] = opts[:redis].get("instance:#{id}/callback/#{callback}/uuid")
41
+ res[:type] = opts[:redis].get("instance:#{id}/callback/#{callback}/type")
42
+ res[:position] = opts[:redis].get("instance:#{id}/callback/#{callback}/position")
43
+ res[:label] = opts[:redis].get("instance:#{id}/callback/#{callback}/label")
44
+
45
+ Riddl::Parameter::Complex.new("callback","application/json",JSON.generate(res))
46
+ end
47
+ end #}}}
48
+
49
+ class DelCallback < Riddl::Implementation #{{{
50
+ def response
51
+ id = @a[0]
52
+ opts = @a[1]
53
+ callback = @r[-1]
54
+
55
+ if opts[:redis].get("instance:#{id}/callback/#{callback}/type") == 'callback'
56
+ CPEE::Message::send(
57
+ :'callback-end',
58
+ callback,
59
+ opts[:url],
60
+ id,
61
+ {},
62
+ {},
63
+ {},
64
+ opts[:redis]
65
+ )
66
+ elsif opts[:redis].get("instance:#{id}/callback/#{callback}/type") == 'vote'
67
+ CPEE::Message::send(
68
+ :'vote-response',
69
+ callback,
70
+ opts[:url],
71
+ id,
72
+ {},
73
+ {},
74
+ 'true',
75
+ opts[:redis]
76
+ )
77
+ else
78
+ @status = 503
79
+ end
80
+ nil
81
+ end
29
82
  end #}}}
30
83
 
31
84
  class ExCallback < Riddl::Implementation #{{{
@@ -50,10 +50,12 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
50
50
  @handler_returnOptions = nil
51
51
  @handler_activity_uuid = Digest::MD5.hexdigest(Kernel::rand().to_s)
52
52
  @label = ''
53
+ @guard_files = []
54
+ @guard_items = []
53
55
  end # }}}
54
56
 
55
57
  def prepare(readonly, endpoints, parameters, replay=false) #{{{
56
- if replay
58
+ if replay && @controller.attributes[:replayer]
57
59
  @handler_endpoint = @controller.attributes[:replayer]
58
60
  else
59
61
  @handler_endpoint = endpoints.is_a?(Array) ? endpoints.map{ |ep| readonly.endpoints[ep] }.compact : readonly.endpoints[endpoints]
@@ -99,7 +101,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
99
101
  params << Riddl::Header.new("CPEE-CALLBACK-ID",callback)
100
102
  params << Riddl::Header.new("CPEE-ACTIVITY",@handler_position)
101
103
  params << Riddl::Header.new("CPEE-LABEL",@label||'')
102
- params << Riddl::Header.new("CPEE-REPLAY",@controller.attributes['replayer_args'])
104
+ params << Riddl::Header.new("CPEE-REPLAY",@controller.attributes['replayer_target']) if @controller.attributes[:replayer] && @controller.attributes['replayer_target']
103
105
  @controller.attributes.each do |key,value|
104
106
  params << Riddl::Header.new("CPEE-ATTR-#{key.to_s.gsub(/_/,'-')}",value)
105
107
  end
@@ -109,8 +111,8 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
109
111
 
110
112
  client = Riddl::Client.new(tendpoint)
111
113
 
112
- @controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
113
114
  @handler_passthrough = callback
115
+ @controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
114
116
 
115
117
  status, result, headers = client.request type => params
116
118
  if status < 200 || status >= 300
@@ -261,8 +263,8 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
261
263
 
262
264
  def callback(result=nil,options={})
263
265
  @controller.notify("activity/receiving", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => structurize_result(result), :sensors => @sensors, :aggregators => @aggregators, :costs => @costs)
264
- result = simplify_result(result)
265
- @handler_returnValue = result
266
+ @guard_files += result
267
+ @handler_returnValue = simplify_result(result)
266
268
  @handler_returnOptions = options
267
269
  if options['CPEE_UPDATE']
268
270
  if options['CPEE_UPDATE_STATUS']
@@ -280,6 +282,16 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
280
282
  end
281
283
  end
282
284
 
285
+ def mem_guard() #{{{
286
+ @guard_files.each do |p|
287
+ if p&.respond_to?(:close)
288
+ p.close
289
+ elsif p&.value&.respond_to?(:close)
290
+ p.value.close
291
+ end
292
+ end
293
+ end #}}}
294
+
283
295
  def test_condition(mr,code)
284
296
  res = mr.instance_eval(code)
285
297
  @controller.notify("condition/eval", :instance_uuid => @controller.uuid, :code => code, :condition => (res ? "true" : "false"))
@@ -16,4 +16,10 @@
16
16
  <topic id="task">
17
17
  <event>instantiation</event>
18
18
  </topic>
19
+ <topic id="state">
20
+ <event>change</event>
21
+ </topic>
22
+ <topic id="description">
23
+ <event>change</event>
24
+ </topic>
19
25
  </subscription>
@@ -509,7 +509,7 @@
509
509
  <xsl:when test="child::node()[not(self::text())]">
510
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::* and name(child::*)=concat(name(.),'_item') 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
514
  <xsl:apply-templates select="*" mode="JSONArrayItem"/>
515
515
  <xsl:text>]"</xsl:text>
@@ -0,0 +1 @@
1
+ 592867
@@ -0,0 +1 @@
1
+ 592855
@@ -0,0 +1 @@
1
+ 592859
@@ -0,0 +1 @@
1
+ 592863
@@ -99,11 +99,11 @@ Daemonite.new do |opts|
99
99
  end
100
100
  when 'event:transformation/change'
101
101
  opts[:redis].multi do |multi|
102
- multi.set("instance:#{instance}/transformation/description/",mess.dig('content','description'))
102
+ multi.set("instance:#{instance}/transformation/description",mess.dig('content','description'))
103
103
  multi.set("instance:#{instance}/transformation/description/@type",mess.dig('content','description_type'))
104
- multi.set("instance:#{instance}/transformation/dataelements/",mess.dig('content','dataelements'))
104
+ multi.set("instance:#{instance}/transformation/dataelements",mess.dig('content','dataelements'))
105
105
  multi.set("instance:#{instance}/transformation/dataelements/@type",mess.dig('content','dataelements_type'))
106
- multi.set("instance:#{instance}/transformation/endpoints/",mess.dig('content','endpoints'))
106
+ multi.set("instance:#{instance}/transformation/endpoints",mess.dig('content','endpoints'))
107
107
  multi.set("instance:#{instance}/transformation/endpoints/@type",mess.dig('content','endpoints_type'))
108
108
  end
109
109
  when 'event:status/change'
data/server/server.pid ADDED
@@ -0,0 +1 @@
1
+ 592827
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.20
4
+ version: 2.0.25
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-12-16 00:00:00.000000000 Z
13
+ date: 2021-03-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl
@@ -116,7 +116,9 @@ files:
116
116
  - INSTALL.md
117
117
  - README.md
118
118
  - Rakefile
119
+ - cockpit/CPEE.xml
119
120
  - cockpit/README
121
+ - cockpit/Signavio.xml
120
122
  - cockpit/config.json
121
123
  - cockpit/contrib/graph_example.svg
122
124
  - cockpit/contrib/legend.svg
@@ -125,6 +127,7 @@ files:
125
127
  - cockpit/contrib/transformation2.xsl
126
128
  - cockpit/contrib/tree_example.svg
127
129
  - cockpit/css/model.css
130
+ - cockpit/css/replay.css
128
131
  - cockpit/css/track.css
129
132
  - cockpit/css/ui.css
130
133
  - cockpit/css/wfadaptor.css
@@ -132,14 +135,17 @@ files:
132
135
  - cockpit/graph.html
133
136
  - cockpit/index.html
134
137
  - cockpit/js/details.js
138
+ - cockpit/js/edit.js
135
139
  - cockpit/js/instance.js
136
140
  - cockpit/js/model.js
137
141
  - cockpit/js/parameters.js
142
+ - cockpit/js/replay.js
138
143
  - cockpit/js/track.js
139
144
  - cockpit/js/ui.js
140
145
  - cockpit/js/wfadaptor.js
141
146
  - cockpit/js_libs.zip
142
147
  - cockpit/model.html
148
+ - cockpit/replay.html
143
149
  - cockpit/rngs/attributes.rng
144
150
  - cockpit/rngs/dataelements.rng
145
151
  - cockpit/rngs/endpoints.rng
@@ -250,6 +256,54 @@ files:
250
256
  - cockpit/themes/compact/symbols/stop.svg
251
257
  - cockpit/themes/compact/symbols/terminate.svg
252
258
  - cockpit/themes/compact/theme.js
259
+ - cockpit/themes/control/rngs/alternative.rng
260
+ - cockpit/themes/control/rngs/call.rng
261
+ - cockpit/themes/control/rngs/callmanipulate.rng
262
+ - cockpit/themes/control/rngs/choose.rng
263
+ - cockpit/themes/control/rngs/closed_loop.rng
264
+ - cockpit/themes/control/rngs/closed_loop_cancel.rng
265
+ - cockpit/themes/control/rngs/closed_loop_control.rng
266
+ - cockpit/themes/control/rngs/closed_loop_measuring.rng
267
+ - cockpit/themes/control/rngs/critical.rng
268
+ - cockpit/themes/control/rngs/escape.rng
269
+ - cockpit/themes/control/rngs/group.rng
270
+ - cockpit/themes/control/rngs/loop.rng
271
+ - cockpit/themes/control/rngs/manipulate.rng
272
+ - cockpit/themes/control/rngs/otherwise.rng
273
+ - cockpit/themes/control/rngs/parallel.rng
274
+ - cockpit/themes/control/rngs/parallel_branch.rng
275
+ - cockpit/themes/control/rngs/scripts.rng
276
+ - cockpit/themes/control/rngs/stop.rng
277
+ - cockpit/themes/control/rngs/terminate.rng
278
+ - cockpit/themes/control/symbols/alternative.svg
279
+ - cockpit/themes/control/symbols/arrow.svg
280
+ - cockpit/themes/control/symbols/call.svg
281
+ - cockpit/themes/control/symbols/callmanipulate.svg
282
+ - cockpit/themes/control/symbols/choose.svg
283
+ - cockpit/themes/control/symbols/choose_exclusive.svg
284
+ - cockpit/themes/control/symbols/choose_inclusive.svg
285
+ - cockpit/themes/control/symbols/closed_loop.svg
286
+ - cockpit/themes/control/symbols/closed_loop_cancel.svg
287
+ - cockpit/themes/control/symbols/closed_loop_control.svg
288
+ - cockpit/themes/control/symbols/closed_loop_measuring.svg
289
+ - cockpit/themes/control/symbols/complex.svg
290
+ - cockpit/themes/control/symbols/critical.svg
291
+ - cockpit/themes/control/symbols/end.svg
292
+ - cockpit/themes/control/symbols/escape.svg
293
+ - cockpit/themes/control/symbols/event_end.svg
294
+ - cockpit/themes/control/symbols/loop.svg
295
+ - cockpit/themes/control/symbols/manipulate.svg
296
+ - cockpit/themes/control/symbols/otherwise.svg
297
+ - cockpit/themes/control/symbols/parallel.svg
298
+ - cockpit/themes/control/symbols/parallel_branch.svg
299
+ - cockpit/themes/control/symbols/parallel_branch_compact.svg
300
+ - cockpit/themes/control/symbols/parallel_branch_event.svg
301
+ - cockpit/themes/control/symbols/parallel_branch_normal.svg
302
+ - cockpit/themes/control/symbols/scripts.svg
303
+ - cockpit/themes/control/symbols/start.svg
304
+ - cockpit/themes/control/symbols/stop.svg
305
+ - cockpit/themes/control/symbols/terminate.svg
306
+ - cockpit/themes/control/theme.js
253
307
  - cockpit/themes/default/rngs/alternative.rng
254
308
  - cockpit/themes/default/rngs/call.rng
255
309
  - cockpit/themes/default/rngs/callmanipulate.rng
@@ -297,54 +351,7 @@ files:
297
351
  - cockpit/themes/default/symbols/start.svg
298
352
  - cockpit/themes/default/symbols/stop.svg
299
353
  - cockpit/themes/default/symbols/terminate.svg
300
- - cockpit/themes/diana/rngs/alternative.rng
301
- - cockpit/themes/diana/rngs/call.rng
302
- - cockpit/themes/diana/rngs/callmanipulate.rng
303
- - cockpit/themes/diana/rngs/choose.rng
304
- - cockpit/themes/diana/rngs/closed_loop.rng
305
- - cockpit/themes/diana/rngs/closed_loop_cancel.rng
306
- - cockpit/themes/diana/rngs/closed_loop_control.rng
307
- - cockpit/themes/diana/rngs/closed_loop_measuring.rng
308
- - cockpit/themes/diana/rngs/critical.rng
309
- - cockpit/themes/diana/rngs/escape.rng
310
- - cockpit/themes/diana/rngs/group.rng
311
- - cockpit/themes/diana/rngs/loop.rng
312
- - cockpit/themes/diana/rngs/manipulate.rng
313
- - cockpit/themes/diana/rngs/otherwise.rng
314
- - cockpit/themes/diana/rngs/parallel.rng
315
- - cockpit/themes/diana/rngs/parallel_branch.rng
316
- - cockpit/themes/diana/rngs/scripts.rng
317
- - cockpit/themes/diana/rngs/stop.rng
318
- - cockpit/themes/diana/rngs/terminate.rng
319
- - cockpit/themes/diana/symbols/alternative.svg
320
- - cockpit/themes/diana/symbols/arrow.svg
321
- - cockpit/themes/diana/symbols/call.svg
322
- - cockpit/themes/diana/symbols/callmanipulate.svg
323
- - cockpit/themes/diana/symbols/choose.svg
324
- - cockpit/themes/diana/symbols/choose_exclusive.svg
325
- - cockpit/themes/diana/symbols/choose_inclusive.svg
326
- - cockpit/themes/diana/symbols/closed_loop.svg
327
- - cockpit/themes/diana/symbols/closed_loop_cancel.svg
328
- - cockpit/themes/diana/symbols/closed_loop_control.svg
329
- - cockpit/themes/diana/symbols/closed_loop_measuring.svg
330
- - cockpit/themes/diana/symbols/complex.svg
331
- - cockpit/themes/diana/symbols/critical.svg
332
- - cockpit/themes/diana/symbols/end.svg
333
- - cockpit/themes/diana/symbols/escape.svg
334
- - cockpit/themes/diana/symbols/event_end.svg
335
- - cockpit/themes/diana/symbols/loop.svg
336
- - cockpit/themes/diana/symbols/manipulate.svg
337
- - cockpit/themes/diana/symbols/otherwise.svg
338
- - cockpit/themes/diana/symbols/parallel.svg
339
- - cockpit/themes/diana/symbols/parallel_branch.svg
340
- - cockpit/themes/diana/symbols/parallel_branch_compact.svg
341
- - cockpit/themes/diana/symbols/parallel_branch_event.svg
342
- - cockpit/themes/diana/symbols/parallel_branch_normal.svg
343
- - cockpit/themes/diana/symbols/scripts.svg
344
- - cockpit/themes/diana/symbols/start.svg
345
- - cockpit/themes/diana/symbols/stop.svg
346
- - cockpit/themes/diana/symbols/terminate.svg
347
- - cockpit/themes/diana/theme.js
354
+ - cockpit/themes/default/theme.js
348
355
  - cockpit/themes/extended/rngs/alternative.rng
349
356
  - cockpit/themes/extended/rngs/call.rng
350
357
  - cockpit/themes/extended/rngs/callmanipulate.rng
@@ -534,6 +541,7 @@ files:
534
541
  - cockpit/themes/preset/symbols/terminate.svg
535
542
  - cockpit/themes/preset/theme.js
536
543
  - cockpit/track.html
544
+ - cockpit/transformations.xml
537
545
  - contrib/Screenshot at 2011-09-28 02:38:11.png
538
546
  - contrib/logo2-small.png
539
547
  - contrib/logo2.png
@@ -602,11 +610,16 @@ files:
602
610
  - server/resources/topics.xml
603
611
  - server/resources/transformation.xml
604
612
  - server/resources/transformation_dslx.xsl
613
+ - server/routing/end.pid
605
614
  - server/routing/end.rb
615
+ - server/routing/forward-events.pid
606
616
  - server/routing/forward-events.rb
617
+ - server/routing/forward-votes.pid
607
618
  - server/routing/forward-votes.rb
619
+ - server/routing/persist.pid
608
620
  - server/routing/persist.rb
609
621
  - server/server.conf
622
+ - server/server.pid
610
623
  - server/server.rb
611
624
  - tools/cpee
612
625
  - tools/server/cpee