cpee 2.1.143 → 2.1.144

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.
Files changed (58) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/compliance-view.html +6 -6
  3. data/cockpit/compliance.html +6 -6
  4. data/cockpit/conformance.html +6 -6
  5. data/cockpit/css/llmmodel.css +17 -22
  6. data/cockpit/css/ui.css +2 -9
  7. data/cockpit/edit.html +6 -6
  8. data/cockpit/graph.html +2 -2
  9. data/cockpit/index.html +6 -6
  10. data/cockpit/js/extended_columns.js +7 -6
  11. data/cockpit/js/instance.js +0 -1
  12. data/cockpit/js/llmmodel.js +32 -0
  13. data/cockpit/llm.html +57 -44
  14. data/cockpit/llmmodel.html +40 -32
  15. data/cockpit/model.html +5 -5
  16. data/cockpit/only_llm.html +4 -4
  17. data/cockpit/templates/Coopis 2010 Replay.xml +7 -7
  18. data/cockpit/templates/Coopis 2010.xml +7 -7
  19. data/cockpit/templates/Frames.xml +1 -1
  20. data/cockpit/templates/Frames1.xml +527 -0
  21. data/cockpit/templates/ML-pipe-multi.xml +9 -9
  22. data/cockpit/templates/Readonly Local.xml +4 -4
  23. data/cockpit/templates/Track Test Local.xml +6 -6
  24. data/cockpit/templates/Track Test.xml +5 -5
  25. data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml +6 -6
  26. data/cockpit/templates/UR-VUE 2020 Solution NN.xml +5 -5
  27. data/cockpit/templates/UR-VUE 2020 Solution View.xml +1 -1
  28. data/cockpit/templates/UR-VUE 2020.xml +1 -1
  29. data/cockpit/templates/Wait.xml +1 -1
  30. data/cockpit/templates/Worklist Vote.xml +2 -2
  31. data/cockpit/templates/Worklist.xml +1 -1
  32. data/cockpit/templates/instantiate/Take_Sub.xml +1 -1
  33. data/cockpit/templates/instantiate.local/Take_Sub.xml +1 -1
  34. data/cockpit/themes/base.js +13 -6
  35. data/cockpit/themes/presetlr/theme.js +1 -0
  36. data/cockpit/track.html +2 -2
  37. data/cpee.gemspec +2 -2
  38. data/lib/cpee/implementation.rb +2 -1
  39. data/lib/cpee/persistence.rb +1 -0
  40. data/lib/engine/instances.rng +5 -0
  41. data/lib/properties/description.rng +0 -1
  42. data/lib/properties/dslx.rng +0 -1
  43. data/lib/properties/properties.rng +1 -0
  44. data/lib/properties/set-properties.rng +1 -0
  45. data/lib/properties/set-some-properties.rng +1 -0
  46. data/lib/properties/set-testset.rng +1 -0
  47. data/lib/properties/state.rng +0 -2
  48. data/lib/properties.xml +0 -1
  49. data/server/executionhandlers/eval/connection.rb +3 -6
  50. data/server/executionhandlers/ruby/connection.rb +3 -6
  51. data/server/executionhandlers/ruby/controller.rb +18 -15
  52. data/server/resources/states.dot +0 -4
  53. data/server/resources/states.xml +2 -8
  54. data/server/resources/topics.xml +0 -3
  55. data/tools/cpee +115 -2
  56. metadata +5 -5
  57. data/cockpit/css/wfadaptor.css +0 -401
  58. data/cockpit/js/wfadaptor.js +0 -1691
@@ -12,11 +12,11 @@
12
12
  <get_offset_base>http-get://ryloth.wst.univie.ac.at:9329/view/details</get_offset_base>
13
13
  <get_offset_neural>http-get://ryloth.wst.univie.ac.at:9330/view/details</get_offset_neural>
14
14
  <grip_and_place>http-put://ryloth.wst.univie.ac.at:9329/move/grip_and_place</grip_and_place>
15
- <subprocess>https://cpee.org/flow/start/url/</subprocess>
15
+ <subprocess>https://{cpee.org}/flow/start/url/</subprocess>
16
16
  </endpoints>
17
17
  <description>
18
18
  <description xmlns="http://cpee.org/ns/description/1.0">
19
- <loop mode="pre_test" condition="data.places.length &gt; 0">
19
+ <loop eid="e1" mode="pre_test" condition="data.places.length &gt; 0">
20
20
  <_probability>
21
21
  <_probability_min/>
22
22
  <_probability_max/>
@@ -76,8 +76,8 @@
76
76
  </annotations>
77
77
  <documentation/>
78
78
  </call>
79
- <choose mode="exclusive">
80
- <alternative condition="data.items.length &gt; 0">
79
+ <choose eid="e2" mode="exclusive">
80
+ <alternative eid="e3" condition="data.items.length &gt; 0">
81
81
  <call id="a5" endpoint="move_camera">
82
82
  <parameters>
83
83
  <label>Inspect first item</label>
@@ -180,8 +180,8 @@ data.item['y'] = data.items.first['y'] + data.item['adjust_y']</finalize>
180
180
  <_probability_avg/>
181
181
  </_probability>
182
182
  </alternative>
183
- <otherwise>
184
- <terminate/>
183
+ <otherwise eid="e4">
184
+ <terminate eid="e5"/>
185
185
  </otherwise>
186
186
  </choose>
187
187
  </loop>
@@ -15,7 +15,7 @@
15
15
  </endpoints>
16
16
  <description>
17
17
  <description xmlns="http://cpee.org/ns/description/1.0">
18
- <loop mode="pre_test" condition="data.places.length &gt; 0">
18
+ <loop eid="e1" mode="pre_test" condition="data.places.length &gt; 0">
19
19
  <_probability>
20
20
  <_probability_min/>
21
21
  <_probability_max/>
@@ -77,8 +77,8 @@ data.item = result[0]</finalize>
77
77
  </annotations>
78
78
  <documentation/>
79
79
  </call>
80
- <choose mode="exclusive">
81
- <alternative condition="data.items.length &gt; 0">
80
+ <choose eid="e2" mode="exclusive">
81
+ <alternative eid="e3" condition="data.items.length &gt; 0">
82
82
  <call id="a5" endpoint="move_camera">
83
83
  <parameters>
84
84
  <label>Inspect first item</label>
@@ -174,8 +174,8 @@ data.item = result[0]</finalize>
174
174
  <_probability_avg/>
175
175
  </_probability>
176
176
  </alternative>
177
- <otherwise>
178
- <terminate/>
177
+ <otherwise eid="e4">
178
+ <terminate eid="e5"/>
179
179
  </otherwise>
180
180
  </choose>
181
181
  </loop>
@@ -12,7 +12,7 @@
12
12
  </endpoints>
13
13
  <description>
14
14
  <description xmlns="http://cpee.org/ns/description/1.0">
15
- <loop mode="pre_test" condition="true">
15
+ <loop eid="e1" mode="pre_test" condition="true">
16
16
  <_probability>
17
17
  <_probability_min/>
18
18
  <_probability_max/>
@@ -9,7 +9,7 @@
9
9
  <get_offset_base>http-get://ryloth.wst.univie.ac.at:9329/view/details</get_offset_base>
10
10
  <get_offset_neural>http-get://ryloth.wst.univie.ac.at:9330/view/details</get_offset_neural>
11
11
  <grip_and_place>http-put://ryloth.wst.univie.ac.at:9329/move/grip_and_place</grip_and_place>
12
- <subprocess>https://cpee.org/flow/start/url/</subprocess>
12
+ <subprocess>https://{cpee.org}/flow/start/url/</subprocess>
13
13
  <wait>http://gruppe.wst.univie.ac.at/~mangler/services/timeout.php</wait>
14
14
  <adjust>https://cpee.org/flow/templates/UR-VUE%202020%20Manual%20Adjust.xml</adjust>
15
15
  </endpoints>
@@ -8,7 +8,7 @@
8
8
  </dataelements>
9
9
  <endpoints>
10
10
  <timeout>https://cpee.org/services/timeout.php</timeout>
11
- <subprocess>https://cpee.org/flow/start/url/</subprocess>
11
+ <subprocess>https://{cpee.org}/flow/start/url/</subprocess>
12
12
  <orgmodel>http://localhost/data/ideas_phase1/zt.xml</orgmodel>
13
13
  </endpoints>
14
14
  <attributes>
@@ -6,7 +6,7 @@
6
6
  <results>[{"user":"manglej6","raw":[{"name":"ok","value":"ok"}],"data":{"ok":"ok"}},{"user":"weissh9","raw":[{"name":"ok","value":"ok"}],"data":{"ok":"ok"}}]</results>
7
7
  </dataelements>
8
8
  <endpoints>
9
- <worklist>https-post://cpee.org/worklist/server/</worklist>
9
+ <worklist>https-post://{cpee.org}/worklist/server/</worklist>
10
10
  </endpoints>
11
11
  <attributes>
12
12
  <info>Worklist Vote</info>
@@ -20,7 +20,7 @@
20
20
  </attributes>
21
21
  <description>
22
22
  <description xmlns="http://cpee.org/ns/description/1.0">
23
- <loop mode="pre_test" condition="true">
23
+ <loop eid="e1" mode="pre_test" condition="true">
24
24
  <call id="a1" endpoint="worklist">
25
25
  <parameters>
26
26
  <label>OK OR NOT OK</label>
@@ -3,7 +3,7 @@
3
3
  <executionhandler>ruby</executionhandler>
4
4
  <dataelements/>
5
5
  <endpoints>
6
- <worklist>https-post://cpee.org/worklist/server/</worklist>
6
+ <worklist>https-post://{cpee.org}/worklist/server/</worklist>
7
7
  </endpoints>
8
8
  <attributes>
9
9
  <info>Worklist</info>
@@ -2,7 +2,7 @@
2
2
  <executionhandler>ruby</executionhandler>
3
3
  <dataelements/>
4
4
  <endpoints>
5
- <start_url>https://cpee.org/flow/start/url/</start_url>
5
+ <start_url>https://{cpee.org}/flow/start/url/</start_url>
6
6
  <timeout>https://cpee.org/services/timeout.php</timeout>
7
7
  </endpoints>
8
8
  <positions/>
@@ -4,7 +4,7 @@
4
4
  <time>5</time>
5
5
  </dataelements>
6
6
  <endpoints>
7
- <start_url>https://localhost/flow/start/url/</start_url>
7
+ <start_url>https://{localhost}/flow/start/url/</start_url>
8
8
  </endpoints>
9
9
  <positions/>
10
10
  <description>
@@ -178,6 +178,7 @@ function WFAdaptorManifestationBase(adaptor) {
178
178
  return icon;
179
179
  } //}}}
180
180
  var contextMenuHandling = this.contextMenuHandling = function(svgid,e,child,sibling) { //{{{
181
+ if (self.adaptor.description.get_node_by_svg_id(svgid).length == 0) { return false; }
181
182
  if (save['state'] != "ready" && save['state'] != "stopped") { return false; }
182
183
 
183
184
  var xml_node = self.adaptor.description.get_node_by_svg_id(svgid);
@@ -382,15 +383,21 @@ function WFAdaptorManifestationBase(adaptor) {
382
383
  this.events.dblclick = function(svgid, e) { // {{{
383
384
  } // }}}
384
385
  this.events.mouseover = function(svgid, e) { // {{{
385
- self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','block');
386
- self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').addClass('hover');
387
- self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').addClass('hover');
386
+ let con = e ? $(e.currentTarget).closest('svg') : self.adaptor.illustrator.svg.container;
387
+ con.find('.tile[element-id = "' + svgid + '"]').css('display','block');
388
+ con.find('[element-id = "' + svgid + '"]').addClass('hover');
389
+ if (self.adaptor.illustrator.svg.label_container) {
390
+ self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').addClass('hover');
391
+ }
388
392
  return false;
389
393
  } // }}}
390
394
  this.events.mouseout = function(svgid, e) { // {{{
391
- self.adaptor.illustrator.svg.container.find('.tile[element-id = "' + svgid + '"]').css('display','none');
392
- self.adaptor.illustrator.svg.container.find('[element-id = "' + svgid + '"]').removeClass('hover');
393
- self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').removeClass('hover');
395
+ let con = e ? $(e.currentTarget).closest('svg') : self.adaptor.illustrator.svg.container;
396
+ con.find('.tile[element-id = "' + svgid + '"]').css('display','none');
397
+ con.find('[element-id = "' + svgid + '"]').removeClass('hover');
398
+ if (self.adaptor.illustrator.svg.label_container) {
399
+ self.adaptor.illustrator.svg.label_container.find('[element-id = "' + svgid + '"]').removeClass('hover');
400
+ }
394
401
  return false;
395
402
  } // }}}
396
403
  this.events.dragstart = function (svgid, e) { //{{{
@@ -4,6 +4,7 @@ WFAdaptorManifestation = class extends WFAdaptorManifestationBase {
4
4
  this.compact = true;
5
5
  this.rotated_labels = false;
6
6
  this.lr = true;
7
+ this.top_gap = 20.8; // space from the top of the svg to the first symbol, more than the default
7
8
  this.wellformed_pre_test = true;
8
9
  this.elements.alternative.illustrator.noindent = true;
9
10
  this.elements.parallel_branch.illustrator.noindent = true;
data/cockpit/track.html CHANGED
@@ -38,8 +38,8 @@
38
38
  <link rel="stylesheet" href="/js_libs/relaxngui.css" type="text/css"/>
39
39
 
40
40
  <!-- modelling ui -->
41
- <script type="text/javascript" src="js/wfadaptor.js"></script>
42
- <link rel="stylesheet" href="css/wfadaptor.css" type="text/css"/>
41
+ <script type="text/javascript" src="/js_libs/wfadaptor.js"></script>
42
+ <link rel="stylesheet" href="/js_libs/wfadaptor.css" type="text/css"/>
43
43
 
44
44
  <!-- custom stuff, play arround -->
45
45
  <script type="text/javascript" src="js/ui.js"></script>
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.143"
3
+ s.version = "2.1.144"
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."
@@ -22,7 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.homepage = 'http://cpee.org/'
23
23
 
24
24
  s.add_runtime_dependency 'riddl', '~> 1.0', '>= 1.0.21'
25
- s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.158'
25
+ s.add_runtime_dependency 'weel', '~> 1.99', '>= 1.99.161'
26
26
  s.add_runtime_dependency 'highline', '~> 2.0'
27
27
  s.add_runtime_dependency 'redis', '~> 5.4'
28
28
  s.add_runtime_dependency 'net-ssh', '~> 7.3'
@@ -307,7 +307,8 @@ module CPEE
307
307
  uuid = CPEE::Persistence::extract_item(instance,opts,'attributes/uuid')
308
308
  state = CPEE::Persistence::extract_item(instance,opts,'state')
309
309
  state_changed = CPEE::Persistence::extract_item(instance,opts,'state/@changed')
310
- ins.root.add('instance', info, 'uuid' => uuid, 'id' => instance, 'state' => state, 'state_changed' => state_changed )
310
+ highlander = CPEE::Persistence::extract_item(instance,opts,'attributes/highlander') || ''
311
+ ins.root.add('instance', info, 'uuid' => uuid, 'id' => instance, 'state' => state, 'state_changed' => state_changed, 'highlander' => highlander )
311
312
  end
312
313
  ins.to_s
313
314
  end
@@ -215,6 +215,7 @@ module CPEE
215
215
  res += Persistence::keys_extract_name(opts,id,'transformation','dataelements','@type')
216
216
  res += Persistence::keys_extract_name(opts,id,'transformation','dslx')
217
217
  res += Persistence::keys_extract_name(opts,id,'transformation','dslx','@type')
218
+ res += Persistence::keys_extract_name(opts,id,'transformation','dslx','@extension')
218
219
  res
219
220
  end
220
221
 
@@ -37,6 +37,11 @@
37
37
  <attribute name='state_changed'>
38
38
  <data type="dateTime"/>
39
39
  </attribute>
40
+ <optional>
41
+ <attribute name='highlander'>
42
+ <data type="string"/>
43
+ </attribute>
44
+ </optional>
40
45
  <data type="string"/>
41
46
  </element>
42
47
  </define>
@@ -1,5 +1,4 @@
1
1
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
- <include href="arbitrary.rng"/>
3
2
  <define name="description">
4
3
  <element name="description" ns="http://cpee.org/ns/properties/2.0">
5
4
  <ref name="arbitrary"/>
@@ -1,5 +1,4 @@
1
1
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
2
- <include href="arbitrary.rng"/>
3
2
  <define name="dslx">
4
3
  <element name="dslx" ns="http://cpee.org/ns/properties/2.0">
5
4
  <ref name="arbitrary"/>
@@ -8,6 +8,7 @@
8
8
  <include href="endpoints.rng"/>
9
9
  <include href="attributes.rng"/>
10
10
  <include href="dsl.rng"/>
11
+ <include href="arbitrary.rng"/>
11
12
  <include href="dslx.rng"/>
12
13
  <include href="description.rng"/>
13
14
  <include href="transformation.rng"/>
@@ -7,6 +7,7 @@
7
7
  <include href="documents.rng"/>
8
8
  <include href="endpoints.rng"/>
9
9
  <include href="attributes.rng"/>
10
+ <include href="arbitrary.rng"/>
10
11
  <include href="description.rng"/>
11
12
  <include href="dslx.rng"/>
12
13
  <include href="transformation.rng"/>
@@ -7,6 +7,7 @@
7
7
  <include href="documents.rng"/>
8
8
  <include href="endpoints.rng"/>
9
9
  <include href="attributes.rng"/>
10
+ <include href="arbitrary.rng"/>
10
11
  <include href="description.rng"/>
11
12
  <include href="dslx.rng"/>
12
13
  <include href="transformation.rng"/>
@@ -7,6 +7,7 @@
7
7
  <include href="documents.rng"/>
8
8
  <include href="endpoints.rng"/>
9
9
  <include href="attributes.rng"/>
10
+ <include href="arbitrary.rng"/>
10
11
  <include href="description.rng"/>
11
12
  <include href="dslx.rng"/>
12
13
  <include href="transformation.rng"/>
@@ -7,7 +7,6 @@
7
7
  <choice>
8
8
  <value>ready</value>
9
9
  <value>running</value>
10
- <value>simulating</value>
11
10
  <value>stopping</value>
12
11
  <value>stopped</value>
13
12
  <value>abandoned</value>
@@ -20,7 +19,6 @@
20
19
  <choice>
21
20
  <value>ready</value>
22
21
  <value>running</value>
23
- <value>simulating</value>
24
22
  <value>stopping</value>
25
23
  <value>stopped</value>
26
24
  <value>abandoned</value>
data/lib/properties.xml CHANGED
@@ -37,7 +37,6 @@
37
37
  <choice>
38
38
  <value>ready</value>
39
39
  <value>running</value>
40
- <value>simulating</value>
41
40
  <value>stopping</value>
42
41
  <value>stopped</value>
43
42
  <value>abandoned</value>
@@ -30,11 +30,12 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
30
30
  tso + 2 > tsn && count > 100
31
31
  end # }}}
32
32
 
33
- def self::inform_state_change(arguments,newstate,data) # {{{
33
+ def self::inform_state_change(arguments,newstate) # {{{
34
34
  controller = arguments[0]
35
35
  controller.notify('state/change', :state => newstate)
36
36
  if newstate == :stopped || newstate == :finished
37
- controller.notify('dataelements/modify', :eid => 'ex-post', :values => data)
37
+ controller.notify('dataelements/modify', :eid => 'ex-post', :values => controller.dataelements)
38
+ controller.notify('endpoints/modify', :eid => 'ex-post', :values => controller.endpoints)
38
39
  end
39
40
  end # }}}
40
41
  def self::inform_syntax_error(arguments,err,code)# {{{
@@ -252,10 +253,6 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
252
253
  @handler_passthrough
253
254
  end # }}}
254
255
 
255
- def activity_no_longer_necessary # {{{
256
- true
257
- end # }}}
258
-
259
256
  def activity_uuid #{{{
260
257
  @handler_activity_uuid
261
258
  end #}}}
@@ -30,11 +30,12 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
30
30
  tso + 2 > tsn && count > 100
31
31
  end # }}}
32
32
 
33
- def self::inform_state_change(arguments,newstate,data) # {{{
33
+ def self::inform_state_change(arguments,newstate) # {{{
34
34
  controller = arguments[0]
35
35
  controller.notify('state/change', :state => newstate)
36
36
  if newstate == :stopped || newstate == :finished
37
- controller.notify('dataelements/modify', :eid => 'ex-post', :values => data)
37
+ controller.notify('dataelements/modify', :eid => 'ex-post', :values => controller.dataelements)
38
+ controller.notify('endpoints/modify', :eid => 'ex-post', :values => controller.endpoints)
38
39
  end
39
40
  end # }}}
40
41
  def self::inform_syntax_error(arguments,err,code)# {{{
@@ -252,10 +253,6 @@ class ConnectionWrapper < WEEL::ConnectionWrapperBase
252
253
  @handler_passthrough
253
254
  end # }}}
254
255
 
255
- def activity_no_longer_necessary # {{{
256
- true
257
- end # }}}
258
-
259
256
  def activity_uuid #{{{
260
257
  @handler_activity_uuid
261
258
  end #}}}
@@ -37,6 +37,8 @@ class Controller
37
37
 
38
38
  @redis = opts[:redis]
39
39
  @votes = []
40
+ @votes_mutex = Mutex.new
41
+ @stopping = false
40
42
 
41
43
  @id = id
42
44
 
@@ -136,7 +138,7 @@ class Controller
136
138
  end
137
139
 
138
140
  def start
139
- if vote("state/change", :state => 'running')
141
+ if vote("state/change", :state => 'running') && !@stopping
140
142
  @thread = @instance.start
141
143
  @thread.join
142
144
  else
@@ -145,22 +147,13 @@ class Controller
145
147
  end
146
148
  end
147
149
 
148
- def sim
149
- if vote("state/change", :state => 'simulating')
150
- @thread = @instance.sim
151
- @thread.join
152
- else
153
- @thread = @instance.stop
154
- @thread.join
155
- end
156
- end
157
-
158
150
  def stop
151
+ @stopping = true
159
152
  ### tell the instance to stop
160
153
  @instance.stop
161
154
  ### end all votes or it will not work
162
155
  Thread.new do # doing stuff in trap context is a nono. but in a thread its fine :-)
163
- @votes.each do |key|
156
+ @votes_mutex.synchronize { @votes.dup }.each do |key|
164
157
  # BEWARE111!!!1!! only send to worker 0, as voting goes through single worker
165
158
  # (cause i am not smart enough to make it work with multiple workers. Also voting
166
159
  # should not happen often, so the complexity is not worth it for now).
@@ -189,13 +182,23 @@ class Controller
189
182
  votes = pending.map { |c| c[:key] }
190
183
 
191
184
  if votes.length > 0
192
- @votes += votes
185
+ stopping = @votes_mutex.synchronize do
186
+ @votes.concat(votes) unless @stopping
187
+ @stopping
188
+ end
189
+ return true if stopping
193
190
  psredis = @opts[:redis_dyn].call "Instance #{@id} Vote"
194
191
  collect = []
195
192
  changes = []
196
193
  psredis.subscribe(votes.map{|e| 'vote-response:00:' + e }) do |on|
197
194
  on.subscribe do |channel, count|
198
- pending.each { |c| CPEE::Message::send(:vote,what,base,@id,uuid,info,c,@redis) } if count == votes.length
195
+ if count == votes.length
196
+ if @stopping
197
+ psredis.unsubscribe
198
+ else
199
+ pending.each { |c| CPEE::Message::send(:vote,what,base,@id,uuid,info,c,@redis) }
200
+ end
201
+ end
199
202
  end
200
203
  on.message do |what, message|
201
204
  index = message.index(' ')
@@ -204,7 +207,7 @@ class Controller
204
207
  cont, chg = vote_parse(m['content'])
205
208
  collect << cont
206
209
  changes << chg if chg && chg.any?
207
- @votes.delete m['name']
210
+ @votes_mutex.synchronize { @votes.delete m['name'] }
208
211
  cancel_callback m['name']
209
212
  if collect.length >= votes.length
210
213
  psredis.unsubscribe
@@ -1,15 +1,11 @@
1
1
  digraph States {
2
2
  ready -> running;
3
- ready -> simulating;
4
3
  ready -> abandoned;
5
4
  running -> stopping;
6
5
  stopped -> running;
7
- stopped -> simulating;
8
6
  stopped -> abandoned;
9
7
 
10
8
  running -> finishing;
11
- simulating -> ready;
12
- simulating -> stopped;
13
9
  finishing -> finished;
14
10
  stopping -> stopped;
15
11
  }
@@ -4,10 +4,9 @@
4
4
 
5
5
  <setable>
6
6
  <!-- the following states change through external input -->
7
- <ready><!-- in this state you can set the following four states -->
7
+ <ready><!-- in this state you can set the following three states -->
8
8
  <ready/>
9
9
  <running/>
10
- <simulating/>
11
10
  <abandoned/>
12
11
  </ready>
13
12
  <running><!-- in this state you can set the following state -->
@@ -16,9 +15,8 @@
16
15
  <stopping><!-- in this state you can set the following state -->
17
16
  <stopping/>
18
17
  </stopping>
19
- <stopped><!-- in this state you can set the following four states -->
18
+ <stopped><!-- in this state you can set the following three states -->
20
19
  <running/>
21
- <simulating/>
22
20
  <abandoned/>
23
21
  <stopped/>
24
22
  </stopped>
@@ -30,10 +28,6 @@
30
28
  <stopping/>
31
29
  <finishing/>
32
30
  </running>
33
- <simulating>
34
- <ready/>
35
- <stopped/>
36
- </simulating>
37
31
  <finishing>
38
32
  <finished/>
39
33
  </finishing>
@@ -68,9 +68,6 @@
68
68
  <topic id='handler'>
69
69
  <event>change</event>
70
70
  </topic>
71
- <topic id='simulating'>
72
- <event>step</event>
73
- </topic>
74
71
  <topic id='task'>
75
72
  <event>instantiation</event>
76
73
  <event>error</event>