cpee 2.1.25 → 2.1.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/ui.css +1 -1
  3. data/cockpit/templates/Subprocess.xml +79 -0
  4. data/cockpit/templates/Subprocess.xml.attrs +13 -0
  5. data/cockpit/templates/Track Test.xml +31 -28
  6. data/cockpit/templates/Track Test.xml.attrs +11 -0
  7. data/cockpit/templates/Wait.xml +73 -0
  8. data/cockpit/templates/Wait.xml.attrs +13 -0
  9. data/cockpit/templates/Worklist.xml +47 -18
  10. data/cockpit/templates/instantiate/Take_Perf.xml +13 -10
  11. data/cockpit/templates/instantiate/Take_Sub.xml +4 -8
  12. data/cockpit/templates/instantiate/Take_X.xml +12 -9
  13. data/cockpit/themes/compact/theme.js +4 -2
  14. data/cockpit/themes/control/theme.js +4 -2
  15. data/cockpit/themes/default/theme.js +4 -2
  16. data/cockpit/themes/extended/theme.js +4 -2
  17. data/cockpit/themes/model/theme.js +4 -2
  18. data/cockpit/themes/packed/theme.js +4 -2
  19. data/cockpit/themes/preset/theme.js +4 -2
  20. data/cpee.gemspec +1 -1
  21. data/lib/cpee/fail.rb +23 -0
  22. data/lib/cpee/implementation.rb +34 -18
  23. data/lib/cpee/implementation_callbacks.rb +20 -15
  24. data/lib/cpee/implementation_notifications.rb +22 -17
  25. data/lib/cpee/implementation_properties.rb +65 -60
  26. data/lib/cpee/message.rb +15 -13
  27. data/lib/cpee/persistence.rb +33 -10
  28. data/server/executionhandlers/ruby/connection.rb +7 -7
  29. data/server/executionhandlers/ruby/controller.rb +5 -3
  30. data/server/executionhandlers/ruby/dsl_to_dslx.xsl +40 -20
  31. data/server/executionhandlers/ruby/test.xml +43 -0
  32. data/server/routing/end.pid +1 -0
  33. data/server/routing/forward-events.pid +1 -0
  34. data/server/routing/forward-events.rb +6 -0
  35. data/server/routing/forward-votes.pid +1 -0
  36. data/server/routing/persist.pid +1 -0
  37. data/server/routing/persist.rb +4 -2
  38. data/server/server.conf +1 -1
  39. data/tools/cpee +14 -6
  40. metadata +13 -6
  41. data/cockpit/templates/Coopis 2010.xml.active +0 -1
  42. data/cockpit/templates/Coopis 2010.xml.active-uuid +0 -1
  43. data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active +0 -1
  44. data/cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active-uuid +0 -1
@@ -6,10 +6,10 @@
6
6
  <xsl:template match="/">
7
7
  <xsl:text>control flow do</xsl:text>
8
8
  <xsl:call-template name="print-newline"/>
9
- <xsl:apply-templates select="//d:description"/>
9
+ <xsl:apply-templates select="/d:description"/>
10
10
  <xsl:text>end</xsl:text>
11
11
  </xsl:template>
12
- <xsl:template match="//d:description">
12
+ <xsl:template match="/d:description">
13
13
  <xsl:apply-templates>
14
14
  <xsl:with-param name="myspace">
15
15
  <xsl:value-of select="0*$myspacemultiplier"/>
@@ -403,6 +403,8 @@
403
403
  <xsl:template match="d:parameters">
404
404
  <xsl:apply-templates select="d:label" mode="parameter"/>
405
405
  <xsl:apply-templates select="d:*[not(name()='label')]" mode="parameter"/>
406
+ <xsl:if test="count(*) &gt; 0">, </xsl:if>
407
+ <xsl:apply-templates select="../d:annotations" mode="annotations"/>
406
408
  </xsl:template>
407
409
  <xsl:template match="d:label" mode="parameter">
408
410
  <xsl:text>:</xsl:text>
@@ -411,6 +413,14 @@
411
413
  <xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'&quot;','\&quot;')"/>
412
414
  <xsl:text>"</xsl:text>
413
415
  </xsl:template>
416
+ <xsl:template match="d:annotations" mode="annotations">
417
+ <xsl:text>:</xsl:text>
418
+ <xsl:value-of select="name()"/>
419
+ <xsl:text> =&gt; </xsl:text>
420
+ <xsl:text>{ </xsl:text>
421
+ <xsl:apply-templates select="d:*" mode="simplemulti"/>
422
+ <xsl:text> }</xsl:text>
423
+ </xsl:template>
414
424
  <xsl:template match="d:*[not(name()='label')]" mode="parameter">
415
425
  <xsl:if test="count(preceding-sibling::*) &gt; 0">, </xsl:if>
416
426
  <xsl:text>:</xsl:text>
@@ -423,24 +433,6 @@
423
433
  <xsl:apply-templates select="d:*" mode="sub"/>
424
434
  <xsl:text>]</xsl:text>
425
435
  </xsl:when>
426
- <xsl:when test="count(*) &gt; 0 and name()='sensors'">
427
- <xsl:text>[</xsl:text>
428
- <xsl:apply-templates select="d:*" mode="plainmulti"/>
429
- <xsl:text>]</xsl:text>
430
- </xsl:when>
431
- <xsl:when test="count(*) &gt; 0 and name()='aggregators'">
432
- <xsl:text>[</xsl:text>
433
- <xsl:apply-templates select="d:*" mode="plainmulti"/>
434
- <xsl:text>]</xsl:text>
435
- </xsl:when>
436
- <xsl:when test="count(*) &gt; 0 and name()='costs'">
437
- <xsl:text>[</xsl:text>
438
- <xsl:apply-templates select="d:*" mode="plainmulti"/>
439
- <xsl:text>]</xsl:text>
440
- </xsl:when>
441
- <xsl:when test="count(*) &gt; 0 and name()='report'">
442
- <xsl:apply-templates select="d:*" mode="plainmulti"/>
443
- </xsl:when>
444
436
  <xsl:when test="count(*) &gt; 0 and not(name()='arguments')">
445
437
  <xsl:text>{</xsl:text>
446
438
  <xsl:apply-templates select="d:*" mode="parameter"/>
@@ -517,6 +509,34 @@
517
509
  </xsl:choose>
518
510
  <xsl:text> }</xsl:text>
519
511
  </xsl:template>
512
+ <xsl:template match="d:*" mode="simplemulti">
513
+ <xsl:if test="count(preceding-sibling::*) &gt; 0">, </xsl:if>
514
+ <xsl:text>:</xsl:text>
515
+ <xsl:value-of select="name()"/>
516
+ <xsl:text> =&gt; </xsl:text>
517
+ <xsl:choose>
518
+ <xsl:when test="count(*) &gt; 0">
519
+ <xsl:text>{</xsl:text>
520
+ <xsl:apply-templates select="d:*" mode="plain"/>
521
+ <xsl:text>}</xsl:text>
522
+ </xsl:when>
523
+ <xsl:when test="not(node())">
524
+ <xsl:text>nil</xsl:text>
525
+ </xsl:when>
526
+ <xsl:otherwise>
527
+ <xsl:choose>
528
+ <xsl:when test="substring(text(),1,1) = '!'">
529
+ <xsl:value-of select="substring(text(),2)"/>
530
+ </xsl:when>
531
+ <xsl:otherwise>
532
+ <xsl:text>"</xsl:text>
533
+ <xsl:value-of select="str:replace(str:replace(text(),'\','\\'),'&quot;','\&quot;')"/>
534
+ <xsl:text>"</xsl:text>
535
+ </xsl:otherwise>
536
+ </xsl:choose>
537
+ </xsl:otherwise>
538
+ </xsl:choose>
539
+ </xsl:template>
520
540
  <xsl:template name="format-name">
521
541
  <xsl:param name="tname"/>
522
542
  <xsl:choose>
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0"?>
2
+ <description xmlns="http://cpee.org/ns/description/1.0">
3
+ <call id="a1" endpoint="">
4
+ <parameters>
5
+ <label>asdad</label>
6
+ <method>:post</method>
7
+ <arguments/>
8
+ </parameters>
9
+ <code>
10
+ <prepare/>
11
+ <finalize output="result"/>
12
+ <update output="result"/>
13
+ <rescue output="result"/>
14
+ </code>
15
+ <annotations>
16
+ <_timing>
17
+ <_timing_weight/>
18
+ <_timing_avg/>
19
+ <explanations/>
20
+ </_timing>
21
+ <_context_data_analysis>
22
+ <probes/>
23
+ <ips/>
24
+ </_context_data_analysis>
25
+ <report>
26
+ <url>http://hoellerersdsdf</url>
27
+ </report>
28
+ <_notes>
29
+ <_notes_general/>
30
+ </_notes>
31
+ </annotations>
32
+ <documentation>
33
+ <input/>
34
+ <output/>
35
+ <implementation>
36
+ <description/>
37
+ </implementation>
38
+ <code>
39
+ <description/>
40
+ </code>
41
+ </documentation>
42
+ </call>
43
+ </description>
@@ -0,0 +1 @@
1
+ 1772897
@@ -0,0 +1 @@
1
+ 1772901
@@ -62,6 +62,12 @@ Daemonite.new do |opts|
62
62
  end
63
63
  end
64
64
  end
65
+ unless opts[:redis].exists?("instance:#{instance}/state")
66
+ empt = opts[:redis].keys("instance:#{instance}/*").to_a
67
+ opts[:redis].multi do |multi|
68
+ multi.del empt
69
+ end
70
+ end
65
71
  rescue => e
66
72
  puts e.message
67
73
  puts e.backtrace
@@ -0,0 +1 @@
1
+ 1772905
@@ -0,0 +1 @@
1
+ 1772911
@@ -66,8 +66,10 @@ Daemonite.new do |opts|
66
66
  end
67
67
  when 'event:state/change'
68
68
  opts[:redis].multi do |multi|
69
- multi.set("instance:#{instance}/state",mess.dig('content','state'))
70
- multi.set("instance:#{instance}/state/@changed",mess.dig('timestamp'))
69
+ unless mess.dig('content','state') == 'purged'
70
+ multi.set("instance:#{instance}/state",mess.dig('content','state'))
71
+ multi.set("instance:#{instance}/state/@changed",mess.dig('timestamp'))
72
+ end
71
73
  end
72
74
  when 'event:executionhandler/change'
73
75
  opts[:redis].set("instance:#{instance}/executionhandler",mess.dig('content','executionhandler'))
data/server/server.conf CHANGED
@@ -1,4 +1,4 @@
1
1
  :host: tango.wst.univie.ac.at
2
2
  :port: 8298
3
- :url: http://tango.wst.univie.ac.at:8298
3
+ :url: http://tango.wst.univie.ac.at/flow/engine/
4
4
  :secure: false
data/tools/cpee CHANGED
@@ -119,14 +119,22 @@ elsif command == 'convert'
119
119
  doc.find('//d:parallel_branch/@pass').delete_all!
120
120
  doc.find('//d:parallel_branch/@local').delete_all!
121
121
  doc.find('//d:call').each do |c|
122
- c.find('d:annotations').first.add c.find('d:parameters/d:_context_data_analysis')
123
- c.find('d:annotations').first.add c.find('d:parameters/d:_report')
122
+ if c.find('d:annotations').empty?
123
+ c.add('d:annotations')
124
+ end
125
+ c.find('d:annotations').first.add c.find('d:parameters/d:_context_data_analysis') rescue nil
126
+ c.find('d:annotations').first.add c.find('d:parameters/d:report') rescue nil
127
+ c.find('d:annotations').first.add c.find('d:_timing') rescue nil
128
+ c.find('d:annotations').first.add c.find('d:_notes') rescue nil
129
+ c.find('d:parameters/d:sensors').delete_all! rescue nil
130
+ c.find('d:parameters/d:stream').delete_all! rescue nil
131
+ c.find('d:annotations').first.add c.find('d:parameters/d:report') rescue nil
124
132
  if c.find('d:documentation').empty?
125
133
  node = c.add('d:documentation')
126
- node.add c.find('d:input')
127
- node.add c.find('d:output')
128
- node.add c.find('d:implementation')
129
- node.add c.find('d:code[d:description]')
134
+ node.add c.find('d:input') rescue nil
135
+ node.add c.find('d:output') rescue nil
136
+ node.add c.find('d:implementation') rescue nil
137
+ node.add c.find('d:code[d:description]') rescue nil
130
138
  end
131
139
  end
132
140
  doc.find('//x:handlerwrapper').delete_all!
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.25
4
+ version: 2.1.30
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: 2021-11-08 00:00:00.000000000 Z
13
+ date: 2022-01-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: riddl
@@ -221,20 +221,21 @@ files:
221
221
  - cockpit/templates.legacy/testsets.xml
222
222
  - cockpit/templates.legacy/transformations.xml
223
223
  - cockpit/templates/Coopis 2010.xml
224
- - cockpit/templates/Coopis 2010.xml.active
225
- - cockpit/templates/Coopis 2010.xml.active-uuid
226
224
  - cockpit/templates/IUPC arXiv:1104.3609 P34 1.xml
227
225
  - cockpit/templates/IUPC arXiv:1104.3609 P34 2.xml
228
226
  - cockpit/templates/IUPC arXiv:1104.3609 P34 3.xml
227
+ - cockpit/templates/Subprocess.xml
228
+ - cockpit/templates/Subprocess.xml.attrs
229
229
  - cockpit/templates/Track Test Local.xml
230
230
  - cockpit/templates/Track Test.xml
231
+ - cockpit/templates/Track Test.xml.attrs
231
232
  - cockpit/templates/UR-VUE 2020 Manual Adjust.xml
232
233
  - cockpit/templates/UR-VUE 2020 Solution Baseline.xml
233
- - cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active
234
- - cockpit/templates/UR-VUE 2020 Solution Baseline.xml.active-uuid
235
234
  - cockpit/templates/UR-VUE 2020 Solution NN.xml
236
235
  - cockpit/templates/UR-VUE 2020 Solution View.xml
237
236
  - cockpit/templates/UR-VUE 2020.xml
237
+ - cockpit/templates/Wait.xml
238
+ - cockpit/templates/Wait.xml.attrs
238
239
  - cockpit/templates/Worklist.xml
239
240
  - cockpit/templates/instantiate.local/Take_Sub.xml
240
241
  - cockpit/templates/instantiate/Take_Perf.xml
@@ -605,6 +606,7 @@ files:
605
606
  - lib/callbacks/callbacks.rng
606
607
  - lib/cpee.xml
607
608
  - lib/cpee/attributes_helper.rb
609
+ - lib/cpee/fail.rb
608
610
  - lib/cpee/implementation.rb
609
611
  - lib/cpee/implementation_callbacks.rb
610
612
  - lib/cpee/implementation_notifications.rb
@@ -652,6 +654,7 @@ files:
652
654
  - server/executionhandlers/ruby/controller.rb
653
655
  - server/executionhandlers/ruby/dsl_to_dslx.xsl
654
656
  - server/executionhandlers/ruby/execution.rb
657
+ - server/executionhandlers/ruby/test.xml
655
658
  - server/resources/empty_dslx.xml
656
659
  - server/resources/notifications/logging/subscription.xml
657
660
  - server/resources/properties.empty
@@ -660,9 +663,13 @@ files:
660
663
  - server/resources/states.xml
661
664
  - server/resources/topics.xml
662
665
  - server/resources/transformation.xml
666
+ - server/routing/end.pid
663
667
  - server/routing/end.rb
668
+ - server/routing/forward-events.pid
664
669
  - server/routing/forward-events.rb
670
+ - server/routing/forward-votes.pid
665
671
  - server/routing/forward-votes.rb
672
+ - server/routing/persist.pid
666
673
  - server/routing/persist.rb
667
674
  - server/server.conf
668
675
  - server/server.rb
@@ -1 +0,0 @@
1
- https://cpee.org/flow/engine/542
@@ -1 +0,0 @@
1
- 692f7da6-a212-4876-9e72-dd8fc242651d
@@ -1 +0,0 @@
1
- https://cpee.org/flow/engine/613
@@ -1 +0,0 @@
1
- ffbc55c8-0759-42f8-955e-30ebf9c086a6