jruby_activiti 1.2.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -1
- data/.ruby-version +1 -1
- data/CHANGELOG +6 -0
- data/Jarfile +5 -0
- data/Jarfile.lock +52 -13
- data/README.md +21 -9
- data/java/build.md +3 -0
- data/java/mapping.md +20 -0
- data/java/pom.xml +30 -0
- data/java/src/main/java/jrubyactiviti/Modeler.java +95 -0
- data/java/src/main/java/jrubyactiviti/ProcessDiagram.java +491 -0
- data/java/src/main/java/jrubyactiviti/ProcessInstanceHighlights.java +237 -0
- data/java/src/main/java/jrubyactiviti/StencilsetResource.java +16 -0
- data/java/src/main/resources/stencilset.json +1339 -0
- data/jruby_activiti.gemspec +3 -2
- data/lib/generators/jruby_activiti/install_generator.rb +4 -0
- data/lib/jar/jrubyactiviti-2.0.jar +0 -0
- data/lib/jruby_activiti/version.rb +1 -1
- data/lib/jruby_activiti/web.rb +81 -0
- data/lib/jruby_activiti.rb +28 -20
- data/test/{base_test.rb → activiti_test.rb} +1 -3
- data/test/instance_hights_test.rb +18 -0
- data/test/modeler_test.rb +35 -0
- data/test/process_diagram_test.rb +33 -0
- data/test/resources/model_init_editor_source.json +1 -0
- data/test/resources/model_json_xml.json +278 -0
- data/test/resources/model_svg_xml.xml +66 -0
- data/test/stencilset_test.rb +7 -0
- data/test/test_helper.rb +2 -0
- data/web/public/diagram-viewer/images/bg.png +0 -0
- data/web/public/diagram-viewer/images/breadcrumbs.png +0 -0
- data/web/public/diagram-viewer/images/checker-bg.png +0 -0
- data/web/public/diagram-viewer/images/deployer/blue/message_catch.png +0 -0
- data/web/public/diagram-viewer/images/deployer/business_rule.png +0 -0
- data/web/public/diagram-viewer/images/deployer/error_catch.png +0 -0
- data/web/public/diagram-viewer/images/deployer/error_throw.png +0 -0
- data/web/public/diagram-viewer/images/deployer/manual.png +0 -0
- data/web/public/diagram-viewer/images/deployer/message_catch.png +0 -0
- data/web/public/diagram-viewer/images/deployer/message_throw.png +0 -0
- data/web/public/diagram-viewer/images/deployer/receive.png +0 -0
- data/web/public/diagram-viewer/images/deployer/script.png +0 -0
- data/web/public/diagram-viewer/images/deployer/send.png +0 -0
- data/web/public/diagram-viewer/images/deployer/service.png +0 -0
- data/web/public/diagram-viewer/images/deployer/signal_catch.png +0 -0
- data/web/public/diagram-viewer/images/deployer/signal_throw.png +0 -0
- data/web/public/diagram-viewer/images/deployer/timer.png +0 -0
- data/web/public/diagram-viewer/images/deployer/user.png +0 -0
- data/web/public/diagram-viewer/index.html +130 -0
- data/web/public/diagram-viewer/js/ActivitiRest.js +74 -0
- data/web/public/diagram-viewer/js/ActivityImpl.js +1 -0
- data/web/public/diagram-viewer/js/Color.js +603 -0
- data/web/public/diagram-viewer/js/LineBreakMeasurer.js +270 -0
- data/web/public/diagram-viewer/js/Polyline.js +387 -0
- data/web/public/diagram-viewer/js/ProcessDiagramCanvas.js +2172 -0
- data/web/public/diagram-viewer/js/ProcessDiagramGenerator.js +1087 -0
- data/web/public/diagram-viewer/js/jquery/jquery.asyncqueue.js +125 -0
- data/web/public/diagram-viewer/js/jquery/jquery.js +9266 -0
- data/web/public/diagram-viewer/js/jquery/jquery.progressbar.js +131 -0
- data/web/public/diagram-viewer/js/jstools.js +23 -0
- data/web/public/diagram-viewer/js/raphael.2.1.1.js +10 -0
- data/web/public/diagram-viewer/js/raphael.js +10 -0
- data/web/public/diagram-viewer/js/raphael_uncompressed.js +5815 -0
- data/web/public/diagram-viewer/js/textlayout.js +441 -0
- data/web/public/diagram-viewer/style.css +1 -0
- data/web/public/editor-app/app-cfg.js +25 -0
- data/web/public/editor-app/app.js +432 -0
- data/web/public/editor-app/configuration/properties/assignment-display-template.html +4 -0
- data/web/public/editor-app/configuration/properties/assignment-popup.html +44 -0
- data/web/public/editor-app/configuration/properties/assignment-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/boolean-property-template.html +4 -0
- data/web/public/editor-app/configuration/properties/condition-expression-display-template.html +2 -0
- data/web/public/editor-app/configuration/properties/condition-expression-popup.html +29 -0
- data/web/public/editor-app/configuration/properties/condition-expression-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/default-value-display-template.html +4 -0
- data/web/public/editor-app/configuration/properties/event-listeners-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/event-listeners-popup.html +115 -0
- data/web/public/editor-app/configuration/properties/event-listeners-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/execution-listeners-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/execution-listeners-popup.html +101 -0
- data/web/public/editor-app/configuration/properties/execution-listeners-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/feedback-popup.html +17 -0
- data/web/public/editor-app/configuration/properties/fields-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/fields-popup.html +61 -0
- data/web/public/editor-app/configuration/properties/fields-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/form-properties-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/form-properties-popup.html +93 -0
- data/web/public/editor-app/configuration/properties/form-properties-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/in-parameters-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/in-parameters-popup.html +53 -0
- data/web/public/editor-app/configuration/properties/in-parameters-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/message-definitions-display-template.html +2 -0
- data/web/public/editor-app/configuration/properties/message-definitions-popup.html +50 -0
- data/web/public/editor-app/configuration/properties/message-definitions-write-template.html +3 -0
- data/web/public/editor-app/configuration/properties/message-property-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/multiinstance-property-write-template.html +8 -0
- data/web/public/editor-app/configuration/properties/out-parameters-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/out-parameters-popup.html +53 -0
- data/web/public/editor-app/configuration/properties/out-parameters-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/sequenceflow-order-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/sequenceflow-order-popup.html +47 -0
- data/web/public/editor-app/configuration/properties/sequenceflow-order-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/signal-definitions-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/signal-definitions-popup.html +58 -0
- data/web/public/editor-app/configuration/properties/signal-definitions-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/signal-property-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/string-property-write-mode-template.html +8 -0
- data/web/public/editor-app/configuration/properties/subprocess-reference-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/subprocess-reference-popup.html +43 -0
- data/web/public/editor-app/configuration/properties/subprocess-reference-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/task-listeners-display-template.html +3 -0
- data/web/public/editor-app/configuration/properties/task-listeners-popup.html +102 -0
- data/web/public/editor-app/configuration/properties/task-listeners-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties/text-popup.html +17 -0
- data/web/public/editor-app/configuration/properties/text-property-write-template.html +4 -0
- data/web/public/editor-app/configuration/properties-assignment-controller.js +150 -0
- data/web/public/editor-app/configuration/properties-condition-expression-controller.js +58 -0
- data/web/public/editor-app/configuration/properties-custom-controllers.js +18 -0
- data/web/public/editor-app/configuration/properties-default-controllers.js +115 -0
- data/web/public/editor-app/configuration/properties-event-listeners-controller.js +266 -0
- data/web/public/editor-app/configuration/properties-execution-listeners-controller.js +326 -0
- data/web/public/editor-app/configuration/properties-fields-controller.js +192 -0
- data/web/public/editor-app/configuration/properties-form-properties-controller.js +192 -0
- data/web/public/editor-app/configuration/properties-in-parameters-controller.js +158 -0
- data/web/public/editor-app/configuration/properties-message-definitions-controller.js +137 -0
- data/web/public/editor-app/configuration/properties-message-scope-controller.js +48 -0
- data/web/public/editor-app/configuration/properties-multiinstance-controller.js +34 -0
- data/web/public/editor-app/configuration/properties-out-parameters-controller.js +158 -0
- data/web/public/editor-app/configuration/properties-sequenceflow-order-controller.js +130 -0
- data/web/public/editor-app/configuration/properties-signal-definitions-controller.js +136 -0
- data/web/public/editor-app/configuration/properties-signal-scope-controller.js +47 -0
- data/web/public/editor-app/configuration/properties-task-listeners-controller.js +325 -0
- data/web/public/editor-app/configuration/properties.js +99 -0
- data/web/public/editor-app/configuration/toolbar-custom-actions.js +18 -0
- data/web/public/editor-app/configuration/toolbar-default-actions.js +429 -0
- data/web/public/editor-app/configuration/toolbar.js +175 -0
- data/web/public/editor-app/configuration/url-config.js +34 -0
- data/web/public/editor-app/css/style-common.css +1518 -0
- data/web/public/editor-app/css/style-editor.css +639 -0
- data/web/public/editor-app/css/style.css +471 -0
- data/web/public/editor-app/editor/css/editor.css +202 -0
- data/web/public/editor-app/editor/i18n/translation_de.js +383 -0
- data/web/public/editor-app/editor/i18n/translation_en_us.js +423 -0
- data/web/public/editor-app/editor/i18n/translation_signavio_de.js +106 -0
- data/web/public/editor-app/editor/i18n/translation_signavio_en_us.js +108 -0
- data/web/public/editor-app/editor/oryx.debug.js +24510 -0
- data/web/public/editor-app/editor/oryx.js +30 -0
- data/web/public/editor-app/editor-config.js +32 -0
- data/web/public/editor-app/editor-controller.js +65 -0
- data/web/public/editor-app/editor-utils.js +135 -0
- data/web/public/editor-app/editor.html +136 -0
- data/web/public/editor-app/eventbus.js +133 -0
- data/web/public/editor-app/fonts/activiti-admin-webfont.eot +0 -0
- data/web/public/editor-app/fonts/activiti-admin-webfont.svg +43 -0
- data/web/public/editor-app/fonts/activiti-admin-webfont.ttf +0 -0
- data/web/public/editor-app/fonts/activiti-admin-webfont.woff +0 -0
- data/web/public/editor-app/fonts/glyphicons-halflings-regular.eot +0 -0
- data/web/public/editor-app/fonts/glyphicons-halflings-regular.svg +229 -0
- data/web/public/editor-app/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/web/public/editor-app/fonts/glyphicons-halflings-regular.woff +0 -0
- data/web/public/editor-app/header-controller.js +31 -0
- data/web/public/editor-app/i18n/en.json +286 -0
- data/web/public/editor-app/images/bpmn-error.png +0 -0
- data/web/public/editor-app/images/bpmn-warning.png +0 -0
- data/web/public/editor-app/images/datadefinition.png +0 -0
- data/web/public/editor-app/images/delete.png +0 -0
- data/web/public/editor-app/images/loading.gif +0 -0
- data/web/public/editor-app/images/logo-2x.png +0 -0
- data/web/public/editor-app/images/logo.png +0 -0
- data/web/public/editor-app/images/nw-handle-dark.gif +0 -0
- data/web/public/editor-app/images/se-handle-dark.gif +0 -0
- data/web/public/editor-app/images/shapemenu_highlight.png +0 -0
- data/web/public/editor-app/images/wrench.png +0 -0
- data/web/public/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js +8 -0
- data/web/public/editor-app/libs/angular-cookies_1.2.13/angular-cookies.min.js.map +8 -0
- data/web/public/editor-app/libs/angular-dragdrop.min-1.0.3.js +9 -0
- data/web/public/editor-app/libs/angular-dragdrop_1.0.7/angular-dragdrop.min.js +29 -0
- data/web/public/editor-app/libs/angular-mocks_1.2.13/angular-mocks.js +2136 -0
- data/web/public/editor-app/libs/angular-resource_1.2.13/angular-resource.js +596 -0
- data/web/public/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js +13 -0
- data/web/public/editor-app/libs/angular-resource_1.2.13/angular-resource.min.js.map +8 -0
- data/web/public/editor-app/libs/angular-route_1.2.13/angular-route.js +921 -0
- data/web/public/editor-app/libs/angular-route_1.2.13/angular-route.min.js +14 -0
- data/web/public/editor-app/libs/angular-route_1.2.13/angular-route.min.js.map +8 -0
- data/web/public/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.js +625 -0
- data/web/public/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js +14 -0
- data/web/public/editor-app/libs/angular-sanitize_1.2.13/angular-sanitize.min.js.map +8 -0
- data/web/public/editor-app/libs/angular-scroll_0.5.7/angular-scroll.min.js +1 -0
- data/web/public/editor-app/libs/angular-strap_2.0.5/angular-strap.min.js +9 -0
- data/web/public/editor-app/libs/angular-strap_2.0.5/angular-strap.tpl.min.js +8 -0
- data/web/public/editor-app/libs/angular-translate-loader-static-files/.bower.json +19 -0
- data/web/public/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.js +31 -0
- data/web/public/editor-app/libs/angular-translate-loader-static-files/angular-translate-loader-static-files.min.js +6 -0
- data/web/public/editor-app/libs/angular-translate-storage-cookie/.bower.json +20 -0
- data/web/public/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.js +19 -0
- data/web/public/editor-app/libs/angular-translate-storage-cookie/angular-translate-storage-cookie.min.js +6 -0
- data/web/public/editor-app/libs/angular-translate_2.4.2/angular-translate.js +960 -0
- data/web/public/editor-app/libs/angular-translate_2.4.2/angular-translate.min.js +6 -0
- data/web/public/editor-app/libs/angular_1.2.13/angular-animate.min.js +27 -0
- data/web/public/editor-app/libs/angular_1.2.13/angular.min.js +204 -0
- data/web/public/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker-bs3.css +267 -0
- data/web/public/editor-app/libs/bootstrap-daterangepicker_1.3.7/daterangepicker.js +1026 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css +347 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.css.map +1 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap-theme.min.css +7 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css +5785 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap.css.map +1 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/css/bootstrap.min.css +7 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.eot +0 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.svg +229 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/fonts/glyphicons-halflings-regular.woff +0 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/js/bootstrap.js +1951 -0
- data/web/public/editor-app/libs/bootstrap_3.1.1/js/bootstrap.min.js +6 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/.bower.json +14 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/.gitignore +2 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/CHANGES +93 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/CONTRIBUTORS.md +25 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/LICENSE +19 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/README.md +161 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-sham.js +444 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-sham.map +1 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-sham.min.js +4 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-shim.js +1314 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-shim.map +1 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/es5-shim.min.js +4 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/package.json +34 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-kill.js +64 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h-matchers.js +34 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/helpers/h.js +3 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/index.html +64 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/index.min.html +63 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine-html.js +190 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.css +166 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine.js +2477 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/jasmine_favicon.png +0 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/lib/json2.js +478 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-array.js +1223 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-date.js +152 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-function.js +147 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-number.js +14 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-object.js +181 -0
- data/web/public/editor-app/libs/es5-shim-15.3.4.5/tests/spec/s-string.js +204 -0
- data/web/public/editor-app/libs/jquery-ui-1.10.3.custom.min.js +6 -0
- data/web/public/editor-app/libs/jquery.autogrow-textarea.js +61 -0
- data/web/public/editor-app/libs/jquery_1.11.0/jquery.js +9789 -0
- data/web/public/editor-app/libs/jquery_1.11.0/jquery.min.js +4 -0
- data/web/public/editor-app/libs/jquery_1.11.0/jquery.min.map +1 -0
- data/web/public/editor-app/libs/json3_3.2.6/LICENSE +20 -0
- data/web/public/editor-app/libs/json3_3.2.6/lib/json3.js +861 -0
- data/web/public/editor-app/libs/json3_3.2.6/lib/json3.min.js +18 -0
- data/web/public/editor-app/libs/momentjs_2.5.1/momentjs.min.js +6 -0
- data/web/public/editor-app/libs/mousetrap-1.4.5.min.js +9 -0
- data/web/public/editor-app/libs/ng-grid-2.0.7-min.js +2 -0
- data/web/public/editor-app/libs/ng-grid-2.0.7.min.css +1 -0
- data/web/public/editor-app/libs/path_parser.js +30 -0
- data/web/public/editor-app/libs/prototype-1.5.1.js +3272 -0
- data/web/public/editor-app/libs/ui-utils.min-0.0.4.js +7 -0
- data/web/public/editor-app/partials/root-stencil-item-template.html +11 -0
- data/web/public/editor-app/partials/stencil-item-template.html +27 -0
- data/web/public/editor-app/plugins.xml +58 -0
- data/web/public/editor-app/popups/icon-template.html +3 -0
- data/web/public/editor-app/popups/save-model.html +41 -0
- data/web/public/editor-app/popups/select-shape.html +20 -0
- data/web/public/editor-app/popups/unsaved-changes.html +22 -0
- data/web/public/editor-app/select-shape-controller.js +314 -0
- data/web/public/editor-app/stencil-controller.js +1421 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.collapsed.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/event.subprocess.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/expanded.subprocess.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.business.rule.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.camel.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.manual.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.mule.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.receive.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.script.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.send.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.service.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.shell.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/list/type.user.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/subprocess.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/activity/task.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/artifact/text.annotation.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/cancel.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/compensation.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/error.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/message.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/signal.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/catching/timer.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/connector/association.undirected.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/connector/association.unidirectional.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/connector/messageflow.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/connector/sequenceflow.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/dataobject/data.store.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/diagram.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/endevent/cancel.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/endevent/error.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/endevent/none.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/endevent/terminate.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/gateway/eventbased.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/gateway/exclusive.databased.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/gateway/inclusive.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/gateway/parallel.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/error.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/message.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/none.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/signal.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/startevent/timer.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/swimlane/lane.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/swimlane/pool.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/throwing/none.png +0 -0
- data/web/public/editor-app/stencilsets/bpmn2.0/icons/throwing/signal.png +0 -0
- data/web/public/editor-app/toolbar-controller.js +162 -0
- data/web/public/modeler.html +140 -0
- data/web/views/models/index.erb +32 -0
- data/web/views/models/new.erb +15 -0
- metadata +334 -10
@@ -0,0 +1,237 @@
|
|
1
|
+
package jrubyactiviti;
|
2
|
+
|
3
|
+
import java.util.ArrayList;
|
4
|
+
import java.util.HashMap;
|
5
|
+
import java.util.LinkedList;
|
6
|
+
import java.util.List;
|
7
|
+
import java.util.Map;
|
8
|
+
|
9
|
+
import org.activiti.engine.HistoryService;
|
10
|
+
import org.activiti.engine.RepositoryService;
|
11
|
+
import org.activiti.engine.RuntimeService;
|
12
|
+
import org.activiti.engine.history.HistoricActivityInstance;
|
13
|
+
import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
|
14
|
+
import org.activiti.engine.impl.pvm.PvmTransition;
|
15
|
+
import org.activiti.engine.impl.pvm.process.ActivityImpl;
|
16
|
+
import org.activiti.engine.runtime.ProcessInstance;
|
17
|
+
|
18
|
+
import com.fasterxml.jackson.databind.ObjectMapper;
|
19
|
+
import com.fasterxml.jackson.databind.node.ArrayNode;
|
20
|
+
import com.fasterxml.jackson.databind.node.ObjectNode;
|
21
|
+
|
22
|
+
public class ProcessInstanceHighlights {
|
23
|
+
private RuntimeService runtimeService;
|
24
|
+
private RepositoryService repositoryService;
|
25
|
+
private HistoryService historyService;
|
26
|
+
|
27
|
+
protected ObjectMapper objectMapper = new ObjectMapper();
|
28
|
+
|
29
|
+
public ProcessInstanceHighlights(RuntimeService runtimeService, RepositoryService repositoryService, HistoryService historyService){
|
30
|
+
this.runtimeService = runtimeService;
|
31
|
+
this.repositoryService = repositoryService;
|
32
|
+
this.historyService = historyService;
|
33
|
+
}
|
34
|
+
|
35
|
+
public ObjectNode getHighlighted(String processInstanceId) {
|
36
|
+
|
37
|
+
ObjectNode responseJSON = objectMapper.createObjectNode();
|
38
|
+
|
39
|
+
responseJSON.put("processInstanceId", processInstanceId);
|
40
|
+
|
41
|
+
ArrayNode activitiesArray = objectMapper.createArrayNode();
|
42
|
+
ArrayNode flowsArray = objectMapper.createArrayNode();
|
43
|
+
|
44
|
+
try {
|
45
|
+
ProcessInstance processInstance = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult();
|
46
|
+
ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) repositoryService.getProcessDefinition(processInstance.getProcessDefinitionId());
|
47
|
+
|
48
|
+
responseJSON.put("processDefinitionId", processInstance.getProcessDefinitionId());
|
49
|
+
|
50
|
+
List<String> highLightedActivities = runtimeService.getActiveActivityIds(processInstanceId);
|
51
|
+
List<String> highLightedFlows = getHighLightedFlows(processDefinition, processInstanceId);
|
52
|
+
|
53
|
+
for (String activityId : highLightedActivities) {
|
54
|
+
activitiesArray.add(activityId);
|
55
|
+
}
|
56
|
+
|
57
|
+
for (String flow : highLightedFlows) {
|
58
|
+
flowsArray.add(flow);
|
59
|
+
}
|
60
|
+
|
61
|
+
} catch (Exception e) {
|
62
|
+
e.printStackTrace();
|
63
|
+
}
|
64
|
+
|
65
|
+
responseJSON.put("activities", activitiesArray);
|
66
|
+
responseJSON.put("flows", flowsArray);
|
67
|
+
|
68
|
+
return responseJSON;
|
69
|
+
}
|
70
|
+
|
71
|
+
|
72
|
+
/**
|
73
|
+
* getHighLightedFlows
|
74
|
+
*
|
75
|
+
* @param processDefinition
|
76
|
+
* @param processInstanceId
|
77
|
+
* @return
|
78
|
+
*/
|
79
|
+
private List<String> getHighLightedFlows(ProcessDefinitionEntity processDefinition, String processInstanceId) {
|
80
|
+
|
81
|
+
List<String> highLightedFlows = new ArrayList<String>();
|
82
|
+
|
83
|
+
List<HistoricActivityInstance> historicActivityInstances = historyService.createHistoricActivityInstanceQuery()
|
84
|
+
.processInstanceId(processInstanceId)
|
85
|
+
//order by startime asc is not correct. use default order is correct.
|
86
|
+
//.orderByHistoricActivityInstanceStartTime().asc()/*.orderByActivityId().asc()*/
|
87
|
+
.list();
|
88
|
+
|
89
|
+
LinkedList<HistoricActivityInstance> hisActInstList = new LinkedList<HistoricActivityInstance>();
|
90
|
+
hisActInstList.addAll(historicActivityInstances);
|
91
|
+
|
92
|
+
getHighlightedFlows(processDefinition.getActivities(), hisActInstList, highLightedFlows);
|
93
|
+
|
94
|
+
return highLightedFlows;
|
95
|
+
}
|
96
|
+
|
97
|
+
/**
|
98
|
+
* getHighlightedFlows
|
99
|
+
*
|
100
|
+
* code logic:
|
101
|
+
* 1. Loop all activities by id asc order;
|
102
|
+
* 2. Check each activity's outgoing transitions and eventBoundery outgoing transitions, if outgoing transitions's destination.id is in other executed activityIds, add this transition to highLightedFlows List;
|
103
|
+
* 3. But if activity is not a parallelGateway or inclusiveGateway, only choose the earliest flow.
|
104
|
+
*
|
105
|
+
* @param activityList
|
106
|
+
* @param hisActInstList
|
107
|
+
* @param highLightedFlows
|
108
|
+
*/
|
109
|
+
private void getHighlightedFlows(List<ActivityImpl> activityList, LinkedList<HistoricActivityInstance> hisActInstList, List<String> highLightedFlows){
|
110
|
+
|
111
|
+
//check out startEvents in activityList
|
112
|
+
List<ActivityImpl> startEventActList = new ArrayList<ActivityImpl>();
|
113
|
+
Map<String, ActivityImpl> activityMap = new HashMap<String, ActivityImpl>(activityList.size());
|
114
|
+
for(ActivityImpl activity : activityList){
|
115
|
+
|
116
|
+
activityMap.put(activity.getId(), activity);
|
117
|
+
|
118
|
+
String actType = (String) activity.getProperty("type");
|
119
|
+
if (actType != null && actType.toLowerCase().indexOf("startevent") >= 0){
|
120
|
+
startEventActList.add(activity);
|
121
|
+
}
|
122
|
+
}
|
123
|
+
|
124
|
+
//These codes is used to avoid a bug:
|
125
|
+
//ACT-1728 If the process instance was started by a callActivity, it will be not have the startEvent activity in ACT_HI_ACTINST table
|
126
|
+
//Code logic:
|
127
|
+
//Check the first activity if it is a startEvent, if not check out the startEvent's highlight outgoing flow.
|
128
|
+
HistoricActivityInstance firstHistActInst = hisActInstList.getFirst();
|
129
|
+
String firstActType = (String) firstHistActInst.getActivityType();
|
130
|
+
if (firstActType != null && firstActType.toLowerCase().indexOf("startevent") < 0){
|
131
|
+
PvmTransition startTrans = getStartTransaction(startEventActList, firstHistActInst);
|
132
|
+
if (startTrans != null){
|
133
|
+
highLightedFlows.add(startTrans.getId());
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
while (!hisActInstList.isEmpty()) {
|
138
|
+
HistoricActivityInstance histActInst = hisActInstList.removeFirst();
|
139
|
+
ActivityImpl activity = activityMap.get(histActInst.getActivityId());
|
140
|
+
if (activity != null) {
|
141
|
+
boolean isParallel = false;
|
142
|
+
String type = histActInst.getActivityType();
|
143
|
+
if ("parallelGateway".equals(type) || "inclusiveGateway".equals(type)){
|
144
|
+
isParallel = true;
|
145
|
+
} else if ("subProcess".equals(histActInst.getActivityType())){
|
146
|
+
getHighlightedFlows(activity.getActivities(), hisActInstList, highLightedFlows);
|
147
|
+
}
|
148
|
+
|
149
|
+
List<PvmTransition> allOutgoingTrans = new ArrayList<PvmTransition>();
|
150
|
+
allOutgoingTrans.addAll(activity.getOutgoingTransitions());
|
151
|
+
allOutgoingTrans.addAll(getBoundaryEventOutgoingTransitions(activity));
|
152
|
+
List<String> activityHighLightedFlowIds = getHighlightedFlows(allOutgoingTrans, hisActInstList, isParallel);
|
153
|
+
highLightedFlows.addAll(activityHighLightedFlowIds);
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
/**
|
159
|
+
* Check out the outgoing transition connected to firstActInst from startEventActList
|
160
|
+
*
|
161
|
+
* @param startEventActList
|
162
|
+
* @param firstActInst
|
163
|
+
* @return
|
164
|
+
*/
|
165
|
+
private PvmTransition getStartTransaction(List<ActivityImpl> startEventActList, HistoricActivityInstance firstActInst){
|
166
|
+
for (ActivityImpl startEventAct: startEventActList) {
|
167
|
+
for (PvmTransition trans : startEventAct.getOutgoingTransitions()) {
|
168
|
+
if (trans.getDestination().getId().equals(firstActInst.getActivityId())) {
|
169
|
+
return trans;
|
170
|
+
}
|
171
|
+
}
|
172
|
+
}
|
173
|
+
return null;
|
174
|
+
}
|
175
|
+
|
176
|
+
/**
|
177
|
+
* getBoundaryEventOutgoingTransitions
|
178
|
+
*
|
179
|
+
* @param activity
|
180
|
+
* @return
|
181
|
+
*/
|
182
|
+
private List<PvmTransition> getBoundaryEventOutgoingTransitions(ActivityImpl activity){
|
183
|
+
List<PvmTransition> boundaryTrans = new ArrayList<PvmTransition>();
|
184
|
+
for(ActivityImpl subActivity : activity.getActivities()){
|
185
|
+
String type = (String)subActivity.getProperty("type");
|
186
|
+
if(type!=null && type.toLowerCase().indexOf("boundary")>=0){
|
187
|
+
boundaryTrans.addAll(subActivity.getOutgoingTransitions());
|
188
|
+
}
|
189
|
+
}
|
190
|
+
return boundaryTrans;
|
191
|
+
}
|
192
|
+
|
193
|
+
/**
|
194
|
+
* find out single activity's highlighted flowIds
|
195
|
+
*
|
196
|
+
* @param activity
|
197
|
+
* @param hisActInstList
|
198
|
+
* @param isExclusive if true only return one flowId(Such as exclusiveGateway, BoundaryEvent On Task)
|
199
|
+
* @return
|
200
|
+
*/
|
201
|
+
private List<String> getHighlightedFlows(List<PvmTransition> pvmTransitionList, LinkedList<HistoricActivityInstance> hisActInstList, boolean isParallel){
|
202
|
+
|
203
|
+
List<String> highLightedFlowIds = new ArrayList<String>();
|
204
|
+
|
205
|
+
PvmTransition earliestTrans = null;
|
206
|
+
HistoricActivityInstance earliestHisActInst = null;
|
207
|
+
|
208
|
+
for (PvmTransition pvmTransition : pvmTransitionList) {
|
209
|
+
|
210
|
+
String destActId = pvmTransition.getDestination().getId();
|
211
|
+
HistoricActivityInstance destHisActInst = findHisActInst(hisActInstList, destActId);
|
212
|
+
if (destHisActInst != null) {
|
213
|
+
if (isParallel) {
|
214
|
+
highLightedFlowIds.add(pvmTransition.getId());
|
215
|
+
} else if (earliestHisActInst == null || (earliestHisActInst.getId().compareTo(destHisActInst.getId()) > 0)) {
|
216
|
+
earliestTrans = pvmTransition;
|
217
|
+
earliestHisActInst = destHisActInst;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
}
|
221
|
+
|
222
|
+
if ((!isParallel) && earliestTrans!=null){
|
223
|
+
highLightedFlowIds.add(earliestTrans.getId());
|
224
|
+
}
|
225
|
+
|
226
|
+
return highLightedFlowIds;
|
227
|
+
}
|
228
|
+
|
229
|
+
private HistoricActivityInstance findHisActInst(LinkedList<HistoricActivityInstance> hisActInstList, String actId){
|
230
|
+
for (HistoricActivityInstance hisActInst : hisActInstList){
|
231
|
+
if (hisActInst.getActivityId().equals(actId)){
|
232
|
+
return hisActInst;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
return null;
|
236
|
+
}
|
237
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
package jrubyactiviti;
|
2
|
+
|
3
|
+
import java.io.InputStream;
|
4
|
+
import org.activiti.engine.ActivitiException;
|
5
|
+
import org.apache.commons.io.IOUtils;
|
6
|
+
|
7
|
+
public class StencilsetResource {
|
8
|
+
public static String getStencilset() {
|
9
|
+
InputStream stencilsetStream = StencilsetResource.class.getClassLoader().getResourceAsStream("stencilset.json");
|
10
|
+
try {
|
11
|
+
return IOUtils.toString(stencilsetStream, "utf-8");
|
12
|
+
} catch (Exception e) {
|
13
|
+
throw new ActivitiException("Error while loading stencil set", e);
|
14
|
+
}
|
15
|
+
}
|
16
|
+
}
|