jruby_activiti 1.2.5 → 2.0.0

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 (317) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -1
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG +6 -0
  5. data/Jarfile +5 -0
  6. data/Jarfile.lock +52 -13
  7. data/README.md +21 -9
  8. data/java/build.md +3 -0
  9. data/java/mapping.md +20 -0
  10. data/java/pom.xml +30 -0
  11. data/java/src/main/java/jrubyactiviti/Modeler.java +95 -0
  12. data/java/src/main/java/jrubyactiviti/ProcessDiagram.java +491 -0
  13. data/java/src/main/java/jrubyactiviti/ProcessInstanceHighlights.java +237 -0
  14. data/java/src/main/java/jrubyactiviti/StencilsetResource.java +16 -0
  15. data/java/src/main/resources/stencilset.json +1339 -0
  16. data/jruby_activiti.gemspec +3 -2
  17. data/lib/generators/jruby_activiti/install_generator.rb +4 -0
  18. data/lib/jar/jrubyactiviti-2.0.jar +0 -0
  19. data/lib/jruby_activiti/version.rb +1 -1
  20. data/lib/jruby_activiti/web.rb +81 -0
  21. data/lib/jruby_activiti.rb +28 -20
  22. data/test/{base_test.rb → activiti_test.rb} +1 -3
  23. data/test/instance_hights_test.rb +18 -0
  24. data/test/modeler_test.rb +35 -0
  25. data/test/process_diagram_test.rb +33 -0
  26. data/test/resources/model_init_editor_source.json +1 -0
  27. data/test/resources/model_json_xml.json +278 -0
  28. data/test/resources/model_svg_xml.xml +66 -0
  29. data/test/stencilset_test.rb +7 -0
  30. data/test/test_helper.rb +2 -0
  31. data/web/public/diagram-viewer/images/bg.png +0 -0
  32. data/web/public/diagram-viewer/images/breadcrumbs.png +0 -0
  33. data/web/public/diagram-viewer/images/checker-bg.png +0 -0
  34. data/web/public/diagram-viewer/images/deployer/blue/message_catch.png +0 -0
  35. data/web/public/diagram-viewer/images/deployer/business_rule.png +0 -0
  36. data/web/public/diagram-viewer/images/deployer/error_catch.png +0 -0
  37. data/web/public/diagram-viewer/images/deployer/error_throw.png +0 -0
  38. data/web/public/diagram-viewer/images/deployer/manual.png +0 -0
  39. data/web/public/diagram-viewer/images/deployer/message_catch.png +0 -0
  40. data/web/public/diagram-viewer/images/deployer/message_throw.png +0 -0
  41. data/web/public/diagram-viewer/images/deployer/receive.png +0 -0
  42. data/web/public/diagram-viewer/images/deployer/script.png +0 -0
  43. data/web/public/diagram-viewer/images/deployer/send.png +0 -0
  44. data/web/public/diagram-viewer/images/deployer/service.png +0 -0
  45. data/web/public/diagram-viewer/images/deployer/signal_catch.png +0 -0
  46. data/web/public/diagram-viewer/images/deployer/signal_throw.png +0 -0
  47. data/web/public/diagram-viewer/images/deployer/timer.png +0 -0
  48. data/web/public/diagram-viewer/images/deployer/user.png +0 -0
  49. data/web/public/diagram-viewer/index.html +130 -0
  50. data/web/public/diagram-viewer/js/ActivitiRest.js +74 -0
  51. data/web/public/diagram-viewer/js/ActivityImpl.js +1 -0
  52. data/web/public/diagram-viewer/js/Color.js +603 -0
  53. data/web/public/diagram-viewer/js/LineBreakMeasurer.js +270 -0
  54. data/web/public/diagram-viewer/js/Polyline.js +387 -0
  55. data/web/public/diagram-viewer/js/ProcessDiagramCanvas.js +2172 -0
  56. data/web/public/diagram-viewer/js/ProcessDiagramGenerator.js +1087 -0
  57. data/web/public/diagram-viewer/js/jquery/jquery.asyncqueue.js +125 -0
  58. data/web/public/diagram-viewer/js/jquery/jquery.js +9266 -0
  59. data/web/public/diagram-viewer/js/jquery/jquery.progressbar.js +131 -0
  60. data/web/public/diagram-viewer/js/jstools.js +23 -0
  61. data/web/public/diagram-viewer/js/raphael.2.1.1.js +10 -0
  62. data/web/public/diagram-viewer/js/raphael.js +10 -0
  63. data/web/public/diagram-viewer/js/raphael_uncompressed.js +5815 -0
  64. data/web/public/diagram-viewer/js/textlayout.js +441 -0
  65. data/web/public/diagram-viewer/style.css +1 -0
  66. data/web/public/editor-app/app-cfg.js +25 -0
  67. data/web/public/editor-app/app.js +432 -0
  68. data/web/public/editor-app/configuration/properties/assignment-display-template.html +4 -0
  69. data/web/public/editor-app/configuration/properties/assignment-popup.html +44 -0
  70. data/web/public/editor-app/configuration/properties/assignment-write-template.html +4 -0
  71. data/web/public/editor-app/configuration/properties/boolean-property-template.html +4 -0
  72. data/web/public/editor-app/configuration/properties/condition-expression-display-template.html +2 -0
  73. data/web/public/editor-app/configuration/properties/condition-expression-popup.html +29 -0
  74. data/web/public/editor-app/configuration/properties/condition-expression-write-template.html +4 -0
  75. data/web/public/editor-app/configuration/properties/default-value-display-template.html +4 -0
  76. data/web/public/editor-app/configuration/properties/event-listeners-display-template.html +3 -0
  77. data/web/public/editor-app/configuration/properties/event-listeners-popup.html +115 -0
  78. data/web/public/editor-app/configuration/properties/event-listeners-write-template.html +4 -0
  79. data/web/public/editor-app/configuration/properties/execution-listeners-display-template.html +3 -0
  80. data/web/public/editor-app/configuration/properties/execution-listeners-popup.html +101 -0
  81. data/web/public/editor-app/configuration/properties/execution-listeners-write-template.html +4 -0
  82. data/web/public/editor-app/configuration/properties/feedback-popup.html +17 -0
  83. data/web/public/editor-app/configuration/properties/fields-display-template.html +3 -0
  84. data/web/public/editor-app/configuration/properties/fields-popup.html +61 -0
  85. data/web/public/editor-app/configuration/properties/fields-write-template.html +4 -0
  86. data/web/public/editor-app/configuration/properties/form-properties-display-template.html +3 -0
  87. data/web/public/editor-app/configuration/properties/form-properties-popup.html +93 -0
  88. data/web/public/editor-app/configuration/properties/form-properties-write-template.html +4 -0
  89. data/web/public/editor-app/configuration/properties/in-parameters-display-template.html +3 -0
  90. data/web/public/editor-app/configuration/properties/in-parameters-popup.html +53 -0
  91. data/web/public/editor-app/configuration/properties/in-parameters-write-template.html +4 -0
  92. data/web/public/editor-app/configuration/properties/message-definitions-display-template.html +2 -0
  93. data/web/public/editor-app/configuration/properties/message-definitions-popup.html +50 -0
  94. data/web/public/editor-app/configuration/properties/message-definitions-write-template.html +3 -0
  95. data/web/public/editor-app/configuration/properties/message-property-write-template.html +4 -0
  96. data/web/public/editor-app/configuration/properties/multiinstance-property-write-template.html +8 -0
  97. data/web/public/editor-app/configuration/properties/out-parameters-display-template.html +3 -0
  98. data/web/public/editor-app/configuration/properties/out-parameters-popup.html +53 -0
  99. data/web/public/editor-app/configuration/properties/out-parameters-write-template.html +4 -0
  100. data/web/public/editor-app/configuration/properties/sequenceflow-order-display-template.html +3 -0
  101. data/web/public/editor-app/configuration/properties/sequenceflow-order-popup.html +47 -0
  102. data/web/public/editor-app/configuration/properties/sequenceflow-order-write-template.html +4 -0
  103. data/web/public/editor-app/configuration/properties/signal-definitions-display-template.html +3 -0
  104. data/web/public/editor-app/configuration/properties/signal-definitions-popup.html +58 -0
  105. data/web/public/editor-app/configuration/properties/signal-definitions-write-template.html +4 -0
  106. data/web/public/editor-app/configuration/properties/signal-property-write-template.html +4 -0
  107. data/web/public/editor-app/configuration/properties/string-property-write-mode-template.html +8 -0
  108. data/web/public/editor-app/configuration/properties/subprocess-reference-display-template.html +3 -0
  109. data/web/public/editor-app/configuration/properties/subprocess-reference-popup.html +43 -0
  110. data/web/public/editor-app/configuration/properties/subprocess-reference-write-template.html +4 -0
  111. data/web/public/editor-app/configuration/properties/task-listeners-display-template.html +3 -0
  112. data/web/public/editor-app/configuration/properties/task-listeners-popup.html +102 -0
  113. data/web/public/editor-app/configuration/properties/task-listeners-write-template.html +4 -0
  114. data/web/public/editor-app/configuration/properties/text-popup.html +17 -0
  115. data/web/public/editor-app/configuration/properties/text-property-write-template.html +4 -0
  116. data/web/public/editor-app/configuration/properties-assignment-controller.js +150 -0
  117. data/web/public/editor-app/configuration/properties-condition-expression-controller.js +58 -0
  118. data/web/public/editor-app/configuration/properties-custom-controllers.js +18 -0
  119. data/web/public/editor-app/configuration/properties-default-controllers.js +115 -0
  120. data/web/public/editor-app/configuration/properties-event-listeners-controller.js +266 -0
  121. data/web/public/editor-app/configuration/properties-execution-listeners-controller.js +326 -0
  122. data/web/public/editor-app/configuration/properties-fields-controller.js +192 -0
  123. data/web/public/editor-app/configuration/properties-form-properties-controller.js +192 -0
  124. data/web/public/editor-app/configuration/properties-in-parameters-controller.js +158 -0
  125. data/web/public/editor-app/configuration/properties-message-definitions-controller.js +137 -0
  126. data/web/public/editor-app/configuration/properties-message-scope-controller.js +48 -0
  127. data/web/public/editor-app/configuration/properties-multiinstance-controller.js +34 -0
  128. data/web/public/editor-app/configuration/properties-out-parameters-controller.js +158 -0
  129. data/web/public/editor-app/configuration/properties-sequenceflow-order-controller.js +130 -0
  130. data/web/public/editor-app/configuration/properties-signal-definitions-controller.js +136 -0
  131. data/web/public/editor-app/configuration/properties-signal-scope-controller.js +47 -0
  132. data/web/public/editor-app/configuration/properties-task-listeners-controller.js +325 -0
  133. data/web/public/editor-app/configuration/properties.js +99 -0
  134. data/web/public/editor-app/configuration/toolbar-custom-actions.js +18 -0
  135. data/web/public/editor-app/configuration/toolbar-default-actions.js +429 -0
  136. data/web/public/editor-app/configuration/toolbar.js +175 -0
  137. data/web/public/editor-app/configuration/url-config.js +34 -0
  138. data/web/public/editor-app/css/style-common.css +1518 -0
  139. data/web/public/editor-app/css/style-editor.css +639 -0
  140. data/web/public/editor-app/css/style.css +471 -0
  141. data/web/public/editor-app/editor/css/editor.css +202 -0
  142. data/web/public/editor-app/editor/i18n/translation_de.js +383 -0
  143. data/web/public/editor-app/editor/i18n/translation_en_us.js +423 -0
  144. data/web/public/editor-app/editor/i18n/translation_signavio_de.js +106 -0
  145. data/web/public/editor-app/editor/i18n/translation_signavio_en_us.js +108 -0
  146. data/web/public/editor-app/editor/oryx.debug.js +24510 -0
  147. data/web/public/editor-app/editor/oryx.js +30 -0
  148. data/web/public/editor-app/editor-config.js +32 -0
  149. data/web/public/editor-app/editor-controller.js +65 -0
  150. data/web/public/editor-app/editor-utils.js +135 -0
  151. data/web/public/editor-app/editor.html +136 -0
  152. data/web/public/editor-app/eventbus.js +133 -0
  153. data/web/public/editor-app/fonts/activiti-admin-webfont.eot +0 -0
  154. data/web/public/editor-app/fonts/activiti-admin-webfont.svg +43 -0
  155. data/web/public/editor-app/fonts/activiti-admin-webfont.ttf +0 -0
  156. data/web/public/editor-app/fonts/activiti-admin-webfont.woff +0 -0
  157. data/web/public/editor-app/fonts/glyphicons-halflings-regular.eot +0 -0
  158. data/web/public/editor-app/fonts/glyphicons-halflings-regular.svg +229 -0
  159. data/web/public/editor-app/fonts/glyphicons-halflings-regular.ttf +0 -0
  160. data/web/public/editor-app/fonts/glyphicons-halflings-regular.woff +0 -0
  161. data/web/public/editor-app/header-controller.js +31 -0
  162. data/web/public/editor-app/i18n/en.json +286 -0
  163. data/web/public/editor-app/images/bpmn-error.png +0 -0
  164. data/web/public/editor-app/images/bpmn-warning.png +0 -0
  165. data/web/public/editor-app/images/datadefinition.png +0 -0
  166. data/web/public/editor-app/images/delete.png +0 -0
  167. data/web/public/editor-app/images/loading.gif +0 -0
  168. data/web/public/editor-app/images/logo-2x.png +0 -0
  169. data/web/public/editor-app/images/logo.png +0 -0
  170. data/web/public/editor-app/images/nw-handle-dark.gif +0 -0
  171. data/web/public/editor-app/images/se-handle-dark.gif +0 -0
  172. data/web/public/editor-app/images/shapemenu_highlight.png +0 -0
  173. data/web/public/editor-app/images/wrench.png +0 -0
  174. data/web/public/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js +8 -0
  175. data/web/public/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js.map +8 -0
  176. data/web/public/editor-app/libs/angular-dragdrop.min-1.0.3.js +9 -0
  177. data/web/public/editor-app/libs/angular-dragdrop_1.0.7/angular-dragdrop.min.js +29 -0
  178. data/web/public/editor-app/libs/angular-mocks_1.2.13/angular-mocks.js +2136 -0
  179. data/web/public/editor-app/libs/angular-resource_1.2.13/angular-resource.js +596 -0
  180. data/web/public/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js +13 -0
  181. data/web/public/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js.map +8 -0
  182. data/web/public/editor-app/libs/angular-route_1.2.13/angular-route.js +921 -0
  183. data/web/public/editor-app/libs/angular-route_1.2.13/angular-route.min.js +14 -0
  184. data/web/public/editor-app/libs/angular-route_1.2.13/angular-route.min.js.map +8 -0
  185. data/web/public/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.js +625 -0
  186. data/web/public/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js +14 -0
  187. data/web/public/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js.map +8 -0
  188. data/web/public/editor-app/libs/angular-scroll_0.5.7/angular-scroll.min.js +1 -0
  189. data/web/public/editor-app/libs/angular-strap_2.0.5/angular-strap.min.js +9 -0
  190. data/web/public/editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js +8 -0
  191. data/web/public/editor-app/libs/angular-translate-loader-static-files/.bower.json +19 -0
  192. data/web/public/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js +31 -0
  193. data/web/public/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js +6 -0
  194. data/web/public/editor-app/libs/angular-translate-storage-cookie/.bower.json +20 -0
  195. data/web/public/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js +19 -0
  196. data/web/public/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js +6 -0
  197. data/web/public/editor-app/libs/angular-translate_2.4.2/angular-translate.js +960 -0
  198. data/web/public/editor-app/libs/angular-translate_2.4.2/angular-translate.min.js +6 -0
  199. data/web/public/editor-app/libs/angular_1.2.13/angular-animate.min.js +27 -0
  200. data/web/public/editor-app/libs/angular_1.2.13/angular.min.js +204 -0
  201. data/web/public/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker-bs3.css +267 -0
  202. data/web/public/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker.js +1026 -0
  203. data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css +347 -0
  204. data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css.map +1 -0
  205. data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.min.css +7 -0
  206. data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css +5785 -0
  207. data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css.map +1 -0
  208. data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap.min.css +7 -0
  209. data/web/public/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.eot +0 -0
  210. data/web/public/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.svg +229 -0
  211. data/web/public/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.ttf +0 -0
  212. data/web/public/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.woff +0 -0
  213. data/web/public/editor-app/libs/bootstrap_3.1.1/js/bootstrap.js +1951 -0
  214. data/web/public/editor-app/libs/bootstrap_3.1.1/js/bootstrap.min.js +6 -0
  215. data/web/public/editor-app/libs/es5-shim-15.3.4.5/.bower.json +14 -0
  216. data/web/public/editor-app/libs/es5-shim-15.3.4.5/.gitignore +2 -0
  217. data/web/public/editor-app/libs/es5-shim-15.3.4.5/CHANGES +93 -0
  218. data/web/public/editor-app/libs/es5-shim-15.3.4.5/CONTRIBUTORS.md +25 -0
  219. data/web/public/editor-app/libs/es5-shim-15.3.4.5/LICENSE +19 -0
  220. data/web/public/editor-app/libs/es5-shim-15.3.4.5/README.md +161 -0
  221. data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-sham.js +444 -0
  222. data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-sham.map +1 -0
  223. data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-sham.min.js +4 -0
  224. data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-shim.js +1314 -0
  225. data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-shim.map +1 -0
  226. data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-shim.min.js +4 -0
  227. data/web/public/editor-app/libs/es5-shim-15.3.4.5/package.json +34 -0
  228. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-kill.js +64 -0
  229. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-matchers.js +34 -0
  230. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h.js +3 -0
  231. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/index.html +64 -0
  232. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/index.min.html +63 -0
  233. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine-html.js +190 -0
  234. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.css +166 -0
  235. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.js +2477 -0
  236. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine_favicon.png +0 -0
  237. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/json2.js +478 -0
  238. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-array.js +1223 -0
  239. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-date.js +152 -0
  240. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-function.js +147 -0
  241. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-number.js +14 -0
  242. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-object.js +181 -0
  243. data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-string.js +204 -0
  244. data/web/public/editor-app/libs/jquery-ui-1.10.3.custom.min.js +6 -0
  245. data/web/public/editor-app/libs/jquery.autogrow-textarea.js +61 -0
  246. data/web/public/editor-app/libs/jquery_1.11.0/jquery.js +9789 -0
  247. data/web/public/editor-app/libs/jquery_1.11.0/jquery.min.js +4 -0
  248. data/web/public/editor-app/libs/jquery_1.11.0/jquery.min.map +1 -0
  249. data/web/public/editor-app/libs/json3_3.2.6/LICENSE +20 -0
  250. data/web/public/editor-app/libs/json3_3.2.6/lib/json3.js +861 -0
  251. data/web/public/editor-app/libs/json3_3.2.6/lib/json3.min.js +18 -0
  252. data/web/public/editor-app/libs/momentjs_2.5.1/momentjs.min.js +6 -0
  253. data/web/public/editor-app/libs/mousetrap-1.4.5.min.js +9 -0
  254. data/web/public/editor-app/libs/ng-grid-2.0.7-min.js +2 -0
  255. data/web/public/editor-app/libs/ng-grid-2.0.7.min.css +1 -0
  256. data/web/public/editor-app/libs/path_parser.js +30 -0
  257. data/web/public/editor-app/libs/prototype-1.5.1.js +3272 -0
  258. data/web/public/editor-app/libs/ui-utils.min-0.0.4.js +7 -0
  259. data/web/public/editor-app/partials/root-stencil-item-template.html +11 -0
  260. data/web/public/editor-app/partials/stencil-item-template.html +27 -0
  261. data/web/public/editor-app/plugins.xml +58 -0
  262. data/web/public/editor-app/popups/icon-template.html +3 -0
  263. data/web/public/editor-app/popups/save-model.html +41 -0
  264. data/web/public/editor-app/popups/select-shape.html +20 -0
  265. data/web/public/editor-app/popups/unsaved-changes.html +22 -0
  266. data/web/public/editor-app/select-shape-controller.js +314 -0
  267. data/web/public/editor-app/stencil-controller.js +1421 -0
  268. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.collapsed.png +0 -0
  269. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.png +0 -0
  270. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/expanded.subprocess.png +0 -0
  271. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.business.rule.png +0 -0
  272. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.camel.png +0 -0
  273. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.manual.png +0 -0
  274. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.mule.png +0 -0
  275. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.receive.png +0 -0
  276. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.script.png +0 -0
  277. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.send.png +0 -0
  278. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.service.png +0 -0
  279. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.shell.png +0 -0
  280. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.user.png +0 -0
  281. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/subprocess.png +0 -0
  282. data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/task.png +0 -0
  283. data/web/public/editor-app/stencilsets/bpmn2.0/icons/artifact/text.annotation.png +0 -0
  284. data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/cancel.png +0 -0
  285. data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/compensation.png +0 -0
  286. data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/error.png +0 -0
  287. data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/message.png +0 -0
  288. data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/signal.png +0 -0
  289. data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/timer.png +0 -0
  290. data/web/public/editor-app/stencilsets/bpmn2.0/icons/connector/association.undirected.png +0 -0
  291. data/web/public/editor-app/stencilsets/bpmn2.0/icons/connector/association.unidirectional.png +0 -0
  292. data/web/public/editor-app/stencilsets/bpmn2.0/icons/connector/messageflow.png +0 -0
  293. data/web/public/editor-app/stencilsets/bpmn2.0/icons/connector/sequenceflow.png +0 -0
  294. data/web/public/editor-app/stencilsets/bpmn2.0/icons/dataobject/data.store.png +0 -0
  295. data/web/public/editor-app/stencilsets/bpmn2.0/icons/diagram.png +0 -0
  296. data/web/public/editor-app/stencilsets/bpmn2.0/icons/endevent/cancel.png +0 -0
  297. data/web/public/editor-app/stencilsets/bpmn2.0/icons/endevent/error.png +0 -0
  298. data/web/public/editor-app/stencilsets/bpmn2.0/icons/endevent/none.png +0 -0
  299. data/web/public/editor-app/stencilsets/bpmn2.0/icons/endevent/terminate.png +0 -0
  300. data/web/public/editor-app/stencilsets/bpmn2.0/icons/gateway/eventbased.png +0 -0
  301. data/web/public/editor-app/stencilsets/bpmn2.0/icons/gateway/exclusive.databased.png +0 -0
  302. data/web/public/editor-app/stencilsets/bpmn2.0/icons/gateway/inclusive.png +0 -0
  303. data/web/public/editor-app/stencilsets/bpmn2.0/icons/gateway/parallel.png +0 -0
  304. data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/error.png +0 -0
  305. data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/message.png +0 -0
  306. data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/none.png +0 -0
  307. data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/signal.png +0 -0
  308. data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/timer.png +0 -0
  309. data/web/public/editor-app/stencilsets/bpmn2.0/icons/swimlane/lane.png +0 -0
  310. data/web/public/editor-app/stencilsets/bpmn2.0/icons/swimlane/pool.png +0 -0
  311. data/web/public/editor-app/stencilsets/bpmn2.0/icons/throwing/none.png +0 -0
  312. data/web/public/editor-app/stencilsets/bpmn2.0/icons/throwing/signal.png +0 -0
  313. data/web/public/editor-app/toolbar-controller.js +162 -0
  314. data/web/public/modeler.html +140 -0
  315. data/web/views/models/index.erb +32 -0
  316. data/web/views/models/new.erb +15 -0
  317. metadata +334 -10
@@ -0,0 +1,192 @@
1
+ /*
2
+ * Activiti Modeler component part of the Activiti project
3
+ * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+ */
19
+
20
+ /*
21
+ * Form Properties
22
+ */
23
+
24
+ var KisBpmFormPropertiesCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) {
25
+
26
+ // Config for the modal window
27
+ var opts = {
28
+ template: 'editor-app/configuration/properties/form-properties-popup.html?version=' + Date.now(),
29
+ scope: $scope
30
+ };
31
+
32
+ // Open the dialog
33
+ $modal(opts);
34
+ }];
35
+
36
+ var KisBpmFormPropertiesPopupCtrl = ['$scope', '$q', '$translate', function($scope, $q, $translate) {
37
+
38
+ // Put json representing form properties on scope
39
+ if ($scope.property.value !== undefined && $scope.property.value !== null
40
+ && $scope.property.value.formProperties !== undefined
41
+ && $scope.property.value.formProperties !== null) {
42
+ // Note that we clone the json object rather then setting it directly,
43
+ // this to cope with the fact that the user can click the cancel button and no changes should have happended
44
+ $scope.formProperties = angular.copy($scope.property.value.formProperties);
45
+ } else {
46
+ $scope.formProperties = [];
47
+ }
48
+
49
+ // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough)
50
+ $scope.selectedProperties = [];
51
+
52
+ $scope.translationsRetrieved = false;
53
+
54
+ $scope.labels = {};
55
+
56
+ var idPromise = $translate('PROPERTY.FORMPROPERTIES.ID');
57
+ var namePromise = $translate('PROPERTY.FORMPROPERTIES.NAME');
58
+ var typePromise = $translate('PROPERTY.FORMPROPERTIES.TYPE');
59
+
60
+ $q.all([idPromise, namePromise, typePromise]).then(function(results) {
61
+ $scope.labels.idLabel = results[0];
62
+ $scope.labels.nameLabel = results[1];
63
+ $scope.labels.typeLabel = results[2];
64
+ $scope.translationsRetrieved = true;
65
+
66
+ // Config for grid
67
+ $scope.gridOptions = {
68
+ data: 'formProperties',
69
+ enableRowReordering: true,
70
+ headerRowHeight: 28,
71
+ multiSelect: false,
72
+ keepLastSelected : false,
73
+ selectedItems: $scope.selectedProperties,
74
+ columnDefs: [{ field: 'id', displayName: $scope.labels.idLabel },
75
+ { field: 'name', displayName: $scope.labels.nameLabel},
76
+ { field: 'type', displayName: $scope.labels.typeLabel}]
77
+ };
78
+ });
79
+
80
+ // Handler for when the value of the type dropdown changes
81
+ $scope.propertyTypeChanged = function() {
82
+
83
+ // Check date. If date, show date pattern
84
+ if ($scope.selectedProperties[0].type === 'date') {
85
+ $scope.selectedProperties[0].datePattern = 'MM-dd-yyyy hh:mm';
86
+ } else {
87
+ delete $scope.selectedProperties[0].datePattern;
88
+ }
89
+
90
+ // Check enum. If enum, show list of options
91
+ if ($scope.selectedProperties[0].type === 'enum') {
92
+ $scope.selectedProperties[0].enumValues = [ {value: 'value 1'}, {value: 'value 2'}];
93
+ } else {
94
+ delete $scope.selectedProperties[0].enumValues;
95
+ }
96
+ };
97
+
98
+ // Click handler for + button after enum value
99
+ var valueIndex = 3;
100
+ $scope.addEnumValue = function(index) {
101
+ $scope.selectedProperties[0].enumValues.splice(index + 1, 0, {value: 'value ' + valueIndex++});
102
+ };
103
+
104
+ // Click handler for - button after enum value
105
+ $scope.removeEnumValue = function(index) {
106
+ $scope.selectedProperties[0].enumValues.splice(index, 1);
107
+ };
108
+
109
+ // Click handler for add button
110
+ var propertyIndex = 1;
111
+ $scope.addNewProperty = function() {
112
+ $scope.formProperties.push({ id : 'new_property_' + propertyIndex++,
113
+ name : '',
114
+ type : 'string',
115
+ readable: true,
116
+ writable: true});
117
+ };
118
+
119
+ // Click handler for remove button
120
+ $scope.removeProperty = function() {
121
+ if ($scope.selectedProperties.length > 0) {
122
+ var index = $scope.formProperties.indexOf($scope.selectedProperties[0]);
123
+ $scope.gridOptions.selectItem(index, false);
124
+ $scope.formProperties.splice(index, 1);
125
+
126
+ $scope.selectedProperties.length = 0;
127
+ if (index < $scope.formProperties.length) {
128
+ $scope.gridOptions.selectItem(index + 1, true);
129
+ } else if ($scope.formProperties.length > 0) {
130
+ $scope.gridOptions.selectItem(index - 1, true);
131
+ }
132
+ }
133
+ };
134
+
135
+ // Click handler for up button
136
+ $scope.movePropertyUp = function() {
137
+ if ($scope.selectedProperties.length > 0) {
138
+ var index = $scope.formProperties.indexOf($scope.selectedProperties[0]);
139
+ if (index != 0) { // If it's the first, no moving up of course
140
+ // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272
141
+ var temp = $scope.formProperties[index];
142
+ $scope.formProperties.splice(index, 1);
143
+ $timeout(function(){
144
+ $scope.formProperties.splice(index + -1, 0, temp);
145
+ }, 100);
146
+
147
+ }
148
+ }
149
+ };
150
+
151
+ // Click handler for down button
152
+ $scope.movePropertyDown = function() {
153
+ if ($scope.selectedProperties.length > 0) {
154
+ var index = $scope.formProperties.indexOf($scope.selectedProperties[0]);
155
+ if (index != $scope.formProperties.length - 1) { // If it's the last element, no moving down of course
156
+ // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272
157
+ var temp = $scope.formProperties[index];
158
+ $scope.formProperties.splice(index, 1);
159
+ $timeout(function(){
160
+ $scope.formProperties.splice(index + 1, 0, temp);
161
+ }, 100);
162
+
163
+ }
164
+ }
165
+ };
166
+
167
+ // Click handler for save button
168
+ $scope.save = function() {
169
+
170
+ if ($scope.formProperties.length > 0) {
171
+ $scope.property.value = {};
172
+ $scope.property.value.formProperties = $scope.formProperties;
173
+ } else {
174
+ $scope.property.value = null;
175
+ }
176
+
177
+ $scope.updatePropertyInModel($scope.property);
178
+ $scope.close();
179
+ };
180
+
181
+ $scope.cancel = function() {
182
+ $scope.$hide();
183
+ $scope.property.mode = 'read';
184
+ };
185
+
186
+ // Close button handler
187
+ $scope.close = function() {
188
+ $scope.$hide();
189
+ $scope.property.mode = 'read';
190
+ };
191
+
192
+ }];
@@ -0,0 +1,158 @@
1
+ /*
2
+ * Activiti Modeler component part of the Activiti project
3
+ * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+ */
19
+
20
+ /*
21
+ * Input parameters for call activity
22
+ */
23
+
24
+ var KisBpmInParametersCtrl = [ '$scope', '$modal', '$timeout', '$translate', function($scope, $modal, $timeout, $translate) {
25
+
26
+ // Config for the modal window
27
+ var opts = {
28
+ template: 'editor-app/configuration/properties/in-parameters-popup.html?version=' + Date.now(),
29
+ scope: $scope
30
+ };
31
+
32
+ // Open the dialog
33
+ $modal(opts);
34
+ }];
35
+
36
+ var KisBpmInParametersPopupCtrl = ['$scope', '$q', '$translate', function($scope, $q, $translate) {
37
+
38
+ // Put json representing form properties on scope
39
+ if ($scope.property.value !== undefined && $scope.property.value !== null
40
+ && $scope.property.value.inParameters !== undefined
41
+ && $scope.property.value.inParameters !== null) {
42
+ // Note that we clone the json object rather then setting it directly,
43
+ // this to cope with the fact that the user can click the cancel button and no changes should have happened
44
+ $scope.parameters = angular.copy($scope.property.value.inParameters);
45
+ } else {
46
+ $scope.parameters = [];
47
+ }
48
+
49
+ // Array to contain selected properties (yes - we only can select one, but ng-grid isn't smart enough)
50
+ $scope.selectedParameters = [];
51
+ $scope.translationsRetrieved = false;
52
+
53
+ $scope.labels = {};
54
+
55
+ var sourcePromise = $translate('PROPERTY.PARAMETER.SOURCE');
56
+ var sourceExpressionPromise = $translate('PROPERTY.PARAMETER.SOURCEEXPRESSION');
57
+ var targetPromise = $translate('PROPERTY.PARAMETER.TARGET');
58
+
59
+ $q.all([sourcePromise, sourceExpressionPromise, targetPromise]).then(function(results) {
60
+ $scope.labels.sourceLabel = results[0];
61
+ $scope.labels.sourceExpressionLabel = results[1];
62
+ $scope.labels.targetLabel = results[2];
63
+ $scope.translationsRetrieved = true;
64
+
65
+ // Config for grid
66
+ $scope.gridOptions = {
67
+ data: 'parameters',
68
+ enableRowReordering: true,
69
+ headerRowHeight: 28,
70
+ multiSelect: false,
71
+ keepLastSelected : false,
72
+ selectedItems: $scope.selectedParameters,
73
+ columnDefs: [{ field: 'source', displayName: $scope.labels.sourceLabel },
74
+ { field: 'sourceExpression', displayName: $scope.labels.sourceExpressionLabel },
75
+ { field: 'target', displayName: $scope.labels.targetLabel }]
76
+ };
77
+ });
78
+
79
+ // Click handler for add button
80
+ $scope.addNewParameter = function() {
81
+ $scope.parameters.push({ source : '',
82
+ sourceExpression : '',
83
+ target : ''});
84
+ };
85
+
86
+ // Click handler for remove button
87
+ $scope.removeParameter = function() {
88
+ if ($scope.selectedParameters.length > 0) {
89
+ var index = $scope.parameters.indexOf($scope.selectedParameters[0]);
90
+ $scope.gridOptions.selectItem(index, false);
91
+ $scope.parameters.splice(index, 1);
92
+
93
+ $scope.selectedParameters.length = 0;
94
+ if (index < $scope.parameters.length) {
95
+ $scope.gridOptions.selectItem(index + 1, true);
96
+ } else if ($scope.parameters.length > 0) {
97
+ $scope.gridOptions.selectItem(index - 1, true);
98
+ }
99
+ }
100
+ };
101
+
102
+ // Click handler for up button
103
+ $scope.moveParameterUp = function() {
104
+ if ($scope.selectedParameters.length > 0) {
105
+ var index = $scope.parameters.indexOf($scope.selectedParameters[0]);
106
+ if (index != 0) { // If it's the first, no moving up of course
107
+ // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272
108
+ var temp = $scope.parameters[index];
109
+ $scope.parameters.splice(index, 1);
110
+ $timeout(function(){
111
+ $scope.parameters.splice(index + -1, 0, temp);
112
+ }, 100);
113
+
114
+ }
115
+ }
116
+ };
117
+
118
+ // Click handler for down button
119
+ $scope.moveParameterDown = function() {
120
+ if ($scope.selectedParameters.length > 0) {
121
+ var index = $scope.parameters.indexOf($scope.selectedParameters[0]);
122
+ if (index != $scope.parameters.length - 1) { // If it's the last element, no moving down of course
123
+ // Reason for funny way of swapping, see https://github.com/angular-ui/ng-grid/issues/272
124
+ var temp = $scope.parameters[index];
125
+ $scope.parameters.splice(index, 1);
126
+ $timeout(function(){
127
+ $scope.parameters.splice(index + 1, 0, temp);
128
+ }, 100);
129
+
130
+ }
131
+ }
132
+ };
133
+
134
+ // Click handler for save button
135
+ $scope.save = function() {
136
+
137
+ if ($scope.parameters.length > 0) {
138
+ $scope.property.value = {};
139
+ $scope.property.value.inParameters = $scope.parameters;
140
+ } else {
141
+ $scope.property.value = null;
142
+ }
143
+
144
+ $scope.updatePropertyInModel($scope.property);
145
+ $scope.close();
146
+ };
147
+
148
+ $scope.cancel = function() {
149
+ $scope.close();
150
+ };
151
+
152
+ // Close button handler
153
+ $scope.close = function() {
154
+ $scope.property.mode = 'read';
155
+ $scope.$hide();
156
+ };
157
+
158
+ }];
@@ -0,0 +1,137 @@
1
+ /*
2
+ * Activiti Modeler component part of the Activiti project
3
+ * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+ */
19
+
20
+ /*
21
+ * Execution listeners
22
+ */
23
+
24
+ angular.module('activitiModeler').controller('ActivitiMessageDefinitionsCtrl', ['$scope', '$modal', function ($scope, $modal) {
25
+
26
+ // Config for the modal window
27
+ var opts = {
28
+ template: 'editor-app/configuration/properties/message-definitions-popup.html?version=' + Date.now(),
29
+ scope: $scope
30
+ };
31
+
32
+ // Open the dialog
33
+ $modal(opts);
34
+ }]);
35
+
36
+ //Need a separate controller for the modal window due to https://github.com/angular-ui/bootstrap/issues/259
37
+ // Will be fixed in a newer version of Angular UI
38
+ angular.module('activitiModeler').controller('ActivitiMessageDefinitionsPopupCtrl',
39
+ ['$scope', '$q', '$translate', '$timeout', function ($scope, $q, $translate, $timeout) {
40
+
41
+ // Put json representing mesage definitions on scope
42
+ if ($scope.property.value !== undefined && $scope.property.value !== null && $scope.property.value.length > 0) {
43
+
44
+ if ($scope.property.value.constructor == String) {
45
+ $scope.messageDefinitions = JSON.parse($scope.property.value);
46
+ }
47
+ else {
48
+ // Note that we clone the json object rather then setting it directly,
49
+ // this to cope with the fact that the user can click the cancel button and no changes should have happened
50
+ $scope.messageDefinitions = angular.copy($scope.property.value);
51
+ }
52
+
53
+ } else {
54
+ $scope.messageDefinitions = [];
55
+ }
56
+
57
+ // Array to contain selected mesage definitions (yes - we only can select one, but ng-grid isn't smart enough)
58
+ $scope.selectedMessages = [];
59
+ $scope.translationsRetrieved = false;
60
+
61
+ $scope.labels = {};
62
+
63
+ var idPromise = $translate('PROPERTY.MESSAGEDEFINITIONS.ID');
64
+ var namePromise = $translate('PROPERTY.MESSAGEDEFINITIONS.NAME');
65
+
66
+ $q.all([idPromise, namePromise]).then(function (results) {
67
+
68
+ $scope.labels.idLabel = results[0];
69
+ $scope.labels.nameLabel = results[1];
70
+ $scope.translationsRetrieved = true;
71
+
72
+ // Config for grid
73
+ $scope.gridOptions = {
74
+ data: 'messageDefinitions',
75
+ headerRowHeight: 28,
76
+ enableRowSelection: true,
77
+ enableRowHeaderSelection: false,
78
+ multiSelect: false,
79
+ keepLastSelected : false,
80
+ selectedItems: $scope.selectedMessages,
81
+ columnDefs: [
82
+ {field: 'id', displayName: $scope.labels.idLabel},
83
+ {field: 'name', displayName: $scope.labels.nameLabel}]
84
+ };
85
+ });
86
+
87
+ // Click handler for add button
88
+ $scope.addNewMessageDefinition = function () {
89
+ var newMessageDefinition = {id: '', name: ''};
90
+
91
+ $scope.messageDefinitions.push(newMessageDefinition);
92
+ $timeout(function () {
93
+ $scope.gridOptions.selectItem($scope.messageDefinitions.length - 1, true);
94
+ });
95
+ };
96
+
97
+ // Click handler for remove button
98
+ $scope.removeMessageDefinition = function () {
99
+ if ($scope.selectedMessages && $scope.selectedMessages.length > 0) {
100
+ var index = $scope.messageDefinitions.indexOf($scope.selectedMessages[0]);
101
+ $scope.gridOptions.selectItem(index, false);
102
+ $scope.messageDefinitions.splice(index, 1);
103
+
104
+ $scope.selectedMessages.length = 0;
105
+ if (index < $scope.messageDefinitions.length) {
106
+ $scope.gridOptions.selectItem(index + 1, true);
107
+ } else if ($scope.messageDefinitions.length > 0) {
108
+ $scope.gridOptions.selectItem(index - 1, true);
109
+ }
110
+ }
111
+ };
112
+
113
+ // Click handler for save button
114
+ $scope.save = function () {
115
+
116
+ if ($scope.messageDefinitions.length > 0) {
117
+ $scope.property.value = $scope.messageDefinitions;
118
+ } else {
119
+ $scope.property.value = null;
120
+ }
121
+
122
+ $scope.updatePropertyInModel($scope.property);
123
+ $scope.close();
124
+ };
125
+
126
+ $scope.cancel = function () {
127
+ $scope.property.mode = 'read';
128
+ $scope.$hide();
129
+ };
130
+
131
+ // Close button handler
132
+ $scope.close = function () {
133
+ $scope.property.mode = 'read';
134
+ $scope.$hide();
135
+ };
136
+
137
+ }]);
@@ -0,0 +1,48 @@
1
+ /*
2
+ * Activiti Modeler component part of the Activiti project
3
+ * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+ */
19
+
20
+ angular.module('activitiModeler').controller('ActivitiMessageRefCtrl', [ '$scope', function($scope) {
21
+
22
+ // Find the parent shape on which the message definitions are defined
23
+ var messageDefinitionsProperty = undefined;
24
+ var parent = $scope.selectedShape;
25
+ while (parent !== null && parent !== undefined && messageDefinitionsProperty === undefined) {
26
+ if (parent.properties && parent.properties['oryx-messagedefinitions']) {
27
+ messageDefinitionsProperty = parent.properties['oryx-messagedefinitions'];
28
+ } else {
29
+ parent = parent.parent;
30
+ }
31
+ }
32
+
33
+ try {
34
+ messageDefinitionsProperty = JSON.parse(messageDefinitionsProperty);
35
+ if (typeof messageDefinitionsProperty == 'string') {
36
+ messageDefinitionsProperty = JSON.parse(messageDefinitionsProperty);
37
+ }
38
+ } catch (err) {
39
+ // Do nothing here, just to be sure we try-catch it
40
+ }
41
+
42
+ $scope.messageDefinitions = messageDefinitionsProperty;
43
+
44
+
45
+ $scope.messageChanged = function() {
46
+ $scope.updatePropertyInModel($scope.property);
47
+ };
48
+ }]);
@@ -0,0 +1,34 @@
1
+ /*
2
+ * Activiti Modeler component part of the Activiti project
3
+ * Copyright 2005-2014 Alfresco Software, Ltd. All rights reserved.
4
+ *
5
+ * This library is free software; you can redistribute it and/or
6
+ * modify it under the terms of the GNU Lesser General Public
7
+ * License as published by the Free Software Foundation; either
8
+ * version 2.1 of the License, or (at your option) any later version.
9
+ *
10
+ * This library is distributed in the hope that it will be useful,
11
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
+ * Lesser General Public License for more details.
14
+
15
+ * You should have received a copy of the GNU Lesser General Public
16
+ * License along with this library; if not, write to the Free Software
17
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
+ */
19
+
20
+ /*
21
+ * Execution listeners
22
+ */
23
+
24
+ var KisBpmMultiInstanceCtrl = [ '$scope', function($scope) {
25
+
26
+ if ($scope.property.value == undefined && $scope.property.value == null)
27
+ {
28
+ $scope.property.value = 'None';
29
+ }
30
+
31
+ $scope.multiInstanceChanged = function() {
32
+ $scope.updatePropertyInModel($scope.property);
33
+ };
34
+ }];