cpee 2.1.92 → 2.1.95

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 (296) hide show
  1. checksums.yaml +4 -4
  2. data/cockpit/css/{resources-label.css → extended_columns-label.css} +4 -0
  3. data/cockpit/css/ui.css +6 -5
  4. data/cockpit/css/wfadaptor.css +27 -105
  5. data/cockpit/david.html +292 -0
  6. data/cockpit/edit.html +16 -7
  7. data/cockpit/graph.html +3 -3
  8. data/cockpit/index.html +15 -7
  9. data/cockpit/js/details.js +7 -0
  10. data/cockpit/js/extended_columns.js +233 -0
  11. data/cockpit/js/instance.js +45 -167
  12. data/cockpit/js/wfadaptor.js +138 -94
  13. data/cockpit/llm.html +3 -3
  14. data/cockpit/llm_alternative.html +3 -3
  15. data/cockpit/model.html +2 -2
  16. data/cockpit/only_llm.html +19 -12
  17. data/cockpit/templates/Coopis 2010.xml +11 -4
  18. data/cockpit/templates/Frames.xml +210 -55
  19. data/cockpit/templates/Track Test.xml +1 -1
  20. data/cockpit/themes/base.js +16 -13
  21. data/cockpit/themes/control/rngs/call.rng +9 -0
  22. data/cockpit/themes/control/rngs/callmanipulate.rng +10 -1
  23. data/cockpit/themes/control/rngs/loop.rng +7 -0
  24. data/cockpit/themes/control/rngs/manipulate.rng +8 -0
  25. data/cockpit/themes/control/rngs/start.rng +1 -0
  26. data/cockpit/themes/control/symbols/arrow.svg +1 -1
  27. data/cockpit/themes/control/symbols/callmanipulate.svg +1 -1
  28. data/cockpit/themes/control/symbols/callmanipulate_sensor.svg +2 -1
  29. data/cockpit/themes/control/symbols/callmanipulate_sensor_signal.svg +1 -1
  30. data/cockpit/themes/control/symbols/callmanipulate_signal.svg +1 -1
  31. data/cockpit/themes/control/symbols/critical.svg +3 -2
  32. data/cockpit/themes/control/symbols/delete.svg +2 -2
  33. data/cockpit/themes/control/symbols/end.svg +1 -1
  34. data/cockpit/themes/control/symbols/manipulate.svg +2 -2
  35. data/cockpit/themes/control/symbols/parallel.svg +2 -1
  36. data/cockpit/themes/control/symbols/scripts.svg +1 -1
  37. data/cockpit/themes/dataflow/rngs/call.rng +9 -0
  38. data/cockpit/themes/dataflow/rngs/callmanipulate.rng +10 -1
  39. data/cockpit/themes/dataflow/rngs/loop.rng +7 -0
  40. data/cockpit/themes/dataflow/rngs/manipulate.rng +8 -0
  41. data/cockpit/themes/dataflow/rngs/start.rng +1 -0
  42. data/cockpit/themes/dataflow/symbols/arrow.svg +1 -1
  43. data/cockpit/themes/dataflow/symbols/callmanipulate.svg +1 -1
  44. data/cockpit/themes/dataflow/symbols/callmanipulate_sensor.svg +2 -1
  45. data/cockpit/themes/dataflow/symbols/callmanipulate_sensor_signal.svg +1 -1
  46. data/cockpit/themes/dataflow/symbols/callmanipulate_signal.svg +1 -1
  47. data/cockpit/themes/dataflow/symbols/critical.svg +3 -2
  48. data/cockpit/themes/dataflow/symbols/delete.svg +2 -2
  49. data/cockpit/themes/dataflow/symbols/end.svg +1 -1
  50. data/cockpit/themes/dataflow/symbols/manipulate.svg +2 -2
  51. data/cockpit/themes/dataflow/symbols/parallel.svg +2 -1
  52. data/cockpit/themes/dataflow/symbols/scripts.svg +1 -1
  53. data/cockpit/themes/dataflow/theme.js +8 -8
  54. data/cockpit/themes/default/rngs/call.rng +9 -0
  55. data/cockpit/themes/default/rngs/callmanipulate.rng +10 -1
  56. data/cockpit/themes/default/rngs/loop.rng +7 -0
  57. data/cockpit/themes/default/rngs/manipulate.rng +8 -0
  58. data/cockpit/themes/default/rngs/start.rng +1 -0
  59. data/cockpit/themes/default/symbols/arrow.svg +1 -1
  60. data/cockpit/themes/default/symbols/callmanipulate.svg +1 -1
  61. data/cockpit/themes/default/symbols/callmanipulate_sensor.svg +2 -1
  62. data/cockpit/themes/default/symbols/callmanipulate_sensor_signal.svg +1 -1
  63. data/cockpit/themes/default/symbols/callmanipulate_signal.svg +1 -1
  64. data/cockpit/themes/default/symbols/critical.svg +3 -2
  65. data/cockpit/themes/default/symbols/delete.svg +2 -2
  66. data/cockpit/themes/default/symbols/end.svg +1 -1
  67. data/cockpit/themes/default/symbols/manipulate.svg +2 -2
  68. data/cockpit/themes/default/symbols/parallel.svg +2 -1
  69. data/cockpit/themes/default/symbols/scripts.svg +1 -1
  70. data/cockpit/themes/extended/rngs/call.rng +9 -0
  71. data/cockpit/themes/extended/rngs/callmanipulate.rng +10 -1
  72. data/cockpit/themes/extended/rngs/loop.rng +7 -0
  73. data/cockpit/themes/extended/rngs/manipulate.rng +8 -0
  74. data/cockpit/themes/extended/rngs/start.rng +1 -0
  75. data/cockpit/themes/extended/symbols/arrow.svg +1 -1
  76. data/cockpit/themes/extended/symbols/callmanipulate.svg +1 -1
  77. data/cockpit/themes/extended/symbols/callmanipulate_sensor.svg +2 -1
  78. data/cockpit/themes/extended/symbols/callmanipulate_sensor_signal.svg +1 -1
  79. data/cockpit/themes/extended/symbols/callmanipulate_signal.svg +1 -1
  80. data/cockpit/themes/extended/symbols/critical.svg +3 -2
  81. data/cockpit/themes/extended/symbols/delete.svg +2 -2
  82. data/cockpit/themes/extended/symbols/end.svg +1 -1
  83. data/cockpit/themes/extended/symbols/manipulate.svg +2 -2
  84. data/cockpit/themes/extended/symbols/parallel.svg +2 -1
  85. data/cockpit/themes/extended/symbols/scripts.svg +1 -1
  86. data/cockpit/themes/felix/symbols/arrow.svg +1 -1
  87. data/cockpit/themes/felix/symbols/callmanipulate.svg +1 -1
  88. data/cockpit/themes/felix/symbols/callmanipulate_sensor.svg +2 -1
  89. data/cockpit/themes/felix/symbols/callmanipulate_sensor_signal.svg +1 -1
  90. data/cockpit/themes/felix/symbols/callmanipulate_signal.svg +1 -1
  91. data/cockpit/themes/felix/symbols/critical.svg +3 -2
  92. data/cockpit/themes/felix/symbols/delete.svg +2 -2
  93. data/cockpit/themes/felix/symbols/end.svg +1 -1
  94. data/cockpit/themes/felix/symbols/manipulate.svg +2 -2
  95. data/cockpit/themes/felix/symbols/parallel.svg +2 -1
  96. data/cockpit/themes/felix/symbols/scripts.svg +1 -1
  97. data/cockpit/themes/model/symbols/arrow.svg +1 -1
  98. data/cockpit/themes/model/symbols/callmanipulate.svg +1 -1
  99. data/cockpit/themes/model/symbols/callmanipulate_sensor.svg +2 -1
  100. data/cockpit/themes/model/symbols/callmanipulate_sensor_signal.svg +1 -1
  101. data/cockpit/themes/model/symbols/callmanipulate_signal.svg +1 -1
  102. data/cockpit/themes/model/symbols/critical.svg +3 -2
  103. data/cockpit/themes/model/symbols/delete.svg +2 -2
  104. data/cockpit/themes/model/symbols/end.svg +1 -1
  105. data/cockpit/themes/model/symbols/manipulate.svg +2 -2
  106. data/cockpit/themes/model/symbols/parallel.svg +2 -1
  107. data/cockpit/themes/model/symbols/scripts.svg +1 -1
  108. data/cockpit/themes/packed/rngs/call.rng +9 -0
  109. data/cockpit/themes/packed/rngs/callmanipulate.rng +10 -1
  110. data/cockpit/themes/packed/rngs/loop.rng +7 -0
  111. data/cockpit/themes/packed/rngs/manipulate.rng +8 -0
  112. data/cockpit/themes/packed/rngs/start.rng +1 -0
  113. data/cockpit/themes/packed/symbols/arrow.svg +1 -1
  114. data/cockpit/themes/packed/symbols/callmanipulate.svg +1 -1
  115. data/cockpit/themes/packed/symbols/callmanipulate_sensor.svg +2 -1
  116. data/cockpit/themes/packed/symbols/callmanipulate_sensor_signal.svg +1 -1
  117. data/cockpit/themes/packed/symbols/callmanipulate_signal.svg +1 -1
  118. data/cockpit/themes/packed/symbols/critical.svg +3 -2
  119. data/cockpit/themes/packed/symbols/delete.svg +2 -2
  120. data/cockpit/themes/packed/symbols/end.svg +1 -1
  121. data/cockpit/themes/packed/symbols/manipulate.svg +2 -2
  122. data/cockpit/themes/packed/symbols/parallel.svg +2 -1
  123. data/cockpit/themes/packed/symbols/scripts.svg +1 -1
  124. data/cockpit/themes/preset/rngs/call.rng +9 -0
  125. data/cockpit/themes/preset/rngs/callmanipulate.rng +10 -1
  126. data/cockpit/themes/preset/rngs/loop.rng +7 -0
  127. data/cockpit/themes/preset/rngs/manipulate.rng +8 -0
  128. data/cockpit/themes/preset/rngs/start.rng +1 -0
  129. data/cockpit/themes/preset/symbols/arrow.svg +1 -1
  130. data/cockpit/themes/preset/symbols/callmanipulate.svg +1 -1
  131. data/cockpit/themes/preset/symbols/callmanipulate_sensor.svg +2 -1
  132. data/cockpit/themes/preset/symbols/callmanipulate_sensor_signal.svg +1 -1
  133. data/cockpit/themes/preset/symbols/callmanipulate_signal.svg +1 -1
  134. data/cockpit/themes/preset/symbols/critical.svg +3 -2
  135. data/cockpit/themes/preset/symbols/delete.svg +2 -2
  136. data/cockpit/themes/preset/symbols/end.svg +1 -1
  137. data/cockpit/themes/preset/symbols/manipulate.svg +2 -2
  138. data/cockpit/themes/preset/symbols/parallel.svg +2 -1
  139. data/cockpit/themes/preset/symbols/scripts.svg +1 -1
  140. data/cockpit/themes/presetaltid/rngs/alternative.rng +25 -0
  141. data/cockpit/themes/presetaltid/rngs/call.rng +251 -0
  142. data/cockpit/themes/presetaltid/rngs/callmanipulate.rng +283 -0
  143. data/cockpit/themes/presetaltid/rngs/choose.rng +17 -0
  144. data/cockpit/themes/presetaltid/rngs/closed_loop.rng +62 -0
  145. data/cockpit/themes/presetaltid/rngs/closed_loop_cancel.rng +5 -0
  146. data/cockpit/themes/presetaltid/rngs/closed_loop_control.rng +31 -0
  147. data/cockpit/themes/presetaltid/rngs/closed_loop_measuring.rng +12 -0
  148. data/cockpit/themes/presetaltid/rngs/critical.rng +5 -0
  149. data/cockpit/themes/presetaltid/rngs/escape.rng +1 -0
  150. data/cockpit/themes/presetaltid/rngs/group.rng +3 -0
  151. data/cockpit/themes/presetaltid/rngs/loop.rng +29 -0
  152. data/cockpit/themes/presetaltid/rngs/manipulate.rng +30 -0
  153. data/cockpit/themes/presetaltid/rngs/otherwise.rng +22 -0
  154. data/cockpit/themes/presetaltid/rngs/parallel.rng +27 -0
  155. data/cockpit/themes/presetaltid/rngs/parallel_branch.rng +2 -0
  156. data/cockpit/themes/presetaltid/rngs/scripts.rng +23 -0
  157. data/cockpit/themes/presetaltid/rngs/start.rng +145 -0
  158. data/cockpit/themes/presetaltid/rngs/stop.rng +5 -0
  159. data/cockpit/themes/presetaltid/rngs/terminate.rng +1 -0
  160. data/cockpit/themes/presetaltid/rngs/wait_for_signal.rng +8 -0
  161. data/cockpit/themes/presetaltid/symbols/alternative.svg +15 -0
  162. data/cockpit/themes/presetaltid/symbols/arrow.svg +3 -0
  163. data/cockpit/themes/presetaltid/symbols/call.svg +19 -0
  164. data/cockpit/themes/presetaltid/symbols/call_sensor.svg +23 -0
  165. data/cockpit/themes/presetaltid/symbols/callmanipulate.svg +23 -0
  166. data/cockpit/themes/presetaltid/symbols/callmanipulate_sensor.svg +26 -0
  167. data/cockpit/themes/presetaltid/symbols/callmanipulate_sensor_signal.svg +32 -0
  168. data/cockpit/themes/presetaltid/symbols/callmanipulate_signal.svg +29 -0
  169. data/cockpit/themes/presetaltid/symbols/choose.svg +15 -0
  170. data/cockpit/themes/presetaltid/symbols/choose_exclusive.svg +15 -0
  171. data/cockpit/themes/presetaltid/symbols/choose_exclusive_finish.svg +5 -0
  172. data/cockpit/themes/presetaltid/symbols/choose_inclusive.svg +13 -0
  173. data/cockpit/themes/presetaltid/symbols/choose_inclusive_finish.svg +4 -0
  174. data/cockpit/themes/presetaltid/symbols/closed_loop.svg +5 -0
  175. data/cockpit/themes/presetaltid/symbols/closed_loop_cancel.svg +5 -0
  176. data/cockpit/themes/presetaltid/symbols/closed_loop_control.svg +5 -0
  177. data/cockpit/themes/presetaltid/symbols/closed_loop_measuring.svg +6 -0
  178. data/cockpit/themes/presetaltid/symbols/complex.svg +8 -0
  179. data/cockpit/themes/presetaltid/symbols/critical.svg +5 -0
  180. data/cockpit/themes/presetaltid/symbols/delete.svg +4 -0
  181. data/cockpit/themes/presetaltid/symbols/end.svg +3 -0
  182. data/cockpit/themes/presetaltid/symbols/escape.svg +5 -0
  183. data/cockpit/themes/presetaltid/symbols/event_end.svg +3 -0
  184. data/cockpit/themes/presetaltid/symbols/loop.svg +15 -0
  185. data/cockpit/themes/presetaltid/symbols/loop_end.svg +15 -0
  186. data/cockpit/themes/presetaltid/symbols/manipulate.svg +19 -0
  187. data/cockpit/themes/presetaltid/symbols/otherwise.svg +5 -0
  188. data/cockpit/themes/presetaltid/symbols/parallel.svg +6 -0
  189. data/cockpit/themes/presetaltid/symbols/parallel_branch.svg +5 -0
  190. data/cockpit/themes/presetaltid/symbols/parallel_branch_event.svg +14 -0
  191. data/cockpit/themes/presetaltid/symbols/parallel_branch_normal.svg +5 -0
  192. data/cockpit/themes/presetaltid/symbols/parallel_eventbased_exclusive.svg +9 -0
  193. data/cockpit/themes/presetaltid/symbols/parallel_eventbased_parallel.svg +8 -0
  194. data/cockpit/themes/presetaltid/symbols/scripts.svg +4 -0
  195. data/cockpit/themes/presetaltid/symbols/start.svg +3 -0
  196. data/cockpit/themes/presetaltid/symbols/start_event.svg +5 -0
  197. data/cockpit/themes/presetaltid/symbols/stop.svg +5 -0
  198. data/cockpit/themes/presetaltid/symbols/terminate.svg +4 -0
  199. data/cockpit/themes/presetaltid/symbols/wait_for_signal.svg +21 -0
  200. data/cockpit/themes/presetaltid/theme.js +16 -0
  201. data/cockpit/themes/presetid/rngs/alternative.rng +25 -0
  202. data/cockpit/themes/presetid/rngs/call.rng +251 -0
  203. data/cockpit/themes/presetid/rngs/callmanipulate.rng +283 -0
  204. data/cockpit/themes/presetid/rngs/choose.rng +17 -0
  205. data/cockpit/themes/presetid/rngs/closed_loop.rng +62 -0
  206. data/cockpit/themes/presetid/rngs/closed_loop_cancel.rng +5 -0
  207. data/cockpit/themes/presetid/rngs/closed_loop_control.rng +31 -0
  208. data/cockpit/themes/presetid/rngs/closed_loop_measuring.rng +12 -0
  209. data/cockpit/themes/presetid/rngs/critical.rng +5 -0
  210. data/cockpit/themes/presetid/rngs/escape.rng +1 -0
  211. data/cockpit/themes/presetid/rngs/group.rng +3 -0
  212. data/cockpit/themes/presetid/rngs/loop.rng +29 -0
  213. data/cockpit/themes/presetid/rngs/manipulate.rng +30 -0
  214. data/cockpit/themes/presetid/rngs/otherwise.rng +22 -0
  215. data/cockpit/themes/presetid/rngs/parallel.rng +27 -0
  216. data/cockpit/themes/presetid/rngs/parallel_branch.rng +2 -0
  217. data/cockpit/themes/presetid/rngs/scripts.rng +23 -0
  218. data/cockpit/themes/presetid/rngs/start.rng +145 -0
  219. data/cockpit/themes/presetid/rngs/stop.rng +5 -0
  220. data/cockpit/themes/presetid/rngs/terminate.rng +1 -0
  221. data/cockpit/themes/presetid/rngs/wait_for_signal.rng +8 -0
  222. data/cockpit/themes/presetid/symbols/alternative.svg +15 -0
  223. data/cockpit/themes/presetid/symbols/arrow.svg +3 -0
  224. data/cockpit/themes/presetid/symbols/call.svg +19 -0
  225. data/cockpit/themes/presetid/symbols/call_sensor.svg +23 -0
  226. data/cockpit/themes/presetid/symbols/callmanipulate.svg +23 -0
  227. data/cockpit/themes/presetid/symbols/callmanipulate_sensor.svg +26 -0
  228. data/cockpit/themes/presetid/symbols/callmanipulate_sensor_signal.svg +32 -0
  229. data/cockpit/themes/presetid/symbols/callmanipulate_signal.svg +29 -0
  230. data/cockpit/themes/presetid/symbols/choose.svg +15 -0
  231. data/cockpit/themes/presetid/symbols/choose_exclusive.svg +15 -0
  232. data/cockpit/themes/presetid/symbols/choose_exclusive_finish.svg +5 -0
  233. data/cockpit/themes/presetid/symbols/choose_inclusive.svg +13 -0
  234. data/cockpit/themes/presetid/symbols/choose_inclusive_finish.svg +4 -0
  235. data/cockpit/themes/presetid/symbols/closed_loop.svg +5 -0
  236. data/cockpit/themes/presetid/symbols/closed_loop_cancel.svg +5 -0
  237. data/cockpit/themes/presetid/symbols/closed_loop_control.svg +5 -0
  238. data/cockpit/themes/presetid/symbols/closed_loop_measuring.svg +6 -0
  239. data/cockpit/themes/presetid/symbols/complex.svg +8 -0
  240. data/cockpit/themes/presetid/symbols/critical.svg +5 -0
  241. data/cockpit/themes/presetid/symbols/delete.svg +4 -0
  242. data/cockpit/themes/presetid/symbols/end.svg +3 -0
  243. data/cockpit/themes/presetid/symbols/escape.svg +5 -0
  244. data/cockpit/themes/presetid/symbols/event_end.svg +3 -0
  245. data/cockpit/themes/presetid/symbols/loop.svg +15 -0
  246. data/cockpit/themes/presetid/symbols/loop_end.svg +15 -0
  247. data/cockpit/themes/presetid/symbols/manipulate.svg +19 -0
  248. data/cockpit/themes/presetid/symbols/otherwise.svg +5 -0
  249. data/cockpit/themes/presetid/symbols/parallel.svg +6 -0
  250. data/cockpit/themes/presetid/symbols/parallel_branch.svg +5 -0
  251. data/cockpit/themes/presetid/symbols/parallel_branch_event.svg +14 -0
  252. data/cockpit/themes/presetid/symbols/parallel_branch_normal.svg +5 -0
  253. data/cockpit/themes/presetid/symbols/parallel_eventbased_exclusive.svg +9 -0
  254. data/cockpit/themes/presetid/symbols/parallel_eventbased_parallel.svg +8 -0
  255. data/cockpit/themes/presetid/symbols/scripts.svg +4 -0
  256. data/cockpit/themes/presetid/symbols/start.svg +3 -0
  257. data/cockpit/themes/presetid/symbols/start_event.svg +5 -0
  258. data/cockpit/themes/presetid/symbols/stop.svg +5 -0
  259. data/cockpit/themes/presetid/symbols/terminate.svg +4 -0
  260. data/cockpit/themes/presetid/symbols/wait_for_signal.svg +21 -0
  261. data/cockpit/themes/presetid/theme.js +16 -0
  262. data/cockpit/themes/reduced/rngs/call.rng +9 -0
  263. data/cockpit/themes/reduced/rngs/callmanipulate.rng +10 -1
  264. data/cockpit/themes/reduced/rngs/loop.rng +7 -0
  265. data/cockpit/themes/reduced/rngs/manipulate.rng +8 -0
  266. data/cockpit/themes/reduced/rngs/start.rng +1 -0
  267. data/cockpit/themes/reduced/symbols/arrow.svg +1 -1
  268. data/cockpit/themes/reduced/symbols/callmanipulate.svg +1 -1
  269. data/cockpit/themes/reduced/symbols/callmanipulate_sensor.svg +2 -1
  270. data/cockpit/themes/reduced/symbols/callmanipulate_sensor_signal.svg +1 -1
  271. data/cockpit/themes/reduced/symbols/callmanipulate_signal.svg +1 -1
  272. data/cockpit/themes/reduced/symbols/critical.svg +3 -2
  273. data/cockpit/themes/reduced/symbols/delete.svg +2 -2
  274. data/cockpit/themes/reduced/symbols/end.svg +1 -1
  275. data/cockpit/themes/reduced/symbols/manipulate.svg +2 -2
  276. data/cockpit/themes/reduced/symbols/parallel.svg +2 -1
  277. data/cockpit/themes/reduced/symbols/scripts.svg +1 -1
  278. data/cockpit/track.html +3 -3
  279. data/cpee.gemspec +1 -1
  280. data/lib/cpee/implementation.rb +25 -38
  281. data/server/executionhandlers/ruby/connection.rb +11 -3
  282. data/server/routing/end.pid +1 -1
  283. data/server/routing/forward-events-00.pid +1 -1
  284. data/server/routing/forward-events-01.pid +1 -0
  285. data/server/routing/forward-events-02.pid +1 -0
  286. data/server/routing/forward-events-03.pid +1 -0
  287. data/server/routing/forward-events-04.pid +1 -0
  288. data/server/routing/forward-events-05.pid +1 -0
  289. data/server/routing/forward-events-06.pid +1 -0
  290. data/server/routing/forward-votes.pid +1 -1
  291. data/server/routing/persist.pid +1 -1
  292. metadata +133 -6
  293. data/cockpit/js/resources.js +0 -64
  294. data/server/executionhandlers/ruby/ShiftingTestSimple.xml +0 -100
  295. data/server/server.pid +0 -1
  296. /data/cockpit/css/{resources-svg.css → extended_columns-svg.css} +0 -0
data/cockpit/index.html CHANGED
@@ -41,6 +41,8 @@
41
41
  <script type="text/javascript" src="/js_libs/uidash.js"></script>
42
42
  <script type="text/javascript" src="/js_libs/custommenu.js"></script>
43
43
 
44
+ <script type="text/javascript" src="/js_libs/build-bpmn.js"></script>
45
+
44
46
  <link rel="stylesheet" href="/js_libs/custommenu.css" type="text/css"/>
45
47
  <link rel="stylesheet" href="/js_libs/uidash.css" type="text/css"/>
46
48
 
@@ -55,12 +57,12 @@
55
57
  <script type="text/javascript" src="js/instance.js"></script>
56
58
  <script type="text/javascript" src="js/details.js"></script>
57
59
  <script type="text/javascript" src="js/parameters.js"></script>
58
- <script type="text/javascript" src="js/resources.js"></script>
60
+ <script type="text/javascript" src="js/extended_columns.js"></script>
59
61
  <script type="text/javascript" src="js/modifiers.js"></script>
60
62
  <script type="text/javascript" src="themes/base.js"></script>
61
63
  <link rel="stylesheet" href="css/ui.css" type="text/css"/>
62
- <link rel="stylesheet" href="css/resources-label.css" type="text/css"/>
63
- <link rel="stylesheet" href="css/resources-svg.css" type="text/css" data-include-export="true"/>
64
+ <link rel="stylesheet" href="css/extended_columns-label.css" type="text/css"/>
65
+ <link rel="stylesheet" href="css/extended_columns-svg.css" type="text/css" data-include-export="true"/>
64
66
  <link rel="stylesheet" href="/global_ui/uicpee.css" type="text/css"/>
65
67
  <style>
66
68
  /* has to be fucking inline, because firefox and chrome disagree how to handle filter urls */
@@ -176,10 +178,16 @@
176
178
  <button title='a standalone process model is only loadable if the currently loaded testset sucessfully prepared the current instance for the type of model' name="loadmodelfile">load model</button>
177
179
  </div>
178
180
  </div><div class='section'>
179
- <a id="savetestsetfile" href="" download=""></a>
180
- <a id="savesvgfile" href="" download=""></a>
181
- <button title='a testset includes various settings, subscriptions and a model' name="savetestsetfile">save<br>testset</button>
182
- <button title='a testset includes various settings, subscriptions and a model' name="savesvgfile">save svg<br>graph</button>
181
+ <div>
182
+ <a id="savetestsetfile" href="" download=""></a>
183
+ <a id="savesvgfile" href="" download=""></a>
184
+ <button title='a testset includes various settings, subscriptions and a model' name="savetestsetfile">save<br>testset</button>
185
+ <button title='the SVG contains the graphical repesentation of the CPEE tree as you see it on the screen' name="savesvgfile">save svg<br>graph</button>
186
+ </div>
187
+ <div>
188
+ <a id="savebpmnfile" href="" download=""></a>
189
+ <button title='the BPMN includes a graphical representation that can be loaded in Signavio and Camundal' name="savebpmnfile">save BPMN</button>
190
+ </div>
183
191
  </div><div class='section' id='modifiers'>
184
192
  <template id="item">
185
193
  <div>
@@ -72,6 +72,13 @@ function do_main_work(svgid) { //{{{
72
72
  nnew[0].removeAttribute('xmlns');
73
73
  }
74
74
 
75
+ // copy all elements from different namespaces
76
+ [...node[0].attributes].forEach(attr =>{
77
+ if (attr && attr.namespaceURI && attr.namespaceURI != 'http://cpee.org/ns/description/1.0') {
78
+ nnew[0].setAttributeNS(attr.namespaceURI,attr.nodeName,attr.nodeValue);
79
+ }
80
+ });
81
+
75
82
  node.replaceWith(nnew);
76
83
 
77
84
  var ttarget = manifestation.adaptor.illustrator.get_node_by_svg_id(svgid);
@@ -0,0 +1,233 @@
1
+ function show_dataflow_label(x,y,deg,text) {
2
+ const degrees_to_radians = deg => (deg * Math.PI) / 180.0;
3
+
4
+ let clone = $('svg',document.querySelector('#label').content.cloneNode(true));
5
+ $('text',clone).text(text);
6
+ let n = $('body').append(clone);
7
+ let dim = $('text',clone)[0].getBBox();
8
+ let height = $('rect',clone).attr('height');
9
+ let width = dim.width + dim.x;
10
+ let shift = (width + 10) * Math.sin(degrees_to_radians(deg));
11
+ let shift_plus = height * Math.sin(degrees_to_radians(90-deg));
12
+ let neigh = (width + 10) * Math.cos(degrees_to_radians(deg)) + height * Math.cos(degrees_to_radians(90-deg));
13
+
14
+ let top_y = 23 * Math.cos(degrees_to_radians(deg));
15
+ let top_x = 23 * Math.sin(degrees_to_radians(deg));
16
+
17
+ let top = y-shift-top_y;
18
+ if (top < 0) top = 0;
19
+ $(clone).css('left',x-top_x);
20
+ $(clone).css('top',top);
21
+
22
+ $(clone).attr('height',shift + shift_plus + 2);
23
+ $(clone).attr('width',neigh + 2);
24
+ $('g',clone).attr('transform',$('g',clone).attr('transform').replace(/%%1/, shift + 1).replace(/%%2/, deg));
25
+ $('rect',clone).attr('width',width);
26
+ }
27
+
28
+ function show_dataflow_row_label(data) {
29
+ let pos = data.getBoundingClientRect();
30
+ let pos_top = $('#graphgrid').parent()[0].getBoundingClientRect();
31
+ let pos_y;
32
+ let text = $('text',data).text();
33
+ if (pos.y < (pos_top.y + 10)) {
34
+ pos_y = pos_top.y + 10;
35
+ } else {
36
+ pos_y = pos.y;
37
+ }
38
+ show_dataflow_label(pos.x + 12, pos_y, 60, text);
39
+ }
40
+
41
+ function draw_extended_columns(graphrealization,max,labels,dimensions,striped) {
42
+ // labels
43
+ graphrealization.illustrator.svg.container.css('grid-row', '1/span ' + (max.row + 2));
44
+ if (striped == true) {
45
+ if (!graphrealization.illustrator.svg.label_container.hasClass('striped')) {
46
+ graphrealization.illustrator.svg.label_container.addClass('striped');
47
+ }
48
+ } else {
49
+ graphrealization.illustrator.svg.label_container.removeClass('striped');
50
+ }
51
+
52
+ $('.labelsrow, .graphlast').remove();
53
+ let tcolumns = [];
54
+ let tcolumntype = {};
55
+ let tcolumncount = {}
56
+
57
+ const mapPoints = new Map();
58
+ const tcolumnsvgs = {};
59
+ const iconsize = 10;
60
+ const space = 5;
61
+
62
+ for (val of labels) {
63
+ if (val.label != "") {
64
+ for (col of val.label) {
65
+ if (!tcolumns.includes(col.column)) {
66
+ tcolumns.push(col.column);
67
+ tcolumncount[col.column] = 0;
68
+ tcolumnsvgs[col.column] = {};
69
+ }
70
+ if (tcolumntype[col.column] == undefined && col.type != undefined) {
71
+ tcolumntype[col.column] = col.type;
72
+ }
73
+ if (col.value != undefined) {
74
+ let pos = dimensions.height_shift/2 + dimensions.height * (val.row - 1) + (dimensions.height / 2);
75
+ let firstpos = dimensions.height_shift/2 + (dimensions.height / 2);
76
+
77
+ if (col.type == "resource") {
78
+ for (const [k, v] of Object.entries(col.value)) {
79
+ var p = { AR: v };
80
+ if (!mapPoints.has(k)) {
81
+ p.y0 = p.y0 == undefined ? pos : p.y0;
82
+ p.ymax = (p.ymax == undefined) ? p.y0 : p.ymax;
83
+ } else {
84
+ p.y0 = mapPoints.get(k).y0;
85
+ p.ymax = mapPoints.get(k).ymax;
86
+ }
87
+ mapPoints.set(k, p);
88
+ }
89
+
90
+ let tsvg = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-row" element-row="' + (val.row-1) + '"></g>');
91
+
92
+ var cx = space;
93
+ var count = 0;
94
+ for (const [k, p] of mapPoints) {
95
+ let firstAssignFlag = false;
96
+ p.x = cx;
97
+
98
+ // Including Triangle
99
+ if (k in col.value) { // Define points for a triangle pointing to the right
100
+ let inner;
101
+
102
+ if (p.AR == "Read") {
103
+ inner = $X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x) + ',' + pos + ' ' + (p.x + iconsize) + ',' + (pos + iconsize/2) + ' ' + (p.x + iconsize) + ',' + (pos - iconsize/2) + '" class="resource-point read"></polygon>');
104
+ if (pos == p.y0) { firstAssignFlag = true; }
105
+ } else if (p.AR == "Assign") { // Define points for a triangle pointing to the left
106
+ inner = $X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x + iconsize) + ',' + pos + ' ' + (p.x) + ',' + (pos + iconsize/2) + ' ' + (p.x) + ',' + (pos - iconsize/2) + '" class="resource-point write"></polygon>');
107
+ } else if (p.AR == "AssignRead") {
108
+ inner = $X('<circle xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" cx="' + (p.x + iconsize/2) + '" cy="' + pos + '" r="' + (iconsize / 2) + '" class="resource-point both"></circle>');
109
+ } else if (p.AR == "ReadAssign") {
110
+ inner = $X('<circle xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" cx="' + (p.x + iconsize/2) + '" cy="' + pos + '" r="' + (iconsize / 2) + '" class="resource-point both"></circle>');
111
+ if (pos == p.y0) { firstAssignFlag = true; }
112
+ }
113
+
114
+ // extend the bars
115
+ if (pos > p.ymax) {
116
+ p.ymax = pos;
117
+ }
118
+
119
+ inner.append($X('<text xmlns="http://www.w3.org/2000/svg"></text>').text(k));
120
+ tsvg.append(inner);
121
+ }
122
+
123
+ if (firstAssignFlag) {
124
+ // Additional logic and construction of another polygon for orange triangle pointing left in row 0
125
+ p.y0 -= (val.row-1) * dimensions.height;
126
+ if (tcolumnsvgs[col.column][1] == undefined) {
127
+ tcolumnsvgs[col.column][1] = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-row" element-row="' + 0 + '"></g>');
128
+ }
129
+ tcolumnsvgs[col.column][1].append($X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x + iconsize) + ',' + firstpos + ' ' + (p.x) + ',' + (firstpos + iconsize/2) + ' ' + (p.x) + ',' + (firstpos - iconsize/2) + '" class="resource-point write"></polygon>').append($X('<text xmlns="http://www.w3.org/2000/svg"></text>').text(k)));
130
+ }
131
+ cx += iconsize + space;
132
+ count += 1;
133
+ }
134
+
135
+ if (tsvg.children().length > 0) {
136
+ tcolumnsvgs[col.column][val.row] = tsvg;
137
+ }
138
+ } else {
139
+ tsvg = $X('<text class="label" element-id="' + val.element_id + '" x="' + space + '" y="' + (dimensions.height * val.row - dimensions.height_shift) + '" xmlns="http://www.w3.org/2000/svg"></text>')
140
+ tsvg.text(col.value);
141
+ tsvg.mouseover(function(ev){ manifestation.events.mouseover($(ev.currentTarget).attr('element-id')); });
142
+ tsvg.mouseout(function(ev){ manifestation.events.mouseout($(ev.currentTarget).attr('element-id')); });
143
+ tsvg.click(function(ev){ manifestation.events.click($(ev.currentTarget).attr('element-id'),ev); });
144
+ tcolumnsvgs[col.column][val.row] = tsvg;
145
+ }
146
+
147
+ tcolumncount[col.column] += 1;
148
+ }
149
+ };
150
+ }
151
+ };
152
+
153
+ graphrealization.illustrator.svg.label_container.css({
154
+ 'grid-template-rows': (dimensions.height_shift/2) + 'px repeat(' + max.row + ', 1fr) ' + (dimensions.height_shift/2) + 'px',
155
+ 'grid-template-columns': 'max-content' + (tcolumns.length > 0 ? ' repeat(' + tcolumns.length.toString() + ',max-content)' : '') + ' auto'
156
+ });
157
+
158
+ tcolumns.forEach(h => {
159
+ if (Object.keys(tcolumnsvgs[h]).length > 0) {
160
+ const svgcolumn = $X('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" class="labelsrow"></svg>');
161
+ const svgback = $X('<g xmlns="http://www.w3.org/2000/svg"></g>');
162
+ const svgfront = $X('<g xmlns="http://www.w3.org/2000/svg"></g>');
163
+ let xwidth = 0;
164
+ svgcolumn.append(svgback);
165
+ svgcolumn.append(svgfront);
166
+ svgcolumn.css('grid-row', '1/span ' + (max.row + 2))
167
+ svgcolumn.css('grid-column', tcolumns.indexOf(tcolumns.first) + 2);
168
+ svgcolumn.attr('height', graphrealization.illustrator.svg.container.attr('height'));
169
+ graphrealization.illustrator.svg.label_container.append(svgcolumn);
170
+
171
+ for (var i = 0; i < max.row; i++) {
172
+ let node = svgfront.append($(tcolumnsvgs[h][i+1]));
173
+ if (xwidth < node[0].getBBox().width) { xwidth = node[0].getBBox().width; }
174
+ }
175
+ xwidth = xwidth + 2 * space;
176
+ if (striped == true) {
177
+ for (var i = 0; i < max.row; i++) {
178
+ svgback.append($X('<rect xmlns="http://www.w3.org/2000/svg" element-row="' + i + '" class="stripe ' + (i % 2 == 0 ? 'even' : 'odd') + '" x="0" y="' + (dimensions.height * i + dimensions.height_shift/2) + '" width="' + (xwidth + 1) + '" height="' + dimensions.height + '"></rect>'));
179
+ svgback.append($X('<rect xmlns="http://www.w3.org/2000/svg" element-row="' + i + '" class="border" x="0" y="' + (dimensions.height * i + dimensions.height_shift/2) + '" height="' + dimensions.height + '" width="1"></rect>'));
180
+ }
181
+ }
182
+ if (tcolumntype[h] == 'resource' || tcolumntype[h] == 'bodsod') {
183
+ let count = 0;
184
+ for (const [k, p] of mapPoints) {
185
+ svgback.append($X('<line xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" x1="' + (p.x + iconsize/2) + '" y1="' + p.y0 + '" x2="' + (p.x + iconsize/2) + '" y2="' + (p.ymax + 0.01) + '" class="' + tcolumntype[h] + '-column" stroke-width="' + iconsize + '"><text>' + k + '</text></line>'));
186
+ count += 1;
187
+ }
188
+ }
189
+
190
+ $('.resource-label').hide(); // Speech Bubble hide by default
191
+
192
+ svgcolumn.attr('width', xwidth);
193
+ }
194
+ });
195
+
196
+ return tcolumns.length;
197
+ }
198
+
199
+ $(document).ready(function() {
200
+ var current_label;
201
+ var clicked_label;
202
+ $('#graphgrid').on('mouseout','svg .resource-column, svg .resource-point',(data)=>{
203
+ if (clicked_label != current_label) {
204
+ $('.displaylabel').remove();
205
+ clicked_label = undefined;
206
+ current_label = undefined;
207
+ }
208
+ });
209
+ $('#graphcolumn').scroll((data)=>{
210
+ if (current_label != undefined) {
211
+ $('.displaylabel').remove();
212
+ show_dataflow_row_label(current_label);
213
+ }
214
+ });
215
+ $('#graphgrid').on('click','svg .resource-column',(data)=>{
216
+ show_dataflow_row_label(data.target);
217
+ current_label = data.target;
218
+ clicked_label = data.target;
219
+ });
220
+ $('#graphgrid').on('mouseover','svg .resource-column',(data)=>{
221
+ show_dataflow_row_label(data.target);
222
+ current_label = data.target;
223
+ });
224
+ $('#graphgrid').on('mouseover','svg .resource-point',(ev)=>{
225
+ let rc = $(ev.target).attr('resource-column');
226
+ let data = $('.resource-column[resource-column=' + rc + ']')[0];
227
+ show_dataflow_row_label(data);
228
+ current_label = data;
229
+ // let pos = data.target.getBoundingClientRect();
230
+ // let text = $('text',data.target).text();
231
+ // show_dataflow_label(pos.x + 12, pos.y + 5, 60, text);
232
+ });
233
+ });
@@ -19,6 +19,7 @@ var save = {};
19
19
  save['attributes'] = undefined;
20
20
  save['attributes_raw'] = {};
21
21
  var node_state = {};
22
+ var debug = false;
22
23
 
23
24
  function global_init() {
24
25
  suspended_redrawing = false;
@@ -102,6 +103,7 @@ function cockpit() { //{{{
102
103
  $("button[name=loadmodelfile]").click(load_modelfile);
103
104
  $("button[name=loadmodeltype]").click(function(e){new CustomMenu(e).menu($('#modeltypes'),load_modeltype, $("button[name=loadmodeltype]")); });
104
105
  $("button[name=savetestsetfile]").click(function(){ save_testsetfile(); });
106
+ $("button[name=savebpmnfile]").click(function(){ save_bpmnfile(); });
105
107
  $("button[name=savesvgfile]").click(function(){ save_svgfile(); });
106
108
  $("button[name=state_start]").click(function(){ $(this).parent().find('button').attr("disabled","disabled");start_instance(); });
107
109
  $("button[name=state_stop]").click(function(){ $(this).parent().find('button').attr("disabled","disabled");stop_instance(); });
@@ -149,6 +151,7 @@ function cockpit() { //{{{
149
151
  graph_highlight = graph_highlight[0];
150
152
  }
151
153
  }
154
+ if ('debug' in q) { debug = true; }
152
155
  if (q.monitor && q.load) {
153
156
  if (q.load.match(/https?:\/\//)) {
154
157
  $('body').attr('load-testset',q.load);
@@ -398,8 +401,9 @@ function monitor_instance(cin,rep,load,exec) {// {{{
398
401
  $("#current-track").attr('href','track.html?monitor=' + url);
399
402
  $("#current-index").show();
400
403
  $("#current-index").attr('href','index.html?monitor=' + url);
404
+
401
405
  var q = $.parseQuerySimple();
402
- history.replaceState({}, '', '?' + (graph_position ? "position=" + graph_position + "&" : "") + (graph_highlight ? "highlight=" + graph_highlight + "&" : "") + (graph_theme ? "theme=" + graph_theme + "&" : "") + (q.min || q.min=="" ? "min&" : "") + 'monitor='+url);
406
+ history.replaceState({}, '', '?' + ('debug' in q ? "debug&" : "") + (graph_position ? "position=" + graph_position + "&" : "") + (graph_highlight ? "highlight=" + graph_highlight + "&" : "") + (graph_theme ? "theme=" + graph_theme + "&" : "") + (q.min || q.min=="" ? "min&" : "") + 'monitor='+url);
403
407
 
404
408
  // Change url to return to current instance when reloading (because new subscription is made)
405
409
  $("input[name=votecontinue]").prop( "checked", false );
@@ -586,14 +590,21 @@ function adaptor_init(url,theme,dslx) { //{{{
586
590
  suspended_redrawing = true;
587
591
  save['graph_theme'] = theme;
588
592
  save['graph_adaptor'] = new WfAdaptor($('body').data('theme-base') + '/' + theme + '/theme.js',function(graphrealization){
589
- graphrealization.illustrator.get_symbol = (target) => {
593
+ graphrealization.illustrator.get_symbol = (target) => { //{{{
590
594
  if (save['endpoints_cache'][target]) {
591
595
  return save['endpoints_cache'][target].symbol;
592
596
  } else {
593
597
  return undefined;
594
598
  }
595
- }
596
- graphrealization.draw_labels = (max,labels,dimensions,striped) => {
599
+ } //}}}
600
+ graphrealization.illustrator.get_properties = (target) => { //{{{
601
+ if (save['endpoints_cache'][target]) {
602
+ return save['endpoints_cache'][target].properties;
603
+ } else {
604
+ return undefined;
605
+ }
606
+ } //}}}
607
+ graphrealization.draw_labels = (max,labels,dimensions,striped) => { //{{{
597
608
  // highlight
598
609
  if (graph_highlight) {
599
610
  graph_highlight_tasks.forEach((ele) => {
@@ -604,167 +615,14 @@ function adaptor_init(url,theme,dslx) { //{{{
604
615
  })
605
616
  }
606
617
 
607
- // labels
608
- $('#graphcanvas').css('grid-row', '1/span ' + (max.row + 2));
609
- if (striped == true) {
610
- if (!$('#graphgrid').hasClass('striped')) {
611
- $('#graphgrid').addClass('striped');
612
- }
613
- } else {
614
- $('#graphgrid').removeClass('striped');
615
- }
616
-
617
- $('.labelsrow, #graphgrid .graphlast').remove();
618
- let tcolumns = [];
619
- let tcolumntype = {};
620
- let tcolumncount = {}
621
-
622
- const mapPoints = new Map();
623
- const tcolumnsvgs = {};
624
- const iconsize = 10;
625
- const space = 5;
626
-
627
- _.each(labels,function(val){
628
- if (val.label != "") {
629
- _.each(val.label,function(col) {
630
- if (!tcolumns.includes(col.column)) {
631
- tcolumns.push(col.column);
632
- tcolumncount[col.column] = 0;
633
- tcolumnsvgs[col.column] = {};
634
- }
635
- if (tcolumntype[col.column] == undefined && col.type != undefined) {
636
- tcolumntype[col.column] = col.type;
637
- }
638
- if (col.value != undefined) {
639
- let pos = dimensions.height_shift/2 + dimensions.height * (val.row - 1) + (dimensions.height / 2);
640
- let firstpos = dimensions.height_shift/2 + (dimensions.height / 2);
641
-
642
- if (col.type == "resource") {
643
- for (const [k, v] of Object.entries(col.value)) {
644
- var p = { AR: v };
645
- if (!mapPoints.has(k)) {
646
- p.y0 = p.y0 == undefined ? pos : p.y0;
647
- p.ymax = (p.ymax == undefined) ? p.y0 : p.ymax;
648
- } else {
649
- p.y0 = mapPoints.get(k).y0;
650
- p.ymax = mapPoints.get(k).ymax;
651
- }
652
- mapPoints.set(k, p);
653
- }
654
-
655
- let tsvg = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-row" element-row="' + (val.row-1) + '"></g>');
656
-
657
- var cx = space;
658
- var count = 0;
659
- for (const [k, p] of mapPoints) {
660
- let firstAssignFlag = false;
661
- p.x = cx;
662
-
663
- // Including Triangle
664
- if (k in col.value) { // Define points for a triangle pointing to the right
665
- let inner;
666
-
667
- if (p.AR == "Read") {
668
- inner = $X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x) + ',' + pos + ' ' + (p.x + iconsize) + ',' + (pos + iconsize/2) + ' ' + (p.x + iconsize) + ',' + (pos - iconsize/2) + '" class="resource-point read"></polygon>');
669
- if (pos == p.y0) { firstAssignFlag = true; }
670
- } else if (p.AR == "Assign") { // Define points for a triangle pointing to the left
671
- inner = $X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x + iconsize) + ',' + pos + ' ' + (p.x) + ',' + (pos + iconsize/2) + ' ' + (p.x) + ',' + (pos - iconsize/2) + '" class="resource-point write"></polygon>');
672
- } else if (p.AR == "AssignRead") {
673
- inner = $X('<circle xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" cx="' + (p.x + iconsize/2) + '" cy="' + pos + '" r="' + (iconsize / 2) + '" class="resource-point both"></circle>');
674
- } else if (p.AR == "ReadAssign") {
675
- inner = $X('<circle xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" cx="' + (p.x + iconsize/2) + '" cy="' + pos + '" r="' + (iconsize / 2) + '" class="resource-point both"></circle>');
676
- if (pos == p.y0) { firstAssignFlag = true; }
677
- }
678
-
679
- // extend the bars
680
- if (pos > p.ymax) {
681
- p.ymax = pos;
682
- }
683
-
684
- inner.append($X('<text xmlns="http://www.w3.org/2000/svg"></text>').text(k));
685
- tsvg.append(inner);
686
- }
687
-
688
- if (firstAssignFlag) {
689
- // Additional logic and construction of another polygon for orange triangle pointing left in row 0
690
- p.y0 -= (val.row-1) * dimensions.height;
691
- if (tcolumnsvgs[col.column][1] == undefined) {
692
- tcolumnsvgs[col.column][1] = $X('<g xmlns="http://www.w3.org/2000/svg" class="resource-row" element-row="' + 0 + '"></g>');
693
- }
694
- tcolumnsvgs[col.column][1].append($X('<polygon xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" points="' + (p.x + iconsize) + ',' + firstpos + ' ' + (p.x) + ',' + (firstpos + iconsize/2) + ' ' + (p.x) + ',' + (firstpos - iconsize/2) + '" class="resource-point write"></polygon>').append($X('<text xmlns="http://www.w3.org/2000/svg"></text>').text(k)));
695
- }
696
- cx += iconsize + space;
697
- count += 1;
698
- }
699
-
700
- if (tsvg.children().length > 0) {
701
- tcolumnsvgs[col.column][val.row] = tsvg;
702
- }
703
- } else {
704
- tsvg = $X('<text class="label" element-id="' + val.element_id + '" x="' + space + '" y="' + (dimensions.height * val.row - dimensions.height_shift) + '" xmlns="http://www.w3.org/2000/svg"></text>')
705
- tsvg.text(col.value);
706
- tsvg.mouseover(function(ev){ manifestation.events.mouseover($(ev.currentTarget).attr('element-id')); });
707
- tsvg.mouseout(function(ev){ manifestation.events.mouseout($(ev.currentTarget).attr('element-id')); });
708
- tsvg.click(function(ev){ manifestation.events.click($(ev.currentTarget).attr('element-id'),ev); });
709
- tcolumnsvgs[col.column][val.row] = tsvg;
710
- }
711
-
712
- tcolumncount[col.column] += 1;
713
- }
714
- });
715
- }
716
- });
717
-
718
- $('#graphgrid').css({
719
- 'grid-template-rows': (dimensions.height_shift/2) + 'px repeat(' + max.row + ', 1fr) ' + (dimensions.height_shift/2) + 'px',
720
- 'grid-template-columns': 'max-content' + (tcolumns.length > 0 ? ' repeat(' + tcolumns.length.toString() + ',max-content)' : '') + ' auto'
721
- });
722
-
723
- tcolumns.forEach(h => {
724
- if (Object.keys(tcolumnsvgs[h]).length > 0) {
725
- const svgcolumn = $X('<svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:x="http://www.w3.org/1999/xlink" class="labelsrow"></svg>');
726
- const svgback = $X('<g xmlns="http://www.w3.org/2000/svg"></g>');
727
- const svgfront = $X('<g xmlns="http://www.w3.org/2000/svg"></g>');
728
- let xwidth = 0;
729
- svgcolumn.append(svgback);
730
- svgcolumn.append(svgfront);
731
- svgcolumn.css('grid-row', '1/span ' + (max.row + 2))
732
- svgcolumn.css('grid-column', tcolumns.indexOf(tcolumns.first) + 2);
733
- svgcolumn.attr('height', $('#graphcanvas').attr('height'));
734
- $('#graphgrid').append(svgcolumn);
735
-
736
- for (var i = 0; i < max.row; i++) {
737
- let node = svgfront.append($(tcolumnsvgs[h][i+1]));
738
- if (xwidth < node[0].getBBox().width) { xwidth = node[0].getBBox().width; }
739
- }
740
- xwidth = xwidth + 2 * space;
741
- if (striped == true) {
742
- for (var i = 0; i < max.row; i++) {
743
- svgback.append($X('<rect xmlns="http://www.w3.org/2000/svg" element-row="' + i + '" class="stripe ' + (i % 2 == 0 ? 'even' : 'odd') + '" x="0" y="' + (dimensions.height * i + dimensions.height_shift/2) + '" width="' + (xwidth + 1) + '" height="' + dimensions.height + '"></rect>'));
744
- svgback.append($X('<rect xmlns="http://www.w3.org/2000/svg" element-row="' + i + '" class="border" x="0" y="' + (dimensions.height * i + dimensions.height_shift/2) + '" height="' + dimensions.height + '" width="1"></rect>'));
745
- }
746
- }
747
- if (tcolumntype[h] == 'resource' || tcolumntype[h] == 'bodsod') {
748
- let count = 0;
749
- for (const [k, p] of mapPoints) {
750
- svgback.append($X('<line xmlns="http://www.w3.org/2000/svg" resource-column="' + count + '" x1="' + (p.x + iconsize/2) + '" y1="' + p.y0 + '" x2="' + (p.x + iconsize/2) + '" y2="' + (p.ymax + 0.01) + '" class="' + tcolumntype[h] + '-column" stroke-width="' + iconsize + '"><text>' + k + '</text></line>'));
751
- count += 1;
752
- }
753
- }
754
-
755
- $('.resource-label').hide(); // Speech Bubble hide by default
756
-
757
- svgcolumn.attr('width', xwidth);
758
- }
759
- });
618
+ columns = draw_extended_columns(graphrealization,max,labels,dimensions,striped);
760
619
 
761
620
  // Add the last stripe
762
- var j = tcolumns.length;
763
621
  for (var i = 0; i < max.row; i++) {
764
- var ele = $('<div element-row="' + i + '" class="graphlast ' + (i % 2 == 0 ? 'odd' : 'even') + '" style="grid-column: ' + (j+2) + '; grid-row: ' + (i+2) + '; padding-bottom: ' + dimensions.height_shift + 'px">&#032;</div>');
765
- $('#graphgrid').append(ele);
622
+ var ele = $('<div element-row="' + i + '" class="graphlast ' + (i % 2 == 0 ? 'odd' : 'even') + '" style="grid-column: ' + (columns+2) + '; grid-row: ' + (i+2) + '; height: ' + dimensions.stripe_height + 'px">&#032;</div>');
623
+ graphrealization.illustrator.svg.label_container.append(ele);
766
624
  }
767
- };
625
+ }; //}}}
768
626
  graphrealization.set_svg_container($('#graphcanvas'));
769
627
  graphrealization.set_label_container($('#graphgrid'));
770
628
  graphrealization.set_description($(dslx), true);
@@ -944,7 +802,6 @@ function monitor_instance_pos_change(content) {// {{{
944
802
  if (content['at']) {
945
803
  $.each(content['at'],function(a,b){
946
804
  format_visual_add(b.position,"passive",false);
947
- console.log('rrrrrr add', b.position);
948
805
  });
949
806
  }
950
807
  if (content['after']) {
@@ -955,7 +812,6 @@ function monitor_instance_pos_change(content) {// {{{
955
812
  if (content['unmark']) {
956
813
  $.each(content['unmark'],function(a,b){
957
814
  format_visual_remove(b.position,"passive",false)
958
- console.log('rrrrrr remove', b.position);
959
815
  });
960
816
  }
961
817
  if (!content['at'] && !content['unmark'] && !content['after'] && !content['wait']) {
@@ -963,7 +819,6 @@ function monitor_instance_pos_change(content) {// {{{
963
819
  }
964
820
  } // }}}
965
821
 
966
-
967
822
  function monitor_instance_state_change(notification) { //{{{
968
823
  // sometimes, out of sheer network routingness, stopping comes after stopped, which fucks the UI hard
969
824
  // thus, we are having none of it
@@ -1192,6 +1047,7 @@ function save_svgfile() {// {{{
1192
1047
  }
1193
1048
  });
1194
1049
  gc.attr('width',start+1);
1050
+ gc.find('.duration').remove();
1195
1051
  $.ajax({
1196
1052
  type: "GET",
1197
1053
  url: url + "/properties/attributes/info/",
@@ -1202,11 +1058,30 @@ function save_svgfile() {// {{{
1202
1058
  },
1203
1059
  error: report_failure
1204
1060
  });
1061
+ } // }}}
1062
+
1063
+ function save_bpmnfile() {// {{{
1064
+ var url = $('body').attr('current-instance');
1065
+
1066
+ let dpm = JSON.parse($('svg[data-pos-matrix]').attr('data-pos-matrix'));
1067
+ let dcl = JSON.parse($('svg[data-con-list]').attr('data-con-list'));
1068
+
1069
+ let david = david_bpmn_convert(dpm,dcl);
1070
+
1071
+ $.ajax({
1072
+ type: "GET",
1073
+ url: url + "/properties/attributes/info/",
1074
+ success: function(res){
1075
+ $('#savebpmnfile').attr('download',res + '.bpmn');
1076
+ $('#savebpmnfile').attr('href','data:application/xml;charset=utf-8;base64,' + $B64(david.serializePrettyXML()));
1077
+ document.getElementById('savebpmnfile').click();
1078
+ },
1079
+ error: report_failure
1080
+ });
1205
1081
  }// }}}
1206
1082
  async function set_testset(testset,exec) {// {{{
1207
1083
  var url = $('body').attr('current-instance');
1208
-
1209
- var promises = [];
1084
+ var promises;
1210
1085
 
1211
1086
  var tset = $X('<properties xmlns="http://cpee.org/ns/properties/2.0"/>');
1212
1087
  tset.append($("testset > executionhandler",testset));
@@ -1221,6 +1096,7 @@ async function set_testset(testset,exec) {// {{{
1221
1096
  $('properties > attributes > design_dir',tset).remove();
1222
1097
  }
1223
1098
 
1099
+ promises = [];
1224
1100
  promises.push(
1225
1101
  $.ajax({
1226
1102
  type: "GET",
@@ -1235,6 +1111,9 @@ async function set_testset(testset,exec) {// {{{
1235
1111
  await load_testset_handlers(url,testset,vals);
1236
1112
  })
1237
1113
  );
1114
+ await Promise.all(promises);
1115
+
1116
+ promises = [];
1238
1117
  promises.push(
1239
1118
  $.ajax({
1240
1119
  type: 'PATCH',
@@ -1248,7 +1127,6 @@ async function set_testset(testset,exec) {// {{{
1248
1127
  error: report_failure
1249
1128
  })
1250
1129
  );
1251
-
1252
1130
  await Promise.all(promises);
1253
1131
 
1254
1132
  document.dispatchEvent(model_loaded);