cpee 2.0.18 → 2.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (243) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/wfadaptor.css +17 -0
  3. data/cockpit/js/instance.js +9 -8
  4. data/cockpit/js_libs.zip +0 -0
  5. data/cockpit/templates/.CPEE.xml +8 -0
  6. data/cockpit/templates/.Signavio.xml +8 -0
  7. data/cockpit/templates/.templates.xml +13 -0
  8. data/cockpit/templates/.transformations.xml +4 -0
  9. data/cockpit/themes/model/rngs/call.rng +2 -1
  10. data/cockpit/themes/model/rngs/callmanipulate.rng +2 -1
  11. data/cockpit/themes/model/theme.js +1 -1
  12. data/cpee.gemspec +2 -2
  13. data/lib/cpee/controller.rb +6 -3
  14. data/lib/cpee/implementation.rb +23 -8
  15. data/lib/cpee/implementation_notifications.rb +1 -1
  16. data/lib/cpee/persistence.rb +2 -1
  17. data/lib/cpee/redis.rb +57 -0
  18. data/server/handlerwrappers/default.rb +15 -15
  19. data/server/resources/notifications/logging/subscription.xml +6 -0
  20. data/server/routing/end.rb +16 -4
  21. data/server/routing/forward-events.rb +19 -7
  22. data/server/routing/forward-votes.rb +19 -7
  23. data/server/routing/persist.rb +26 -14
  24. data/tools/cpee +5 -5
  25. data/tools/test/README +4 -0
  26. data/tools/test/config.json +3 -0
  27. data/tools/test/contrib/graph_example.svg +1166 -0
  28. data/tools/test/contrib/legend.svg +817 -0
  29. data/tools/test/contrib/symbols.svg +224 -0
  30. data/tools/test/contrib/transformation1.xsl +264 -0
  31. data/tools/test/contrib/transformation2.xsl +10 -0
  32. data/tools/test/contrib/tree_example.svg +788 -0
  33. data/tools/test/css/model.css +24 -0
  34. data/tools/test/css/track.css +60 -0
  35. data/tools/test/css/ui.css +214 -0
  36. data/tools/test/css/wfadaptor.css +422 -0
  37. data/tools/test/edit.html +258 -0
  38. data/tools/test/graph.html +69 -0
  39. data/tools/test/index.html +258 -0
  40. data/tools/test/js/details.js +109 -0
  41. data/tools/test/js/instance.js +1344 -0
  42. data/tools/test/js/model.js +41 -0
  43. data/tools/test/js/parameters.js +82 -0
  44. data/tools/test/js/track.js +18 -0
  45. data/tools/test/js/ui.js +104 -0
  46. data/tools/test/js/wfadaptor.js +763 -0
  47. data/tools/test/js_libs.zip +0 -0
  48. data/tools/test/js_libs/Makefile +2 -0
  49. data/tools/test/js_libs/ansi_up.js +333 -0
  50. data/tools/test/js_libs/console.js +80 -0
  51. data/tools/test/js_libs/custommenu.css +84 -0
  52. data/tools/test/js_libs/custommenu.js +104 -0
  53. data/tools/test/js_libs/experiments1/relaxngui.css +185 -0
  54. data/tools/test/js_libs/experiments1/relaxngui.js +488 -0
  55. data/tools/test/js_libs/experiments1/rngtest9.html +60 -0
  56. data/tools/test/js_libs/experiments1/rngtest9.rng +35 -0
  57. data/tools/test/js_libs/experiments1/rngtest9.xml +8 -0
  58. data/tools/test/js_libs/jquery-2.2.4.min.js +4 -0
  59. data/tools/test/js_libs/jquery-3.2.1.min.js +4 -0
  60. data/tools/test/js_libs/jquery-3.3.1.min.js +2 -0
  61. data/tools/test/js_libs/jquery.browser.js +40 -0
  62. data/tools/test/js_libs/jquery.caret.min.js +10 -0
  63. data/tools/test/js_libs/jquery.cookie.js +117 -0
  64. data/tools/test/js_libs/jquery.min.js +1 -0
  65. data/tools/test/js_libs/jquery.svg.min.js +6 -0
  66. data/tools/test/js_libs/jquery.svgdom.min.js +6 -0
  67. data/tools/test/js_libs/markdown.min.js +1 -0
  68. data/tools/test/js_libs/parsequery.js +21 -0
  69. data/tools/test/js_libs/printf.js +368 -0
  70. data/tools/test/js_libs/relaxngui.css +213 -0
  71. data/tools/test/js_libs/relaxngui.js +543 -0
  72. data/tools/test/js_libs/strftime.min.js +1 -0
  73. data/tools/test/js_libs/tests/dataelements.html +59 -0
  74. data/tools/test/js_libs/tests/dataelements.rng +8 -0
  75. data/tools/test/js_libs/tests/dataelements.xml +3 -0
  76. data/tools/test/js_libs/tests/relaxngui.css +203 -0
  77. data/tools/test/js_libs/tests/relaxngui.js +502 -0
  78. data/tools/test/js_libs/tests/rngtest1.html +66 -0
  79. data/tools/test/js_libs/tests/rngtest1.rng +147 -0
  80. data/tools/test/js_libs/tests/rngtest1.xml +13 -0
  81. data/tools/test/js_libs/tests/rngtest2.html +60 -0
  82. data/tools/test/js_libs/tests/rngtest2.rng +6 -0
  83. data/tools/test/js_libs/tests/rngtest2.xml +3 -0
  84. data/tools/test/js_libs/tests/rngtest3.html +60 -0
  85. data/tools/test/js_libs/tests/rngtest3.rng +23 -0
  86. data/tools/test/js_libs/tests/rngtest3.xml +9 -0
  87. data/tools/test/js_libs/tests/rngtest4.html +60 -0
  88. data/tools/test/js_libs/tests/rngtest4.rng +19 -0
  89. data/tools/test/js_libs/tests/rngtest4.xml +12 -0
  90. data/tools/test/js_libs/tests/rngtest5.html +60 -0
  91. data/tools/test/js_libs/tests/rngtest5.rng +75 -0
  92. data/tools/test/js_libs/tests/rngtest5.xml +40 -0
  93. data/tools/test/js_libs/tests/rngtest6.html +60 -0
  94. data/tools/test/js_libs/tests/rngtest6.rng +24 -0
  95. data/tools/test/js_libs/tests/rngtest6.xml +6 -0
  96. data/tools/test/js_libs/tests/rngtest8.html +60 -0
  97. data/tools/test/js_libs/tests/rngtest8.rng +13 -0
  98. data/tools/test/js_libs/tests/rngtest8.xml +2 -0
  99. data/tools/test/js_libs/tests/rngtest9.html +60 -0
  100. data/tools/test/js_libs/tests/rngtest9.rng +31 -0
  101. data/tools/test/js_libs/tests/rngtest9.xml +8 -0
  102. data/tools/test/js_libs/ui.css +333 -0
  103. data/tools/test/js_libs/ui.html +168 -0
  104. data/tools/test/js_libs/ui.js +177 -0
  105. data/tools/test/js_libs/underscore.min.js +27 -0
  106. data/tools/test/js_libs/util.js +81 -0
  107. data/tools/test/js_libs/vkbeautify.0.99.00.beta.js +358 -0
  108. data/tools/test/js_libs/vkbeautify.js +1 -0
  109. data/tools/test/js_libs/webcomponents.min.js +196 -0
  110. data/tools/test/model.html +192 -0
  111. data/tools/test/rngs/attributes.rng +8 -0
  112. data/tools/test/rngs/dataelements.rng +8 -0
  113. data/tools/test/rngs/endpoints.rng +8 -0
  114. data/tools/test/templates.legacy/Async.xml +46 -0
  115. data/tools/test/templates.legacy/BCO.xml +70 -0
  116. data/tools/test/templates.legacy/BCS.xml +70 -0
  117. data/tools/test/templates.legacy/Centurio.xml +75 -0
  118. data/tools/test/templates.legacy/Concurrent.xml +40 -0
  119. data/tools/test/templates.legacy/Coopis Testset.xml +76 -0
  120. data/tools/test/templates.legacy/Endpoints and Data Manipulation.xml +30 -0
  121. data/tools/test/templates.legacy/ICSOC Testset.xml +95 -0
  122. data/tools/test/templates.legacy/Infinity.xml +28 -0
  123. data/tools/test/templates.legacy/Lego Boxer.xml +31 -0
  124. data/tools/test/templates.legacy/Lego Conveyor.xml +31 -0
  125. data/tools/test/templates.legacy/Lego Crane.xml +87 -0
  126. data/tools/test/templates.legacy/Lego Ejector.xml +55 -0
  127. data/tools/test/templates.legacy/Lego Full.xml +142 -0
  128. data/tools/test/templates.legacy/Lego Liddy.xml +40 -0
  129. data/tools/test/templates.legacy/Lego Plate.xml +31 -0
  130. data/tools/test/templates.legacy/Lego Transporter.xml +43 -0
  131. data/tools/test/templates.legacy/Lego_Part_1.xml +85 -0
  132. data/tools/test/templates.legacy/LgLinear.xml +65 -0
  133. data/tools/test/templates.legacy/Linear.xml +77 -0
  134. data/tools/test/templates.legacy/Log.xml +117 -0
  135. data/tools/test/templates.legacy/Mangler 1.xml +87 -0
  136. data/tools/test/templates.legacy/Mangler 2.xml +103 -0
  137. data/tools/test/templates.legacy/Manuel Labels.xml +55 -0
  138. data/tools/test/templates.legacy/Promise.xml +275 -0
  139. data/tools/test/templates.legacy/SOPROMO Test Sonification.xml +83 -0
  140. data/tools/test/templates.legacy/Subprocess.xml +56 -0
  141. data/tools/test/templates.legacy/Syncing P34 1.xml +77 -0
  142. data/tools/test/templates.legacy/Syncing P34 2.xml +77 -0
  143. data/tools/test/templates.legacy/Syncing P34 3.xml +77 -0
  144. data/tools/test/templates.legacy/Syncing P34.xml +77 -0
  145. data/tools/test/templates.legacy/TEST - Bad Loop.xml +173 -0
  146. data/tools/test/templates.legacy/TEST - Wrong Positions.xml +174 -0
  147. data/tools/test/templates.legacy/Take_5.xml +48 -0
  148. data/tools/test/templates.legacy/Update.xml +32 -0
  149. data/tools/test/templates.legacy/Worklist Parallel.xml +104 -0
  150. data/tools/test/templates.legacy/Worklist Test CPEE.xml +40 -0
  151. data/tools/test/templates.legacy/Worklist Test.xml +42 -0
  152. data/tools/test/templates.legacy/Worklist Test2.xml +43 -0
  153. data/tools/test/templates.legacy/convert_cpee2.rb +15 -0
  154. data/tools/test/templates.legacy/convert_preset.rb +32 -0
  155. data/tools/test/templates.legacy/testsets.xml +37 -0
  156. data/tools/test/templates.legacy/transformations.xml +4 -0
  157. data/tools/test/templates/Coopis 2010.xml +76 -0
  158. data/tools/test/templates/IUPC arXiv:1104.3609 P34 1.xml +77 -0
  159. data/tools/test/templates/IUPC arXiv:1104.3609 P34 2.xml +77 -0
  160. data/tools/test/templates/IUPC arXiv:1104.3609 P34 3.xml +77 -0
  161. data/tools/test/templates/Track Test Local.xml +82 -0
  162. data/tools/test/templates/Track Test.xml +82 -0
  163. data/tools/test/templates/UR-VUE 2020 Manual Adjust.xml +182 -0
  164. data/tools/test/templates/UR-VUE 2020 Solution Baseline.xml +203 -0
  165. data/tools/test/templates/UR-VUE 2020 Solution NN.xml +197 -0
  166. data/tools/test/templates/UR-VUE 2020 Solution View.xml +151 -0
  167. data/tools/test/templates/UR-VUE 2020.xml +26 -0
  168. data/tools/test/templates/Worklist.xml +42 -0
  169. data/tools/test/templates/instantiate.local/Take_Sub.xml +59 -0
  170. data/tools/test/templates/instantiate/Take_Perf.xml +46 -0
  171. data/tools/test/templates/instantiate/Take_Sub.xml +58 -0
  172. data/tools/test/templates/instantiate/Take_X.xml +48 -0
  173. data/tools/test/themes/compact/theme.js +1285 -0
  174. data/tools/test/themes/diana/theme.js +1650 -0
  175. data/tools/test/themes/extended/theme.js +1325 -0
  176. data/tools/test/themes/model/rngs/alternative.rng +1 -0
  177. data/tools/test/themes/model/rngs/call.rng +67 -0
  178. data/tools/test/themes/model/rngs/callmanipulate.rng +72 -0
  179. data/tools/test/themes/model/rngs/choose.rng +1 -0
  180. data/tools/test/themes/model/rngs/critical.rng +1 -0
  181. data/tools/test/themes/model/rngs/escape.rng +1 -0
  182. data/tools/test/themes/model/rngs/group.rng +1 -0
  183. data/tools/test/themes/model/rngs/loop.rng +1 -0
  184. data/tools/test/themes/model/rngs/manipulate.rng +1 -0
  185. data/tools/test/themes/model/rngs/otherwise.rng +1 -0
  186. data/tools/test/themes/model/rngs/parallel.rng +1 -0
  187. data/tools/test/themes/model/rngs/parallel_branch.rng +1 -0
  188. data/tools/test/themes/model/rngs/scripts.rng +7 -0
  189. data/tools/test/themes/model/rngs/stop.rng +1 -0
  190. data/tools/test/themes/model/rngs/terminate.rng +1 -0
  191. data/tools/test/themes/model/theme.js +1268 -0
  192. data/tools/test/themes/packed/theme.js +1286 -0
  193. data/tools/test/themes/preset/rngs/alternative.rng +25 -0
  194. data/tools/test/themes/preset/rngs/call.rng +122 -0
  195. data/tools/test/themes/preset/rngs/callmanipulate.rng +145 -0
  196. data/tools/test/themes/preset/rngs/choose.rng +14 -0
  197. data/tools/test/themes/preset/rngs/closed_loop.rng +62 -0
  198. data/tools/test/themes/preset/rngs/closed_loop_cancel.rng +5 -0
  199. data/tools/test/themes/preset/rngs/closed_loop_control.rng +31 -0
  200. data/tools/test/themes/preset/rngs/closed_loop_measuring.rng +12 -0
  201. data/tools/test/themes/preset/rngs/critical.rng +5 -0
  202. data/tools/test/themes/preset/rngs/escape.rng +1 -0
  203. data/tools/test/themes/preset/rngs/group.rng +3 -0
  204. data/tools/test/themes/preset/rngs/loop.rng +22 -0
  205. data/tools/test/themes/preset/rngs/manipulate.rng +9 -0
  206. data/tools/test/themes/preset/rngs/otherwise.rng +22 -0
  207. data/tools/test/themes/preset/rngs/parallel.rng +21 -0
  208. data/tools/test/themes/preset/rngs/parallel_branch.rng +8 -0
  209. data/tools/test/themes/preset/rngs/scripts.rng +23 -0
  210. data/tools/test/themes/preset/rngs/stop.rng +5 -0
  211. data/tools/test/themes/preset/rngs/terminate.rng +1 -0
  212. data/tools/test/themes/preset/symbols/alternative.svg +5 -0
  213. data/tools/test/themes/preset/symbols/arrow.svg +3 -0
  214. data/tools/test/themes/preset/symbols/call.svg +6 -0
  215. data/tools/test/themes/preset/symbols/callmanipulate.svg +8 -0
  216. data/tools/test/themes/preset/symbols/choose.svg +5 -0
  217. data/tools/test/themes/preset/symbols/choose_exclusive.svg +5 -0
  218. data/tools/test/themes/preset/symbols/choose_inclusive.svg +4 -0
  219. data/tools/test/themes/preset/symbols/closed_loop.svg +5 -0
  220. data/tools/test/themes/preset/symbols/closed_loop_cancel.svg +5 -0
  221. data/tools/test/themes/preset/symbols/closed_loop_control.svg +5 -0
  222. data/tools/test/themes/preset/symbols/closed_loop_measuring.svg +6 -0
  223. data/tools/test/themes/preset/symbols/complex.svg +8 -0
  224. data/tools/test/themes/preset/symbols/critical.svg +4 -0
  225. data/tools/test/themes/preset/symbols/end.svg +3 -0
  226. data/tools/test/themes/preset/symbols/escape.svg +5 -0
  227. data/tools/test/themes/preset/symbols/event_end.svg +3 -0
  228. data/tools/test/themes/preset/symbols/loop.svg +5 -0
  229. data/tools/test/themes/preset/symbols/manipulate.svg +4 -0
  230. data/tools/test/themes/preset/symbols/otherwise.svg +5 -0
  231. data/tools/test/themes/preset/symbols/parallel.svg +5 -0
  232. data/tools/test/themes/preset/symbols/parallel_branch.svg +5 -0
  233. data/tools/test/themes/preset/symbols/parallel_branch_compact.svg +4 -0
  234. data/tools/test/themes/preset/symbols/parallel_branch_event.svg +14 -0
  235. data/tools/test/themes/preset/symbols/parallel_branch_normal.svg +5 -0
  236. data/tools/test/themes/preset/symbols/scripts.svg +4 -0
  237. data/tools/test/themes/preset/symbols/start.svg +3 -0
  238. data/tools/test/themes/preset/symbols/stop.svg +5 -0
  239. data/tools/test/themes/preset/symbols/terminate.svg +4 -0
  240. data/tools/test/themes/preset/theme.js +1287 -0
  241. data/tools/test/track.html +142 -0
  242. metadata +225 -3
  243. data/cockpit/edit.html +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2116b2c1f931131731d1328509215edd4ee481765210015badc21334f744e4ef
4
- data.tar.gz: d2dc61196bc6979eb60ad3f342358a43e3441dc20fd891d8e114b5c33f77179b
3
+ metadata.gz: 245c1fa5ecd451992f6fb7ba0386858bc8595f640e08c353ad153ec69e57eb14
4
+ data.tar.gz: 71f69beee300e44b98c70b97c06818fea60fe18685e9080f6e796d95109ee20c
5
5
  SHA512:
6
- metadata.gz: 6fd16252179b91efe2f3a33f440afd9450312c39059080b8fdee165f88a1583ddb21dfa8d86d86ba2a1ab4cdec8696149a1fcf355f5bfa5980809a4efff3791a
7
- data.tar.gz: dbaedb2fa0821d278e732fbf9d42fe0d7bfe43553d19f3a2595b1b19e15fe80bfb8316cccffebaab0c77004a797e15176c1f574024845de00243e23676b61cdd
6
+ metadata.gz: 2aac6ff87441d239b3d0c359c3a42fe489e3f6e6bf7f8363d66032a53095c818d6162db6e9d448bcf20a8cc379815bf7b126f6a2cab122381709d9cc2f387d30
7
+ data.tar.gz: 0acb4ca004b780c45eb46736b98b4c30c0709e22dc97e674c62a2ff5a0971447e12940b7c1fb14fdc5b5044cdb8614c6a7447e19307bb8baca6f78f9baa76ec1
@@ -346,6 +346,23 @@ svg text.label {
346
346
  font-family:Arial;
347
347
  }
348
348
 
349
+ svg text.smaller {
350
+ font-size:12px;
351
+ font-style:normal;
352
+ font-variant:normal;
353
+ font-weight:bold;
354
+ font-stretch:normal;
355
+ text-align:center;
356
+ line-height:125%;
357
+ writing-mode:horizontal-tb;
358
+ text-anchor:middle;
359
+ color: var(--wfadaptor-base);
360
+ fill: var(--wfadaptor-base);
361
+ fill-opacity:1;
362
+ stroke:none;
363
+ font-family:Arial;
364
+ }
365
+
349
366
  #arrow {
350
367
  stroke: var(--wfadaptor-base);
351
368
  stroke-width: 2;
@@ -629,9 +629,11 @@ function monitor_instance_state() {// {{{
629
629
  }// }}}
630
630
  function monitor_instance_transformation() {// {{{
631
631
  var url = $('body').attr('current-instance');
632
+ console.log('hallo');
633
+ console.log(url);
632
634
  $.ajax({
633
635
  type: "GET",
634
- url: url + "/properties/attributes/modeltype",
636
+ url: url + "/properties/attributes/modeltype/",
635
637
  success: function(res){
636
638
  $("#currentmodel").text(res);
637
639
  },
@@ -774,7 +776,7 @@ function start_instance() {// {{{
774
776
  var url = $('body').attr('current-instance');
775
777
  $.ajax({
776
778
  type: "PUT",
777
- url: url + "/properties/state",
779
+ url: url + "/properties/state/",
778
780
  data: ({value: "running"}),
779
781
  error: report_failure
780
782
  });
@@ -783,7 +785,7 @@ function replay_instance() {// {{{
783
785
  var url = $('body').attr('current-instance');
784
786
  $.ajax({
785
787
  type: "PUT",
786
- url: url + "/properties/state",
788
+ url: url + "/properties/state/",
787
789
  data: ({value: "replaying"}),
788
790
  error: report_failure
789
791
  });
@@ -793,7 +795,7 @@ function aba_instance() {// {{{
793
795
  var url = $('body').attr('current-instance');
794
796
  $.ajax({
795
797
  type: "PUT",
796
- url: url + "/properties/state",
798
+ url: url + "/properties/state/",
797
799
  data: ({value: "abandoned"}),
798
800
  error: report_failure
799
801
  });
@@ -802,7 +804,7 @@ function stop_instance() {// {{{
802
804
  var url = $('body').attr('current-instance');
803
805
  $.ajax({
804
806
  type: "PUT",
805
- url: url + "/properties/state",
807
+ url: url + "/properties/state/",
806
808
  data: ({value: "stopping"}),
807
809
  error: report_failure
808
810
  });
@@ -838,7 +840,6 @@ function get_testset(deferred) {// {{{
838
840
  $('testset > dsl',testset).remove();
839
841
  $('testset > dslx',testset).remove();
840
842
  $('testset > attributes > uuid',testset).remove();
841
- $('testset > attributes > theme',testset).remove();
842
843
  testset.append($X('<transformation xmlns="http://cpee.org/ns/properties/2.0"><description type="copy"/><dataelements type="none"/><endpoints type="none"/></transformation>'));
843
844
  var name = $('testset > attributes > info',testset).text();
844
845
  $('[xmlns]',testset).each((idx,ele) => {
@@ -952,7 +953,7 @@ async function set_testset(testset,exec) {// {{{
952
953
  success: function(res){
953
954
  $.ajax({
954
955
  type: "PUT",
955
- url: url + "/properties/state",
956
+ url: url + "/properties/state/",
956
957
  data: ({value: res}),
957
958
  error: report_failure,
958
959
  success: function(res){
@@ -1054,7 +1055,7 @@ function load_modeltype() {// {{{
1054
1055
  success: function(res){
1055
1056
  $.ajax({
1056
1057
  type: "PUT",
1057
- url: url + "/properties/attributes/modeltype",
1058
+ url: url + "/properties/attributes/modeltype/",
1058
1059
  data: ({value: name}),
1059
1060
  success: function(){
1060
1061
  set_testset(res,false);
Binary file
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0"?>
2
+ <testset>
3
+ <transformation>
4
+ <description type='copy'/>
5
+ <dataelements type='none'/>
6
+ <endpoints type='none'/>
7
+ </transformation>
8
+ </testset>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0"?>
2
+ <testset>
3
+ <transformation>
4
+ <description type='rest'>http://localhost:9295/bpmn2/</description>
5
+ <dataelements type='rest'>http://localhost:9295/bpmn2/</dataelements>
6
+ <endpoints type='rest'>http://localhost:9295/bpmn2/</endpoints>
7
+ </transformation>
8
+ </testset>
@@ -0,0 +1,13 @@
1
+ <testsets>
2
+ <testset>UR-VUE 2020</testset>
3
+ <testset>UR-VUE 2020 Solution View</testset>
4
+ <testset>UR-VUE 2020 Solution Baseline</testset>
5
+ <testset>UR-VUE 2020 Solution NN</testset>
6
+ <testset>Coopis 2010</testset>
7
+ <testset>IUPC arXiv:1104.3609 P34 1</testset>
8
+ <testset>IUPC arXiv:1104.3609 P34 2</testset>
9
+ <testset>IUPC arXiv:1104.3609 P34 3</testset>
10
+ <testset>Worklist</testset>
11
+ <testset>Track Test</testset>
12
+ <testset>Track Test Local</testset>
13
+ </testsets>
@@ -0,0 +1,4 @@
1
+ <transformations>
2
+ <transformation>CPEE</transformation>
3
+ <transformation>Signavio</transformation>
4
+ </transformations>
@@ -8,7 +8,8 @@
8
8
  <value id="sensor">Read From Sensor</value>
9
9
  <value id="human">Human Task</value>
10
10
  <value id="subprocess">Subprocess</value>
11
- <value id="robot">Robot</value>
11
+ <value id="robot">Robot Task</value>
12
+ <value id="robot_subprocess">Robot Subprocess</value>
12
13
  <value id="plc">PLC</value>
13
14
  <value id="send">Send Message</value>
14
15
  <value id="receive">Receive Message</value>
@@ -8,7 +8,8 @@
8
8
  <value id="sensor">Read From Sensor</value>
9
9
  <value id="human">Human Task</value>
10
10
  <value id="subprocess">Subprocess</value>
11
- <value id="robot">Robot</value>
11
+ <value id="robot">Robot Task</value>
12
+ <value id="robot_subprocess">Robot Subprocess</value>
12
13
  <value id="plc">PLC</value>
13
14
  <value id="send">Send Message</value>
14
15
  <value id="receive">Receive Message</value>
@@ -241,7 +241,7 @@ function WFAdaptorManifestation(adaptor) {
241
241
  'label': function(node){
242
242
  var ret;
243
243
  if ($('> url',$(node).children('parameters').children('arguments')).length > 0) {
244
- ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') + ' <a target="blank_" href="' + $('> url',$(node).children('parameters').children('arguments')).text() + '"></a>' } ];
244
+ ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') + ' <a target="_blank" href="' + $('> url',$(node).children('parameters').children('arguments')).text() + '"></a>' } ];
245
245
  } else {
246
246
  ret = [ { column: 'Label', value: $('> label',$(node).children('parameters')).text().replace(/^['"]/,'').replace(/['"]$/,'') } ];
247
247
  }
@@ -1,13 +1,13 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "cpee"
3
- s.version = "2.0.18"
3
+ s.version = "2.0.23"
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/**/*}'] + %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/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'
@@ -20,6 +20,7 @@ require 'riddl/client'
20
20
  require_relative 'value_helper'
21
21
  require_relative 'attributes_helper'
22
22
  require_relative 'message'
23
+ require_relative 'redis'
23
24
 
24
25
  require 'ostruct'
25
26
  class ParaStruct < OpenStruct
@@ -34,7 +35,9 @@ module CPEE
34
35
 
35
36
  class Controller
36
37
  def initialize(id,dir,opts)
37
- @redis = Redis.new(path: opts[:redis_path], db: opts[:redis_db])
38
+ CPEE::redis_connect(opts)
39
+
40
+ @redis = opts[:redis]
38
41
  @votes = []
39
42
 
40
43
  @id = id
@@ -134,7 +137,7 @@ module CPEE
134
137
 
135
138
  if votes.length > 0
136
139
  @votes += votes
137
- psredis = Redis.new(path: @opts[:redis_path], db: @opts[:redis_db])
140
+ psredis = @opts[:redis_dyn].call
138
141
  collect = []
139
142
  psredis.subscribe(votes.map{|e| ['vote-response:' + e.to_s, 'vote-end:' + e.to_s] }.flatten) do |on|
140
143
  on.message do |what, message|
@@ -158,7 +161,7 @@ module CPEE
158
161
  def callback(hw,key,content)
159
162
  CPEE::Message::send(:callback,'activity/content',base,@id,uuid,info,content.merge(:key => key),@redis)
160
163
 
161
- psredis = Redis.new(path: @opts[:redis_path], db: @opts[:redis_db])
164
+ psredis = @opts[:redis_dyn].call
162
165
  response = nil
163
166
  Thread.new do
164
167
  psredis.subscribe('callback-response:' + key, 'callback-end:' + key) do |on|
@@ -16,6 +16,7 @@ require 'fileutils'
16
16
  require 'redis'
17
17
  require 'riddl/server'
18
18
  require 'riddl/client'
19
+ require_relative 'redis'
19
20
  require_relative 'message'
20
21
  require_relative 'persistence'
21
22
  require_relative 'statemachine'
@@ -70,12 +71,22 @@ module CPEE
70
71
  opts[:watchdog_start_off] ||= false
71
72
  opts[:backend_instance] ||= 'instance.rb'
72
73
  opts[:infinite_loop_stop] ||= 10000
73
- opts[:redis_path] ||= '/tmp/redis.sock'
74
- opts[:redis_db] ||= 3
75
- opts[:sse_keepalive_frequency] ||= 10
76
74
 
75
+ ### set redis_cmd to nil if you want to do global
76
+ ### at least redis_path or redis_url and redis_db have to be set if you do global
77
+ opts[:redis_path] ||= 'redis.sock' # use e.g. /tmp/redis.sock for global stuff. Look it up in your redis config
78
+ opts[:redis_db] ||= 0
79
+ ### optional redis stuff
80
+ opts[:redis_url] ||= nil
81
+ opts[:redis_cmd] ||= 'redis-server --port 0 --unixsocket #redis_path# --unixsocketperm 600 --pidfile #redis_pid# --dir #redis_db_dir# --dbfilename #redis_db_name# --databases 1 --save 900 1 --save 300 10 --save 60 10000 --rdbcompression yes --daemonize yes'
82
+ opts[:redis_pid] ||= 'redis.pid' # use e.g. /var/run/redis.pid if you do global. Look it up in your redis config
83
+ opts[:redis_db_name] ||= 'redis.rdb' # use e.g. /var/lib/redis.rdb for global stuff. Look it up in your redis config
84
+
85
+ CPEE::redis_connect opts
86
+
87
+ opts[:sse_keepalive_frequency] ||= 10
77
88
  opts[:sse_connections] = {}
78
- opts[:redis] = Redis.new(path: opts[:redis_path], db: opts[:redis_db])
89
+
79
90
  opts[:statemachine] = CPEE::StateMachine.new opts[:states], %w{running simulating replaying finishing stopping abandoned finished} do |id|
80
91
  opts[:redis].get("instance:#{id}/state")
81
92
  end
@@ -90,9 +101,9 @@ module CPEE
90
101
 
91
102
  Proc.new do
92
103
  parallel do
93
- CPEE::watch_services(opts[:watchdog_start_off])
104
+ CPEE::watch_services(opts[:watchdog_start_off],opts[:redis_url],File.join(opts[:basepath],opts[:redis_path]),opts[:redis_db])
94
105
  EM.add_periodic_timer(opts[:watchdog_frequency]) do ### start services
95
- CPEE::watch_services(opts[:watchdog_start_off])
106
+ CPEE::watch_services(opts[:watchdog_start_off],opts[:redis_url],File.join(opts[:basepath],opts[:redis_path]),opts[:redis_db])
96
107
  end
97
108
  EM.defer do ### catch all sse connections
98
109
  CPEE::Notifications::sse_distributor(opts)
@@ -132,14 +143,18 @@ module CPEE
132
143
  end
133
144
  end
134
145
 
135
- def self::watch_services(watchdog_start_off)
146
+ def self::watch_services(watchdog_start_off,url,path,db)
136
147
  return if watchdog_start_off
137
148
  EM.defer do
138
149
  Dir[File.join(__dir__,'..','..','server','routing','*.rb')].each do |s|
139
150
  s = s.sub(/\.rb$/,'')
140
151
  pid = (File.read(s + '.pid').to_i rescue nil)
141
152
  if (pid.nil? || !(Process.kill(0, pid) rescue false)) && !File.exist?(s + '.lock')
142
- system "#{s}.rb restart 1>/dev/null 2>&1"
153
+ if url.nil?
154
+ system "#{s}.rb -p \"#{path}\" -d #{db} restart 1>/dev/null 2>&1"
155
+ else
156
+ system "#{s}.rb -u \"#{url}\" -d #{db} restart 1>/dev/null 2>&1"
157
+ end
143
158
  puts "➡ Service #{File.basename(s,'.rb')} started ..."
144
159
  end
145
160
  end
@@ -165,7 +165,7 @@ module CPEE
165
165
  end #}}}
166
166
 
167
167
  def self::sse_distributor(opts) #{{{
168
- conn = Redis.new(path: opts[:redis_path], db: opts[:redis_db])
168
+ conn = opts[:redis_dyn].call
169
169
  conn.psubscribe('forward:*','event:state/change') do |on|
170
170
  on.pmessage do |pat, what, message|
171
171
  if pat == 'forward:*'
@@ -30,7 +30,8 @@ module CPEE
30
30
  YAML::dump({
31
31
  :host => opts[:host],
32
32
  :url => opts[:url],
33
- :redis_path => opts[:redis_path],
33
+ :redis_url => opts[:redis_url],
34
+ :redis_path => File.join(opts[:basepath],opts[:redis_path]),
34
35
  :redis_db => opts[:redis_db],
35
36
  :global_handlerwrappers => opts[:global_handlerwrappers],
36
37
  :handlerwrappers => opts[:handlerwrappers]
@@ -0,0 +1,57 @@
1
+ # This file is part of CPEE.
2
+ #
3
+ # CPEE is free software: you can redistribute it and/or modify it under the terms
4
+ # of the GNU General Public License as published by the Free Software Foundation,
5
+ # either version 3 of the License, or (at your option) any later version.
6
+ #
7
+ # CPEE is distributed in the hope that it will be useful, but WITHOUT ANY
8
+ # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
9
+ # PARTICULAR PURPOSE. See the GNU General Public License for more details.
10
+ #
11
+ # You should have received a copy of the GNU General Public License along with
12
+ # CPEE (file COPYING in the main directory). If not, see
13
+ # <http://www.gnu.org/licenses/>.
14
+
15
+ require 'redis'
16
+
17
+ module CPEE
18
+ def self::redis_connect(opts)
19
+ if opts[:redis_cmd].nil?
20
+ begin
21
+ if opts[:redis_path]
22
+ opts[:redis_dyn] = Proc.new { Redis.new(path: opts[:redis_path], db: opts[:redis_db]) }
23
+ elsif opts[:redis_url]
24
+ opts[:redis_dyn] = Proc.new { Redis.new(url: opts[:redis_url], db: opts[:redis_db]) }
25
+ else
26
+ raise
27
+ end
28
+ opts[:redis] = opts[:redis_dyn].call
29
+ opts[:redis].dbsize
30
+ rescue
31
+ puts 'can not connect to redis. check if it is running and cpee is configured correctly ...'
32
+ exit
33
+ end
34
+ else # we always assume file socket if redis is startet locally
35
+ opts[:redis_dyn] = Proc.new { Redis.new(path: File.join(opts[:basepath],opts[:redis_path]), db: opts[:redis_db].to_i) }
36
+ begin
37
+ opts[:redis] = opts[:redis_dyn].call
38
+ opts[:redis].dbsize
39
+ rescue
40
+ rcmd = opts[:redis_cmd]
41
+ rcmd.gsub! /#redis_path#/, File.join(opts[:basepath],opts[:redis_path])
42
+ rcmd.gsub! /#redis_db_dir#/, opts[:basepath]
43
+ rcmd.gsub! /#redis_db_name#/, opts[:redis_db_name]
44
+ rcmd.gsub! /#redis_pid#/, File.join(opts[:basepath],opts[:redis_pid])
45
+ res = system rcmd
46
+ if res
47
+ puts 'starting redis ... it will keep running, just to let you know ...'
48
+ sleep 1
49
+ retry
50
+ else
51
+ puts 'can not start redis. check if cpee is configured correctly ...'
52
+ exit
53
+ end
54
+ end
55
+ end
56
+ end
57
+ end
@@ -109,7 +109,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
109
109
 
110
110
  client = Riddl::Client.new(tendpoint)
111
111
 
112
- @controller.callback(self,callback,:'activity_uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
112
+ @controller.callback(self,callback,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
113
113
  @handler_passthrough = callback
114
114
 
115
115
  status, result, headers = client.request type => params
@@ -123,7 +123,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
123
123
  @controller.notify("task/instantiation", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :received => CPEE::ValueHelper.parse(headers['CPEE_INSTANTIATION']))
124
124
  end
125
125
  if headers['CPEE_EVENT']
126
- @controller.notify("task/#{headers['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity_uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint)
126
+ @controller.notify("task/#{headers['CPEE_EVENT'].gsub(/[^\w_-]/,'')}", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint)
127
127
  end
128
128
  if headers['CPEE_CALLBACK'] && headers['CPEE_CALLBACK'] == 'true' && result.any?
129
129
  headers['CPEE_UPDATE'] = true
@@ -142,11 +142,11 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
142
142
  @sensors = parameters.dig(:stream,:sensors)
143
143
  @aggregators = parameters.dig(:stream,:aggregators)
144
144
  @costs = parameters.dig(:stream,:costs)
145
- @controller.notify("activity/calling", :'activity_uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
145
+ @controller.notify("activity/calling", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :passthrough => passthrough, :endpoint => @handler_endpoint, :parameters => parameters)
146
146
  if passthrough.to_s.empty?
147
147
  proto_curl parameters
148
148
  else
149
- @controller.callback(self,passthrough,:'activity_uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
149
+ @controller.callback(self,passthrough,:'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position)
150
150
  @handler_passthrough = passthrough
151
151
  end
152
152
  end # }}}
@@ -175,33 +175,33 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
175
175
  end # }}}
176
176
 
177
177
  def inform_activity_done # {{{
178
- @controller.notify("activity/done", :'activity_uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
178
+ @controller.notify("activity/done", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
179
179
  end # }}}
180
180
  def inform_activity_manipulate # {{{
181
- @controller.notify("activity/manipulating", :'activity_uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
181
+ @controller.notify("activity/manipulating", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position)
182
182
  end # }}}
183
183
  def inform_activity_failed(err) # {{{
184
184
  puts err.message
185
185
  puts err.backtrace
186
- @controller.notify("activity/failed", :'activity_uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
186
+ @controller.notify("activity/failed", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :message => err.message, :line => err.backtrace[0].match(/(.*?):(\d+):/)[2], :where => err.backtrace[0].match(/(.*?):(\d+):/)[1])
187
187
  end # }}}
188
188
  def inform_manipulate_change(status,changed_dataelements,changed_endpoints,dataelements,endpoints) # {{{
189
189
  unless status.nil?
190
- @controller.notify("status/change", :'activity_uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :id => status.id, :message => status.message)
190
+ @controller.notify("status/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :id => status.id, :message => status.message)
191
191
  end
192
192
  unless changed_dataelements.nil?
193
- @controller.notify("dataelements/change", :'activity_uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements)
193
+ @controller.notify("dataelements/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_dataelements, :values => dataelements)
194
194
  end
195
195
  unless changed_endpoints.nil?
196
- @controller.notify("endpoints/change", :'activity_uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints)
196
+ @controller.notify("endpoints/change", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :label => @label, :activity => @handler_position, :changed => changed_endpoints, :values => endpoints)
197
197
  end
198
198
  end # }}}
199
199
 
200
200
  def vote_sync_after # {{{
201
- @controller.vote("activity/syncing_after", :'activity_uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label)
201
+ @controller.vote("activity/syncing_after", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label)
202
202
  end # }}}
203
203
  def vote_sync_before(parameters=nil) # {{{
204
- @controller.vote("activity/syncing_before", :'activity_uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters)
204
+ @controller.vote("activity/syncing_before", :'activity-uuid' => @handler_activity_uuid, :endpoint => @handler_endpoint, :activity => @handler_position, :label => @label, :parameters => parameters)
205
205
  end # }}}
206
206
 
207
207
  def simplify_result(result)
@@ -260,13 +260,13 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
260
260
  end
261
261
 
262
262
  def callback(result=nil,options={})
263
- @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)
263
+ @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
264
  result = simplify_result(result)
265
265
  @handler_returnValue = result
266
266
  @handler_returnOptions = options
267
267
  if options['CPEE_UPDATE']
268
268
  if options['CPEE_UPDATE_STATUS']
269
- @controller.notify("activity/status", :'activity_uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'])
269
+ @controller.notify("activity/status", :'activity-uuid' => @handler_activity_uuid, :label => @label, :activity => @handler_position, :endpoint => @handler_endpoint, :status => options['CPEE_UPDATE_STATUS'])
270
270
  end
271
271
  @handler_continue.continue WEEL::Signal::Again
272
272
  else
@@ -290,7 +290,7 @@ class DefaultHandlerWrapper < WEEL::HandlerWrapperBase
290
290
  pp "#{type} - #{nesting} - #{tid} - #{parent} - #{parameters.inspect}"
291
291
 
292
292
  @controller.vote("simulating/step",
293
- :'activity_uuid' => @handler_activity_uuid,
293
+ :'activity-uuid' => @handler_activity_uuid,
294
294
  :label => @label,
295
295
  :activity => tid,
296
296
  :endpoint => @handler_endpoint,