Datasets:
Add pinned source: camunda-dmn-examples
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/.github/workflows/PR.yml +15 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/.github/workflows/bump-versions.yml +28 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/.github/workflows/main.yml +26 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/.gitignore +21 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/LICENSE +177 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/NOTICE +2 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/README.md +263 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/authentication/basic/README.md +6 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-jsf-form/README.md +5 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/README.md +183 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/invoice.png +3 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/pom.xml +89 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/src/main/java/org/camunda/bpm/example/invoice/service/ArchiveInvoiceService.java +41 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/src/test/java/org/camunda/bpm/quickstart/CreateInvoiceProcessTest.java +112 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/src/test/resources/camunda.cfg.xml +19 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/README.md +25 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/pom.xml +63 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/src/test/java/org/camunda/bpm/example/modelapi/ParseBpmnTest.java +222 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/src/test/resources/process.bpmn +143 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/src/test/resources/process.png +3 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/dataformat/README.md +5 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/loan-granting/README.md +5 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/README.md +146 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/img/deploy-icon.png +3 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/order-handling.bpmn +138 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/pom.xml +55 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/src/main/java/org/camunda/bpm/App.java +83 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/src/main/java/org/camunda/bpm/Invoice.java +35 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cmmn-model-api/typed-custom-elements/README.md +5 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-angular-open-usertasks/README.md +6 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-angularjs-search-processes/README.md +6 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/.gitignore +1 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/README.md +70 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/custom-renderer/CustomRenderer.js +109 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/custom-renderer/index.js +24 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/dist/custom-renderer-module-bundled.js +779 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/package-lock.json +830 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/package.json +32 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/rollup.config.js +27 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/screenshot.png +3 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module/README.md +6 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-cats/README.md +6 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-diagram-interactions/README.md +60 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-diagram-interactions/plugin.js +119 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-diagram-interactions/screenshot.png +3 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/.gitignore +4 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/README.md +510 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/frontend/.babelrc +5 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/frontend/package-lock.json +0 -0
- source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/frontend/package.json +26 -0
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/.github/workflows/PR.yml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: PR
|
| 2 |
+
on:
|
| 3 |
+
pull_request:
|
| 4 |
+
types: [opened, edited, reopened, synchronize]
|
| 5 |
+
|
| 6 |
+
permissions:
|
| 7 |
+
contents: read
|
| 8 |
+
pull-requests: read
|
| 9 |
+
|
| 10 |
+
jobs:
|
| 11 |
+
Validate:
|
| 12 |
+
runs-on: ubuntu-latest
|
| 13 |
+
steps:
|
| 14 |
+
- name: Check PR quality
|
| 15 |
+
uses: bpmn-io/actions/pull-request-quality@dadd26245e7ccf2399bafb558cf2ca29c8b44f9e
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/.github/workflows/bump-versions.yml
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Bump all versions in all examples
|
| 2 |
+
on: workflow_dispatch
|
| 3 |
+
|
| 4 |
+
jobs:
|
| 5 |
+
bump-versions:
|
| 6 |
+
runs-on: ubuntu-latest
|
| 7 |
+
steps:
|
| 8 |
+
- name: Check out repository code
|
| 9 |
+
uses: actions/checkout@v4
|
| 10 |
+
- name: Set up Java environment
|
| 11 |
+
uses: actions/setup-java@v4
|
| 12 |
+
with:
|
| 13 |
+
java-version: '17'
|
| 14 |
+
distribution: 'temurin'
|
| 15 |
+
- name: Run Maven with bump-versions profile
|
| 16 |
+
run: mvn clean package --batch-mode -Pbump-versions
|
| 17 |
+
- name: Create pull request
|
| 18 |
+
uses: peter-evans/create-pull-request@v7
|
| 19 |
+
with:
|
| 20 |
+
commit-message: 'chore(pom): Bump all versions in all examples'
|
| 21 |
+
branch: bump-versions
|
| 22 |
+
delete-branch: true
|
| 23 |
+
title: 'Bump all dependency and Camunda versions'
|
| 24 |
+
body: 'Created by Github action'
|
| 25 |
+
base: master
|
| 26 |
+
env:
|
| 27 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
| 28 |
+
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/.github/workflows/main.yml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Bump versions
|
| 2 |
+
on:
|
| 3 |
+
workflow_dispatch:
|
| 4 |
+
inputs:
|
| 5 |
+
oldVersion:
|
| 6 |
+
description: 'Old Version (search)'
|
| 7 |
+
required: true
|
| 8 |
+
default: '7.X.0'
|
| 9 |
+
newVersion:
|
| 10 |
+
description: 'New Version (replace)'
|
| 11 |
+
required: true
|
| 12 |
+
default: '7.X.0'
|
| 13 |
+
|
| 14 |
+
jobs:
|
| 15 |
+
bump-versions:
|
| 16 |
+
runs-on: ubuntu-latest
|
| 17 |
+
steps:
|
| 18 |
+
- uses: actions/checkout@v2
|
| 19 |
+
- name: Bump versions
|
| 20 |
+
uses: camunda/bump-versions-action@v1.7
|
| 21 |
+
with:
|
| 22 |
+
files: "*/**/package.json,*/**/pom.xml,*/**/README.md"
|
| 23 |
+
sliceVersion: -2
|
| 24 |
+
oldVersion: ${{ github.event.inputs.oldVersion }}
|
| 25 |
+
newVersion: ${{ github.event.inputs.newVersion }}
|
| 26 |
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/.gitignore
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.idea
|
| 2 |
+
target
|
| 3 |
+
.classpath
|
| 4 |
+
.project
|
| 5 |
+
.settings
|
| 6 |
+
build.properties
|
| 7 |
+
bin
|
| 8 |
+
.metadata
|
| 9 |
+
transaction.log
|
| 10 |
+
nbactions*.xml
|
| 11 |
+
nb-configuration.xml
|
| 12 |
+
/webapps/fox-platform-tasklist/server-work
|
| 13 |
+
dependency-reduced-pom.xml
|
| 14 |
+
faces-config.NavData
|
| 15 |
+
dependency-reduced-pom.xml
|
| 16 |
+
*.iml
|
| 17 |
+
*.sublime-project
|
| 18 |
+
*.sublime-workspace
|
| 19 |
+
camunda-h2-default/
|
| 20 |
+
camunda-h2-dbs/
|
| 21 |
+
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/LICENSE
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/NOTICE
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Camunda
|
| 2 |
+
Copyright 2013-2025 Camunda Services GmbH
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/README.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Camunda Platform examples
|
| 2 |
+
====================
|
| 3 |
+
|
| 4 |
+
> Looking for the "invoice" example contained in the distribution? You can find it here: https://github.com/camunda/camunda-bpm-platform/tree/master/examples/invoice
|
| 5 |
+
|
| 6 |
+
Camunda Platform examples is a collection of focused usage examples for the [Camunda Platform](https://github.com/camunda/camunda-bpm-platform), intended to get you started quickly. The sources on the master branch work with the current Camunda release. Follow the links below to browse the examples for the Camunda version you use:
|
| 7 |
+
|
| 8 |
+
| Camunda Version | Link | Checkout command |
|
| 9 |
+
|-----------------|-----------------------------------------------------------------------|-----------------------|
|
| 10 |
+
| Latest | [Master branch](https://github.com/camunda/camunda-bpm-examples) | `git checkout master` |
|
| 11 |
+
| 7.24 | [7.24 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.24) | `git checkout 7.24` |
|
| 12 |
+
| 7.23 | [7.23 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.23) | `git checkout 7.23` |
|
| 13 |
+
| 7.22 | [7.22 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.22) | `git checkout 7.22` |
|
| 14 |
+
| 7.21 | [7.21 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.21) | `git checkout 7.21` |
|
| 15 |
+
| 7.20 | [7.20 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.20) | `git checkout 7.20` |
|
| 16 |
+
| 7.19 | [7.19 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.19) | `git checkout 7.19` |
|
| 17 |
+
| 7.18 | [7.18 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.18) | `git checkout 7.18` |
|
| 18 |
+
| 7.17 | [7.17 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.17) | `git checkout 7.17` |
|
| 19 |
+
| 7.16 | [7.16 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.16) | `git checkout 7.16` |
|
| 20 |
+
| 7.15 | [7.15 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.15) | `git checkout 7.15` |
|
| 21 |
+
| 7.14 | [7.14 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.14) | `git checkout 7.14` |
|
| 22 |
+
| 7.13 | [7.13 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.13) | `git checkout 7.13` |
|
| 23 |
+
| 7.12 | [7.12 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.12) | `git checkout 7.12` |
|
| 24 |
+
| 7.11 | [7.11 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.11) | `git checkout 7.11` |
|
| 25 |
+
| 7.10 | [7.10 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.10) | `git checkout 7.10` |
|
| 26 |
+
| 7.9 | [7.9 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.9) | `git checkout 7.9` |
|
| 27 |
+
| 7.8 | [7.8 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.8) | `git checkout 7.8` |
|
| 28 |
+
| 7.7 | [7.7 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.7) | `git checkout 7.7` |
|
| 29 |
+
| 7.6 | [7.6 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.6) | `git checkout 7.6` |
|
| 30 |
+
| 7.5 | [7.5 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.5) | `git checkout 7.5` |
|
| 31 |
+
| 7.4 | [7.4 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.4) | `git checkout 7.4` |
|
| 32 |
+
| 7.3 | [7.3 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.3) | `git checkout 7.3` |
|
| 33 |
+
| 7.2 | [7.2 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.2) | `git checkout 7.2` |
|
| 34 |
+
| 7.1 | [7.1 tag](https://github.com/camunda/camunda-bpm-examples/tree/7.1) | `git checkout 7.1` |
|
| 35 |
+
|
| 36 |
+
If you clone this repository, use the checkout commands to access the sources for the desired version.
|
| 37 |
+
|
| 38 |
+
## Overview
|
| 39 |
+
|
| 40 |
+
* [Getting Started with Camunda Platform](#getting-started-with-camunda-platform)
|
| 41 |
+
* [BPMN 2.0 & Process Implementation](#bpmn-20--process-implementation-examples)
|
| 42 |
+
* [Deployment & Project Setup](#deployment--project-setup-examples)
|
| 43 |
+
* [Process Engine Plugin](#process-engine-plugin-examples)
|
| 44 |
+
* [Bpmn 2.0 Model API](#bpmn-20-model-api-examples)
|
| 45 |
+
* [Cmmn 1.1 Model API Examples](#cmmn-11-model-api-examples)
|
| 46 |
+
* [Cockpit](#cockpit-examples)
|
| 47 |
+
* [Tasklist](#tasklist-examples)
|
| 48 |
+
* [Multi-Tenancy](#multi-tenancy-examples)
|
| 49 |
+
* [Spin](#spin-examples)
|
| 50 |
+
* [DMN](#dmn-examples)
|
| 51 |
+
* [Process Instance Migration](#process-instance-migration-examples)
|
| 52 |
+
* [SDK-JS Examples](#sdk-js-examples)
|
| 53 |
+
* [Authentication](#authentication)
|
| 54 |
+
* [Spring Boot Starter examples](#spring-boot-starter-examples)
|
| 55 |
+
* [Quarkus Extension Examples](#quarkus-extension-examples)
|
| 56 |
+
* [External Task Client](#external-task-client)
|
| 57 |
+
* [External Task Client Spring](#external-task-client-spring)
|
| 58 |
+
* [External Task Client Spring Boot](#external-task-client-spring-boot)
|
| 59 |
+
* [Testing](#testing)
|
| 60 |
+
|
| 61 |
+
### Getting Started with Camunda Platform
|
| 62 |
+
|
| 63 |
+
| Name | Container |
|
| 64 |
+
|------------------------------------------------------------------------------------------------|--------------------|
|
| 65 |
+
| [Simple Process Applications](https://docs.camunda.org/get-started/bpmn20/) | All |
|
| 66 |
+
| [Camunda Platform and the Spring Framework](https://docs.camunda.org/get-started/spring/) [^1] | Tomcat |
|
| 67 |
+
| [Process Applications with JavaEE 6](https://docs.camunda.org/get-started/javaee6/) [^1] | JavaEE Containers |
|
| 68 |
+
|
| 69 |
+
### BPMN 2.0 & Process Implementation Examples
|
| 70 |
+
|
| 71 |
+
| Name | Container | Keywords |
|
| 72 |
+
|------------------------------------------------------------------------------------------------------------------|-------------------|---------------------------|
|
| 73 |
+
| [Service Task REST HTTP](/servicetask/rest-service) | Unit Test | Rest Scripting, classless |
|
| 74 |
+
| [Service Task SOAP HTTP](/servicetask/soap-service) [^1] | Unit Test | SOAP Scripting, classless |
|
| 75 |
+
| [Service Task SOAP CXF HTTP](/servicetask/soap-cxf-service) [^1] | Unit Test | SOAP, CXF, Spring, Spin |
|
| 76 |
+
| [Service Invocation Synchronous](/servicetask/service-invocation-synchronous) | Unit Test | Java Delegate, Sync |
|
| 77 |
+
| [Service Invocation Asynchronous](/servicetask/service-invocation-asynchronous) | Unit Test | Signal, Async |
|
| 78 |
+
| [User Task Assignment Email](/usertask/task-assignment-email) [^1][^2] | All | Email, Usertask |
|
| 79 |
+
| [User Task Form Embedded](/usertask/task-form-embedded) [^2] | All | Html, Form, Usertask |
|
| 80 |
+
| [User Task Form Embedded - Serialized Java Object](/usertask/task-form-embedded-serialized-java-object) [^1][^2] | All | Html, Form, Usertask |
|
| 81 |
+
| [User Task Form Embedded - JSON](/usertask/task-form-embedded-json-variables) [^2] | All | Html, Form, Usertask |
|
| 82 |
+
| [User Task Form Embedded - Bpmn Elements](/usertask/task-form-embedded-bpmn-events) [^2] | All | Html, Form, Usertask |
|
| 83 |
+
| [User Task Form Embedded - React](/usertask/task-form-embedded-react) [^2] | All | Html, Form, Usertask |
|
| 84 |
+
| [User Task Form - Camunda Forms](/usertask/task-camunda-forms) [^2] | All | Html, Form, Usertask |
|
| 85 |
+
| [User Task Form Generated](/usertask/task-form-generated) [^1][^2] | All | Html, Form, Usertask |
|
| 86 |
+
| [User Task Form JSF](/usertask/task-form-external-jsf) [^1][^2] | JavaEE Containers | JSF, Form, Usertask |
|
| 87 |
+
| [Script Task XSLT](/scripttask/xslt-scripttask) | Unit Test | XSLT Scripttask |
|
| 88 |
+
| [Script Task XQuery](/scripttask/xquery-scripttask) [^1] | Unit Test | XQuery Scripttask |
|
| 89 |
+
| [Start Event - Message](/startevent/message-start) | Unit Test | Message Start Event |
|
| 90 |
+
| [Start Process - SOAP CXF](/startevent/soap-cxf-server-start) [^1] | War | SOAP, CXF, Spring |
|
| 91 |
+
|
| 92 |
+
### Deployment & Project Setup Examples
|
| 93 |
+
|
| 94 |
+
| Name | Container | Keywords |
|
| 95 |
+
|-------------------------------------------------------------------------------------------------|--------------------------|---------------------------|
|
| 96 |
+
| [Process Application - Servlet](deployment/servlet-pa) | Jakarta EE Containers | War, Servlet |
|
| 97 |
+
| [Process Application - EJB](deployment/ejb-pa) [^1] | JavaEE Containers | Ejb, War |
|
| 98 |
+
| [Process Application - Jakarta EJB](deployment/ejb-pa-jakarta) | Jakarta EE Containers | Ejb, War |
|
| 99 |
+
| [Process Application - Spring 6 Servlet - WildFly](deployment/spring-servlet-pa-wildfly) | WildFly | Spring, Servlet, War |
|
| 100 |
+
| [Process Application - Spring 6 Servlet - Embedded Tomcat](deployment/spring-servlet-pa-tomcat) | Tomcat 10 | Spring, Servlet, War |
|
| 101 |
+
| [Embedded Spring 6 with embedded REST](deployment/embedded-spring-rest) | vanilla Apache Tomcat 10 | Spring, Rest, Embedded |
|
| 102 |
+
| [Plain Spring 6 Web application - WildFly](deployment/spring-wildfly-non-pa) | WildFly | Spring, Jndi, War |
|
| 103 |
+
| [Process Application - Spring Boot](deployment/spring-boot) [^1] | Spring Boot | Spring |
|
| 104 |
+
|
| 105 |
+
### Process Engine Plugin Examples
|
| 106 |
+
|
| 107 |
+
| Name | Container | Keywords |
|
| 108 |
+
|-------------------------------------------------------------------------------------------------|----------------------|---------------------------------------------|
|
| 109 |
+
| [BPMN Parse Listener](process-engine-plugin/bpmn-parse-listener) | Unit Test | Process Engine Plugin, Bpmn Parse Listener |
|
| 110 |
+
| [BPMN Parse Listener on User Task](process-engine-plugin/bpmn-parse-listener-on-user-task) [^1] | Unit Test | Process Engine Plugin, Bpmn Parse Listener |
|
| 111 |
+
| [Command Interceptor - Blocking](process-engine-plugin/command-interceptor-blocking) | Unit Test | Maintenance, Interceptor, Configuration |
|
| 112 |
+
| [Custom History Level](process-engine-plugin/custom-history-level) | Unit Test | Process Engine Plugin, Custom History Level |
|
| 113 |
+
| [Failed Job Retry Profile](process-engine-plugin/failed-job-retry-profile) | Unit Test | Process Engine Plugin, Failed Job Retry |
|
| 114 |
+
|
| 115 |
+
### Bpmn 2.0 Model API Examples
|
| 116 |
+
|
| 117 |
+
| Name | Container | Keywords |
|
| 118 |
+
|----------------------------------------------------------------------|----------------------|---------------------------|
|
| 119 |
+
| [Generate JSF forms](/bpmn-model-api/generate-jsf-form) [^1] | JavaEE Containers | JSF, Usertask |
|
| 120 |
+
| [Generate BPMN process](/bpmn-model-api/generate-process-fluent-api) | Unit Test | Fluent API |
|
| 121 |
+
| [Parse BPMN model](/bpmn-model-api/parse-bpmn) | Unit Test | BPMN |
|
| 122 |
+
|
| 123 |
+
### Cmmn 1.1 Model API Examples
|
| 124 |
+
|
| 125 |
+
| Name | Container | Keywords |
|
| 126 |
+
|--------------------------------------------------------------------------------------------------|----------------------|---------------------------|
|
| 127 |
+
| [Strongly-typed Access to Custom Extension Elements](/cmmn-model-api/typed-custom-elements) [^1] | Unit Test | CMMN, TransformListener |
|
| 128 |
+
|
| 129 |
+
### Cockpit Examples
|
| 130 |
+
|
| 131 |
+
| Name | Keywords |
|
| 132 |
+
|----------------------------------------------------------------------------------------------------------------|-------------------------------------------|
|
| 133 |
+
| [Fullstack (ReactJS 16.x & Java) "Count Processes" Cockpit Plugin](/cockpit/cockpit-fullstack-count-processes) | Plugin, Custom Script, Fullstack, ReactJS |
|
| 134 |
+
| [Angular "Open Usertasks" Cockpit Tab](/cockpit/cockpit-angular-open-usertasks) [^1] | Plugin, Custom Script, Angular |
|
| 135 |
+
| [AngularJS 1.x "Search Processes" Cockpit Plugin](/cockpit/cockpit-angularjs-search-processes) [^1] | Plugin, Custom Script, AngularJS |
|
| 136 |
+
| [ReactJS "Involved Users" Cockpit Plugin](/cockpit/cockpit-react-involved-users) | Plugin, Custom Script, ReactJS |
|
| 137 |
+
| ["Cats" Cockpit Plugin](/cockpit/cockpit-cats) [^1] | Plugin, Custom Script |
|
| 138 |
+
| ["Diagram interactions" Cockpit Plugin](/cockpit/cockpit-diagram-interactions) | Plugin, Custom Script |
|
| 139 |
+
| ["Open Incidents" Cockpit Plugin](/cockpit/cockpit-open-incidents) [^1] | Plugin, Custom Script |
|
| 140 |
+
| ["Request Interceptor" Cockpit Script](/cockpit/cockpit-request-interceptor) [^1] | Plugin, Custom Script |
|
| 141 |
+
| [bpmn-js Cockpit module](/cockpit/cockpit-bpmn-js-module) [^1] | Plugin, Custom Script, bpmn-js |
|
| 142 |
+
| [bpmn-js Cockpit module - bundled](/cockpit/cockpit-bpmn-js-module-bundled) | Plugin, Custom Script, bpmn-js, rollup |
|
| 143 |
+
|
| 144 |
+
### Tasklist Examples
|
| 145 |
+
|
| 146 |
+
| Name | Keywords |
|
| 147 |
+
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------|
|
| 148 |
+
| [Create Standalone Task - client side](https://github.com/camunda/camunda-bpm-platform/tree/master/webapps/frontend/ui/tasklist/plugins/standaloneTask/app) | Plugin |
|
| 149 |
+
| [Create Standalone Task - server side](https://github.com/camunda/camunda-bpm-platform/blob/master/webapps/assembly/src/main/java/org/camunda/bpm/tasklist/impl/plugin) | Plugin |
|
| 150 |
+
| [Javascript Only Plugin](/tasklist/cats-plugin) | Plugin, Custom Script |
|
| 151 |
+
| [JQuery 3.4 Behavior Patch](/tasklist/jquery-34-behavior) [^1] | Plugin, Custom Script |
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
### SDK-JS Examples
|
| 155 |
+
|
| 156 |
+
| Name | Environment | Keywords |
|
| 157 |
+
|------------------------------------------------|-------------|-----------------------------|
|
| 158 |
+
| [SDK JS forms](/sdk-js/browser-forms) [^1][^2] | Browser | HTML, task, form, SDK |
|
| 159 |
+
|
| 160 |
+
### Multi-Tenancy Examples
|
| 161 |
+
|
| 162 |
+
| Name | Container | Keywords |
|
| 163 |
+
|----------------------------------------------------------------------------------------------------------------------------|-----------|---------------|
|
| 164 |
+
| [Multi-Tenancy with Database Schema Isolation](multi-tenancy/schema-isolation) | Wildfly | Multi-Tenancy |
|
| 165 |
+
| [Multi-Tenancy with Tenant Identifiers for Embedded Process Engine](multi-tenancy/tenant-identifier-embedded) | Unit Test | Multi-Tenancy |
|
| 166 |
+
| [Multi-Tenancy with Tenant Identifiers for Shared Process Engine](multi-tenancy/tenant-identifier-shared) | All | Multi-Tenancy |
|
| 167 |
+
| [Multi-Tenancy with Tenant Identifiers and Shared Process Definitions](multi-tenancy/tenant-identifier-shared-definitions) | Unit Test | Multi-Tenancy |
|
| 168 |
+
|
| 169 |
+
### Spin Examples
|
| 170 |
+
|
| 171 |
+
| Name | Container | Keywords |
|
| 172 |
+
|------------------------------------------------------------------------------------------------------------------------------------------------|--------------------|------------------------------------|
|
| 173 |
+
| [Global Data Format Configuration to Customize JSON serialization](spin/dataformat-configuration-global) | Unit Test | Spin, Configuration |
|
| 174 |
+
| [Process-Application-Specific Data Format Configuration to Customize JSON serialization](spin/dataformat-configuration-in-process-application) | Application Server | Spin, Configuration, Shared Engine |
|
| 175 |
+
|
| 176 |
+
### DMN Examples
|
| 177 |
+
|
| 178 |
+
| Name | Container | Keywords |
|
| 179 |
+
|---------------------------------------------------------------------------------------|-----------|-----------------|
|
| 180 |
+
| [Embed Decision Engine - Dish Decision Maker](dmn-engine/dmn-engine-java-main-method) | Jar | DMN, Embed |
|
| 181 |
+
| [Decision Requirements Graph(DRG) Example](dmn-engine/dmn-engine-drg) | Jar | DMN, DRG, Embed |
|
| 182 |
+
|
| 183 |
+
### Process Instance Migration Examples
|
| 184 |
+
|
| 185 |
+
| Name | Container | Keywords |
|
| 186 |
+
|-----------------------------------------------------------------------------------|---------------------------------------|-----------------|
|
| 187 |
+
| [Migration on Deployment of New Process Version](migration/migrate-on-deployment) | Application Server with Shared Engine | BPMN, Migration |
|
| 188 |
+
|
| 189 |
+
### Authentication
|
| 190 |
+
|
| 191 |
+
| Name | Container | Keywords |
|
| 192 |
+
|---------------------------------------------------|----------------------------------------------------------------------------|-------------------------|
|
| 193 |
+
| [Basic Authentication](authentication/basic) [^1] | Spring boot with embedded engine, REST API and Basic Authentication filter | Authentication |
|
| 194 |
+
|
| 195 |
+
### Spring Boot Starter examples
|
| 196 |
+
|
| 197 |
+
| Name | Container | Keywords |
|
| 198 |
+
|-------------------------------------------------------------------|--------------------------------------------------------|---------------------------------------|
|
| 199 |
+
| [Plain Camunda Engine](spring-boot-starter/example-simple) | Jar | Spring Boot Starter |
|
| 200 |
+
| [Webapps](spring-boot-starter/example-webapp) | Spring boot with embedded engine and Webapps | Spring Boot Starter, Webapps |
|
| 201 |
+
| [Webapps EE](spring-boot-starter/example-webapp-ee) | Spring boot with embedded engine and Webapps | Spring Boot Starter, Webapps |
|
| 202 |
+
| [REST API](spring-boot-starter/example-web) | Spring boot with embedded engine and Webapps | Spring Boot Starter, REST API |
|
| 203 |
+
| [Twitter](spring-boot-starter/example-twitter) | Spring boot with embedded engine and Webapps | Spring Boot Starter, Webapps, Twitter |
|
| 204 |
+
| [Camunda Invoice Example](spring-boot-starter/example-invoice) | Spring boot with embedded engine, Webapps and Rest API | Spring Boot Starter, REST API |
|
| 205 |
+
| [Autodeployment](spring-boot-starter/example-autodeployment) [^1] | Spring boot with embedded engine and Webapps | Spring Boot Starter |
|
| 206 |
+
| [REST API DMN](spring-boot-starter/example-dmn-rest) [^1] | Spring boot with embedded engine and Webapps | Spring Boot Starter, REST API |
|
| 207 |
+
|
| 208 |
+
### Quarkus Extension Examples
|
| 209 |
+
|
| 210 |
+
| Name | Container | Keywords |
|
| 211 |
+
|-------------------------------------------------------------------|----------------------------------------------------------------------------|-------------------------|
|
| 212 |
+
| [Datasource Example](quarkus-extension/datasource-example) | Uber-Jar | Quarkus Extension |
|
| 213 |
+
| [Spin Plugin Example](quarkus-extension/spin-plugin-example) | Uber-Jar | Quarkus Extension |
|
| 214 |
+
| [Simple REST Example](quarkus-extension/simple-rest-example) [^1] | Uber-Jar | Quarkus Extension |
|
| 215 |
+
|
| 216 |
+
### External Task Client
|
| 217 |
+
|
| 218 |
+
| Name | Environment | Keywords |
|
| 219 |
+
|------------------------------------------------------------------------------------------------------------------------------|-------------------------------------|-----------------------------------|
|
| 220 |
+
| [Order Handling - Java](./clients/java/order-handling) | Java External Task Client | External Task Client, Servicetask |
|
| 221 |
+
| [Loan Granting - Java](./clients/java/loan-granting) [^1] | Java External Task Client | External Task Client, Servicetask |
|
| 222 |
+
| [Dataformat - Java](./clients/java/dataformat) [^1] | Java External Task Client | External Task Client, Servicetask |
|
| 223 |
+
| [Loan Granting - JavaScript](https://github.com/camunda/camunda-external-task-client-js/tree/master/examples/granting-loans) | JavaScript External Task Client | External Task Client, Servicetask |
|
| 224 |
+
| [Order Handling - JavaScript](https://github.com/camunda/camunda-external-task-client-js/tree/master/examples/order) | JavaScript External Task Client | External Task Client, Servicetask |
|
| 225 |
+
|
| 226 |
+
### External Task Client Spring
|
| 227 |
+
|
| 228 |
+
| Name | Keywords |
|
| 229 |
+
|------------------------------------------------------------------------------------------------|-----------------------------------|
|
| 230 |
+
| [Loan Granting Example](./spring-boot-starter/external-task-client/loan-granting-spring) [^1] | External Task Client, Servicetask |
|
| 231 |
+
|
| 232 |
+
### External Task Client Spring Boot
|
| 233 |
+
|
| 234 |
+
| Name | Container | Keywords |
|
| 235 |
+
|---------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------|--------------------------------------------------------|
|
| 236 |
+
| [Loan Granting w/ REST API & Webapp Example](./spring-boot-starter/external-task-client/loan-granting-spring-boot-webapp) | Spring Boot with embedded Client, REST API & Webapp | External Task Client, Servicetask, Spring Boot Starter |
|
| 237 |
+
| [Order Handling Example](./spring-boot-starter/external-task-client/order-handling-spring-boot) [^1] | Spring Boot with embedded Client | External Task Client, Servicetask, Spring Boot Starter |
|
| 238 |
+
| [Request Interceptor Example](./spring-boot-starter/external-task-client/request-interceptor-spring-boot) [^1] | Spring Boot with embedded Client | External Task Client, Servicetask, Spring Boot Starter |
|
| 239 |
+
|
| 240 |
+
### Container Specifics
|
| 241 |
+
|
| 242 |
+
| Name | Container | Keywords |
|
| 243 |
+
|-----------------------------------------------------------------------|-----------|--------------|
|
| 244 |
+
| [Jackson Annotation Example for WildFly](wildfly/jackson-annotations) | Wildfly | War, Servlet |
|
| 245 |
+
|
| 246 |
+
### Testing
|
| 247 |
+
|
| 248 |
+
| Name | Keywords |
|
| 249 |
+
|------------------------------------------------------------------------------------------------------|--------------------------|
|
| 250 |
+
| [Assert](testing/assert/job-announcement-publication-process) | Testing, Junit 4, Assert |
|
| 251 |
+
| [Assert and JUnit 5](testing/junit5/camunda-bpm-junit-assert/) | Testing, Junit 5, Assert |
|
| 252 |
+
| [Assert and Junit 5: configure a custom process engine](testing/junit5/camunda-bpm-junit-use-engine) | Testing, Junit 5, Assert |
|
| 253 |
+
|
| 254 |
+
## Contributing
|
| 255 |
+
|
| 256 |
+
Have a look at our [contribution guide](https://github.com/camunda/camunda-bpm-platform/blob/master/CONTRIBUTING.md) for how to contribute to this repository.
|
| 257 |
+
|
| 258 |
+
## License
|
| 259 |
+
The source files in this repository are made available under the [Apache License Version 2.0](./LICENSE).
|
| 260 |
+
|
| 261 |
+
[^1]: _This example is not actively maintained anymore._
|
| 262 |
+
|
| 263 |
+
[^2]: _Complete demo applications_
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/authentication/basic/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Basic authentication against embedded engine example
|
| 2 |
+
======================================================
|
| 3 |
+
|
| 4 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/authentication/basic).
|
| 5 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 6 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-jsf-form/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Generate JSF forms with the BPMN model API
|
| 2 |
+
|
| 3 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/bpmn-model-api/generate-jsf-form).
|
| 4 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 5 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Create process with fluent BPMN model API
|
| 2 |
+
|
| 3 |
+
This quickstart demonstrates how to create a process with the BPMN model API. We
|
| 4 |
+
will even learn how to create complex BPMN processes with the fluent builder API of the
|
| 5 |
+
BPMN model API.
|
| 6 |
+
|
| 7 |
+
After this quickstart, you will be able to create processes with the
|
| 8 |
+
BPMN model API, composed of the following elements:
|
| 9 |
+
|
| 10 |
+
* Start event
|
| 11 |
+
* End event
|
| 12 |
+
* Parallel gateway
|
| 13 |
+
* Exclusive gateway
|
| 14 |
+
* Service task
|
| 15 |
+
* User task
|
| 16 |
+
* Script task
|
| 17 |
+
|
| 18 |
+
## Invoice example process
|
| 19 |
+
|
| 20 |
+
The process we want to create is similar to the invoice process from the [camunda-bpm-platform/examples][1].
|
| 21 |
+
We aim to file it again with the executable process definition of the depicted invoice process.
|
| 22 |
+
|
| 23 |
+
![Invoice Process][3]
|
| 24 |
+
|
| 25 |
+
## Create the process with the BPMN model API
|
| 26 |
+
|
| 27 |
+
Have a look at the JUnit test [CreateInvoiceProcessTest][4] for an example on how to create a BPMN process by using the BPMN model API.
|
| 28 |
+
|
| 29 |
+
The entry point for the fluent builder API is the `Bpmn.createProcess()` method. To finish the
|
| 30 |
+
building process we can call the `.done()` method at any time, which will return the
|
| 31 |
+
created model instance containing the process.
|
| 32 |
+
|
| 33 |
+
```java
|
| 34 |
+
BpmnModelInstance modelInstance = Bpmn.createProcess()
|
| 35 |
+
.[...]
|
| 36 |
+
.done();
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
After calling `Bpmn.createProcess()`, we can set attributes for the process. For example, we can set the name.
|
| 40 |
+
|
| 41 |
+
```java
|
| 42 |
+
BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("invoice")
|
| 43 |
+
.name("BPMN API Invoice Process")
|
| 44 |
+
.[...]
|
| 45 |
+
.done();
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
The next step is to create a start event and set its attributes. In this example we set
|
| 49 |
+
a name.
|
| 50 |
+
|
| 51 |
+
```java
|
| 52 |
+
BpmnModelInstance modelInstance = Bpmn.createExecutableProcess()
|
| 53 |
+
.name("BPMN API Invoice Process")
|
| 54 |
+
.startEvent()
|
| 55 |
+
.name("Invoice received")
|
| 56 |
+
.[...]
|
| 57 |
+
.done();
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
From now on we can create user, service or script tasks and parallel or exclusive gateways to
|
| 61 |
+
model the process we want to create. For every task we can set attributes like the `id`, `name`, `camunda:formKey`,
|
| 62 |
+
`camunda:assignee`, `camunda:class`, `camunda:candidateUsers` or `camunda:candidateGroups`.
|
| 63 |
+
|
| 64 |
+
```java
|
| 65 |
+
BpmnModelInstance modelInstance = Bpmn.createExecutableProcess()
|
| 66 |
+
.name("BPMN API Invoice Process")
|
| 67 |
+
.[...]
|
| 68 |
+
.userTask()
|
| 69 |
+
.name("Assign Approver")
|
| 70 |
+
.camundaAssignee("demo")
|
| 71 |
+
.userTask()
|
| 72 |
+
.id("approveInvoice")
|
| 73 |
+
.name("Approve Invoice")
|
| 74 |
+
.[...]
|
| 75 |
+
.userTask()
|
| 76 |
+
.name("Prepare Bank Transfer")
|
| 77 |
+
.camundaCandidateGroups("accounting")
|
| 78 |
+
.serviceTask()
|
| 79 |
+
.name("Archive Invoice")
|
| 80 |
+
.camundaClass("org.camunda.bpm.example.invoice.service.ArchiveInvoiceService")
|
| 81 |
+
.[...]
|
| 82 |
+
.done();
|
| 83 |
+
```
|
| 84 |
+
|
| 85 |
+
Gateways are also flow nodes which we can add after every task. We can set the
|
| 86 |
+
gateway direction and conditions for outgoing sequence flows on exclusive gateways.
|
| 87 |
+
|
| 88 |
+
```java
|
| 89 |
+
BpmnModelInstance modelInstance = Bpmn.createExecutableProcess()
|
| 90 |
+
.name("BPMN API Invoice Process")
|
| 91 |
+
.[...]
|
| 92 |
+
.userTask()
|
| 93 |
+
.id("approveInvoice")
|
| 94 |
+
.name("Approve Invoice")
|
| 95 |
+
.exclusiveGateway()
|
| 96 |
+
.name("Invoice approved?")
|
| 97 |
+
.gatewayDirection(GatewayDirection.Diverging)
|
| 98 |
+
.condition("yes", "${approved}")
|
| 99 |
+
.userTask()
|
| 100 |
+
.name("Prepare Bank Transfer")
|
| 101 |
+
.camundaCandidateGroups("accounting")
|
| 102 |
+
.[...]
|
| 103 |
+
.done();
|
| 104 |
+
```
|
| 105 |
+
|
| 106 |
+
If we add a gateway, we usually want to create parallel execution paths. To create this,
|
| 107 |
+
the pattern is the following:
|
| 108 |
+
|
| 109 |
+
1. Create a gateway (optionally set an ID)
|
| 110 |
+
2. Create the first execution path till another gateway or end event
|
| 111 |
+
3. Jump back to a gateway to create a new execution path
|
| 112 |
+
1. Jump back to the last unique gateway with the method `.moveToLastGateway()`, or
|
| 113 |
+
2. Jump to a specific gateway by ID with the method `.moveToNode(gatewayId)`
|
| 114 |
+
|
| 115 |
+
```java
|
| 116 |
+
BpmnModelInstance modelInstance = Bpmn.createExecutableProcess()
|
| 117 |
+
.name("BPMN API Invoice Process")
|
| 118 |
+
.[...]
|
| 119 |
+
.exclusiveGateway()
|
| 120 |
+
.name("Invoice approved?")
|
| 121 |
+
.gatewayDirection(GatewayDirection.Diverging)
|
| 122 |
+
.condition("yes", "${approved}")
|
| 123 |
+
.userTask()
|
| 124 |
+
.name("Prepare Bank Transfer")
|
| 125 |
+
.camundaCandidateGroups("accounting")
|
| 126 |
+
.serviceTask()
|
| 127 |
+
.name("Archive Invoice")
|
| 128 |
+
.camundaClass("org.camunda.bpm.example.invoice.service.ArchiveInvoiceService")
|
| 129 |
+
.endEvent()
|
| 130 |
+
.name("Invoice processed")
|
| 131 |
+
.moveToLastGateway()
|
| 132 |
+
.condition("no", "${!approved}")
|
| 133 |
+
.userTask()
|
| 134 |
+
.name("Review Invoice")
|
| 135 |
+
.camundaAssignee("demo")
|
| 136 |
+
.[...]
|
| 137 |
+
.done();
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
When we create parallel and diverging execution paths it is a common use case to
|
| 141 |
+
connect an execution path to an existing element such as a parallel
|
| 142 |
+
gateway (join) or a previous element in the process (loop). You can achieve that with the
|
| 143 |
+
`.connectTo(id)` method.
|
| 144 |
+
|
| 145 |
+
```java
|
| 146 |
+
BpmnModelInstance modelInstance = Bpmn.createExecutableProcess()
|
| 147 |
+
.name("BPMN API Invoice Process")
|
| 148 |
+
.[...]
|
| 149 |
+
.userTask()
|
| 150 |
+
.id("approveInvoice")
|
| 151 |
+
.name("Approve Invoice")
|
| 152 |
+
.camundaAssignee("${approver}")
|
| 153 |
+
.[...]
|
| 154 |
+
.exclusiveGateway()
|
| 155 |
+
.name("Review successful?")
|
| 156 |
+
.gatewayDirection(GatewayDirection.Diverging)
|
| 157 |
+
.condition("no", "${!clarified}")
|
| 158 |
+
.endEvent()
|
| 159 |
+
.name("Invoice not processed")
|
| 160 |
+
.moveToLastGateway()
|
| 161 |
+
.condition("yes", "${clarified}")
|
| 162 |
+
.connectTo("approveInvoice")
|
| 163 |
+
.done();
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
## How to use it?
|
| 167 |
+
|
| 168 |
+
1. Checkout the project with Git
|
| 169 |
+
2. Import the project into your IDE
|
| 170 |
+
3. Inspect the sources and run the unit test
|
| 171 |
+
4. Check if the JUnit test is green
|
| 172 |
+
|
| 173 |
+
Note: Please note that since the process is generated by our code, no DI information is contained. If you want to see the
|
| 174 |
+
process model XML, go to the end of the JUnit test [CreateInvoiceProcessTest][4] and uncomment the following line of code.
|
| 175 |
+
|
| 176 |
+
```java
|
| 177 |
+
Bpmn.writeModelToStream(System.out, modelInstance);
|
| 178 |
+
```
|
| 179 |
+
|
| 180 |
+
[1]: https://github.com/camunda/camunda-bpm-platform/tree/master/examples/invoice
|
| 181 |
+
[3]: invoice.png
|
| 182 |
+
[4]: src/test/java/org/camunda/bpm/quickstart/CreateInvoiceProcessTest.java
|
| 183 |
+
[5]: https://github.com/camunda/camunda-bpm-platform/tree/master/model-api/bpmn-model
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/invoice.png
ADDED
|
Git LFS Details
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/pom.xml
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
| 2 |
+
<modelVersion>4.0.0</modelVersion>
|
| 3 |
+
<groupId>org.camunda.bpm.quickstart</groupId>
|
| 4 |
+
<artifactId>camunda-quickstart-create-invoice-process</artifactId>
|
| 5 |
+
<packaging>war</packaging>
|
| 6 |
+
<name>Create Invoice Process</name>
|
| 7 |
+
<version>1.0-SNAPSHOT</version>
|
| 8 |
+
|
| 9 |
+
<properties>
|
| 10 |
+
<version.camunda>7.24.0</version.camunda>
|
| 11 |
+
<version.junit>4.13.2</version.junit>
|
| 12 |
+
<version.h2>2.3.232</version.h2>
|
| 13 |
+
<version.slf4j>1.7.36</version.slf4j>
|
| 14 |
+
|
| 15 |
+
<!-- maven -->
|
| 16 |
+
<maven.compiler.release>17</maven.compiler.release>
|
| 17 |
+
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
|
| 18 |
+
<maven.war.plugin.version>3.4.0</maven.war.plugin.version>
|
| 19 |
+
|
| 20 |
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
| 21 |
+
<failOnMissingWebXml>false</failOnMissingWebXml>
|
| 22 |
+
</properties>
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
<dependencyManagement>
|
| 26 |
+
<dependencies>
|
| 27 |
+
<dependency>
|
| 28 |
+
<groupId>org.camunda.bpm</groupId>
|
| 29 |
+
<artifactId>camunda-bom</artifactId>
|
| 30 |
+
<version>${version.camunda}</version>
|
| 31 |
+
<type>pom</type>
|
| 32 |
+
<scope>import</scope>
|
| 33 |
+
</dependency>
|
| 34 |
+
</dependencies>
|
| 35 |
+
</dependencyManagement>
|
| 36 |
+
|
| 37 |
+
<dependencies>
|
| 38 |
+
|
| 39 |
+
<dependency>
|
| 40 |
+
<groupId>org.camunda.bpm</groupId>
|
| 41 |
+
<artifactId>camunda-engine</artifactId>
|
| 42 |
+
<scope>provided</scope>
|
| 43 |
+
</dependency>
|
| 44 |
+
|
| 45 |
+
<dependency>
|
| 46 |
+
<groupId>org.camunda.bpm.model</groupId>
|
| 47 |
+
<artifactId>camunda-bpmn-model</artifactId>
|
| 48 |
+
</dependency>
|
| 49 |
+
|
| 50 |
+
<dependency>
|
| 51 |
+
<groupId>junit</groupId>
|
| 52 |
+
<artifactId>junit</artifactId>
|
| 53 |
+
<version>${version.junit}</version>
|
| 54 |
+
<scope>test</scope>
|
| 55 |
+
</dependency>
|
| 56 |
+
|
| 57 |
+
<dependency>
|
| 58 |
+
<groupId>com.h2database</groupId>
|
| 59 |
+
<artifactId>h2</artifactId>
|
| 60 |
+
<version>${version.h2}</version>
|
| 61 |
+
<scope>test</scope>
|
| 62 |
+
</dependency>
|
| 63 |
+
|
| 64 |
+
<!-- redirect slf4j logging to jdk logging -->
|
| 65 |
+
<dependency>
|
| 66 |
+
<groupId>org.slf4j</groupId>
|
| 67 |
+
<artifactId>slf4j-jdk14</artifactId>
|
| 68 |
+
<version>${version.slf4j}</version>
|
| 69 |
+
</dependency>
|
| 70 |
+
|
| 71 |
+
</dependencies>
|
| 72 |
+
|
| 73 |
+
<build>
|
| 74 |
+
<plugins>
|
| 75 |
+
<plugin>
|
| 76 |
+
<artifactId>maven-compiler-plugin</artifactId>
|
| 77 |
+
<version>${maven.compiler.plugin.version}</version>
|
| 78 |
+
</plugin>
|
| 79 |
+
<plugin>
|
| 80 |
+
<artifactId>maven-war-plugin</artifactId>
|
| 81 |
+
<version>${maven.war.plugin.version}</version>
|
| 82 |
+
<configuration>
|
| 83 |
+
<failOnMissingWebXml>false</failOnMissingWebXml>
|
| 84 |
+
</configuration>
|
| 85 |
+
</plugin>
|
| 86 |
+
</plugins>
|
| 87 |
+
</build>
|
| 88 |
+
|
| 89 |
+
</project>
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/src/main/java/org/camunda/bpm/example/invoice/service/ArchiveInvoiceService.java
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.example.invoice.service;
|
| 18 |
+
|
| 19 |
+
import java.util.logging.Logger;
|
| 20 |
+
|
| 21 |
+
import org.camunda.bpm.engine.delegate.DelegateExecution;
|
| 22 |
+
import org.camunda.bpm.engine.delegate.JavaDelegate;
|
| 23 |
+
|
| 24 |
+
/**
|
| 25 |
+
* <p>This is an empty service implementation illustrating how to use a plain
|
| 26 |
+
* Java Class as a BPMN 2.0 Service Task delegate.</p>
|
| 27 |
+
*/
|
| 28 |
+
public class ArchiveInvoiceService implements JavaDelegate {
|
| 29 |
+
|
| 30 |
+
private final Logger LOGGER = Logger.getLogger(ArchiveInvoiceService.class.getName());
|
| 31 |
+
|
| 32 |
+
public static boolean wasExecuted=false;
|
| 33 |
+
|
| 34 |
+
public void execute(DelegateExecution execution) throws Exception {
|
| 35 |
+
|
| 36 |
+
wasExecuted = true;
|
| 37 |
+
LOGGER.info("\n\n ... Now archiving invoice \n\n");
|
| 38 |
+
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/src/test/java/org/camunda/bpm/quickstart/CreateInvoiceProcessTest.java
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.quickstart;
|
| 18 |
+
|
| 19 |
+
import java.util.HashMap;
|
| 20 |
+
import java.util.Map;
|
| 21 |
+
|
| 22 |
+
import org.camunda.bpm.engine.task.TaskQuery;
|
| 23 |
+
import org.camunda.bpm.engine.test.ProcessEngineRule;
|
| 24 |
+
import org.camunda.bpm.example.invoice.service.ArchiveInvoiceService;
|
| 25 |
+
import org.camunda.bpm.model.bpmn.Bpmn;
|
| 26 |
+
import org.camunda.bpm.model.bpmn.BpmnModelInstance;
|
| 27 |
+
import org.camunda.bpm.model.bpmn.GatewayDirection;
|
| 28 |
+
import org.junit.Rule;
|
| 29 |
+
import org.junit.Test;
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* @author Sebastian Menski
|
| 33 |
+
*/
|
| 34 |
+
public class CreateInvoiceProcessTest {
|
| 35 |
+
|
| 36 |
+
@Rule
|
| 37 |
+
public ProcessEngineRule processEngine = new ProcessEngineRule();
|
| 38 |
+
|
| 39 |
+
@Test
|
| 40 |
+
public void testCreateInvoiceProcess() throws Exception {
|
| 41 |
+
BpmnModelInstance modelInstance = Bpmn.createExecutableProcess("invoice")
|
| 42 |
+
.camundaHistoryTimeToLive(180)
|
| 43 |
+
.name("BPMN API Invoice Process")
|
| 44 |
+
.startEvent()
|
| 45 |
+
.name("Invoice received")
|
| 46 |
+
.userTask()
|
| 47 |
+
.name("Assign Approver")
|
| 48 |
+
.camundaAssignee("demo")
|
| 49 |
+
.userTask()
|
| 50 |
+
.id("approveInvoice")
|
| 51 |
+
.name("Approve Invoice")
|
| 52 |
+
.exclusiveGateway()
|
| 53 |
+
.name("Invoice approved?")
|
| 54 |
+
.gatewayDirection(GatewayDirection.Diverging)
|
| 55 |
+
.condition("yes", "${approved}")
|
| 56 |
+
.userTask()
|
| 57 |
+
.name("Prepare Bank Transfer")
|
| 58 |
+
.camundaFormKey("embedded:app:forms/prepare-bank-transfer.html")
|
| 59 |
+
.camundaCandidateGroups("accounting")
|
| 60 |
+
.serviceTask()
|
| 61 |
+
.name("Archive Invoice")
|
| 62 |
+
.camundaClass("org.camunda.bpm.example.invoice.service.ArchiveInvoiceService")
|
| 63 |
+
.endEvent()
|
| 64 |
+
.name("Invoice processed")
|
| 65 |
+
.moveToLastGateway()
|
| 66 |
+
.condition("no", "${!approved}")
|
| 67 |
+
.userTask()
|
| 68 |
+
.name("Review Invoice")
|
| 69 |
+
.camundaAssignee("demo")
|
| 70 |
+
.exclusiveGateway()
|
| 71 |
+
.name("Review successful?")
|
| 72 |
+
.gatewayDirection(GatewayDirection.Diverging)
|
| 73 |
+
.condition("no", "${!clarified}")
|
| 74 |
+
.endEvent()
|
| 75 |
+
.name("Invoice not processed")
|
| 76 |
+
.moveToLastGateway()
|
| 77 |
+
.condition("yes", "${clarified}")
|
| 78 |
+
.connectTo("approveInvoice")
|
| 79 |
+
.done();
|
| 80 |
+
|
| 81 |
+
// deploy process model
|
| 82 |
+
processEngine.getRepositoryService().createDeployment().addModelInstance("invoice.bpmn", modelInstance).deploy();
|
| 83 |
+
|
| 84 |
+
// start process model
|
| 85 |
+
processEngine.getRuntimeService().startProcessInstanceByKey("invoice");
|
| 86 |
+
|
| 87 |
+
TaskQuery taskQuery = processEngine.getTaskService().createTaskQuery();
|
| 88 |
+
// check and complete task "Assign Approver"
|
| 89 |
+
org.junit.Assert.assertEquals(1, taskQuery.count());
|
| 90 |
+
processEngine.getTaskService().complete(taskQuery.singleResult().getId());
|
| 91 |
+
|
| 92 |
+
// check and complete task "Approve Invoice"
|
| 93 |
+
Map<String, Object> variables = new HashMap<>();
|
| 94 |
+
variables.put("approved", true);
|
| 95 |
+
|
| 96 |
+
org.junit.Assert.assertEquals(1, taskQuery.count());
|
| 97 |
+
processEngine.getTaskService().complete(taskQuery.singleResult().getId(), variables);
|
| 98 |
+
|
| 99 |
+
// check and complete task "Prepare Bank Transfer"
|
| 100 |
+
org.junit.Assert.assertEquals(1, taskQuery.count());
|
| 101 |
+
processEngine.getTaskService().complete(taskQuery.singleResult().getId());
|
| 102 |
+
|
| 103 |
+
// check if Delegate was executed
|
| 104 |
+
org.junit.Assert.assertEquals(true, ArchiveInvoiceService.wasExecuted);
|
| 105 |
+
|
| 106 |
+
// check if process instance is ended
|
| 107 |
+
org.junit.Assert.assertEquals(0, processEngine.getRuntimeService().createProcessInstanceQuery().count());
|
| 108 |
+
|
| 109 |
+
// show the BPMN 2.0 process model XML on the console log
|
| 110 |
+
// Bpmn.writeModelToStream(System.out, modelInstance);
|
| 111 |
+
}
|
| 112 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/generate-process-fluent-api/src/test/resources/camunda.cfg.xml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
|
| 3 |
+
<beans xmlns="http://www.springframework.org/schema/beans"
|
| 4 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| 5 |
+
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
| 6 |
+
|
| 7 |
+
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
|
| 8 |
+
|
| 9 |
+
<!-- Database configurations
|
| 10 |
+
<property name="history" value="audit" />
|
| 11 |
+
<property name="databaseSchemaUpdate" value="true" />
|
| 12 |
+
-->
|
| 13 |
+
|
| 14 |
+
<!-- job executor configurations -->
|
| 15 |
+
<property name="jobExecutorActivate" value="false" />
|
| 16 |
+
|
| 17 |
+
</bean>
|
| 18 |
+
|
| 19 |
+
</beans>
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# BPMN parsing using the BPMN model API
|
| 2 |
+
|
| 3 |
+
This example demonstrates how to use the [Camunda BPMN model API][bpmn-model] to parse
|
| 4 |
+
a BPMN process. It shows how simple you can access attributes, child elements and
|
| 5 |
+
extension elements. Also it illustrates how to use references between model elements
|
| 6 |
+
to traverse the model.
|
| 7 |
+
|
| 8 |
+
Please have a look at the source code and comments of the [unit test case][test-case] to get
|
| 9 |
+
an impression about this feature of the [Camunda BPMN model API][bpmn-model].
|
| 10 |
+
|
| 11 |
+
Also be aware that you can use:
|
| 12 |
+
* [Camunda XML model API][xml-model] to process XML in a generic way
|
| 13 |
+
* [Camunda CMMN model API][cmmn-model] to handle CMMN models
|
| 14 |
+
* [Camunda DMN model API][dmn-model] to handle DMN models
|
| 15 |
+
|
| 16 |
+
## How to use it?
|
| 17 |
+
|
| 18 |
+
1. Checkout the project with Git
|
| 19 |
+
2. Read and run the [unit test case][test-case]
|
| 20 |
+
|
| 21 |
+
[bpmn-model]: https://github.com/camunda/camunda-bpm-platform/tree/master/model-api/bpmn-model
|
| 22 |
+
[xml-model]: https://github.com/camunda/camunda-bpm-platform/tree/master/model-api/xml-model
|
| 23 |
+
[cmmn-model]: https://github.com/camunda/camunda-bpm-platform/tree/master/model-api/cmmn-model
|
| 24 |
+
[dmn-model]: https://github.com/camunda/camunda-bpm-platform/tree/master/model-api/dmn-model
|
| 25 |
+
[test-case]: src/test/java/org/camunda/bpm/example/modelapi/ParseBpmnTest.java
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/pom.xml
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
| 2 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| 3 |
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
| 4 |
+
<modelVersion>4.0.0</modelVersion>
|
| 5 |
+
|
| 6 |
+
<groupId>org.camunda.bpm.example</groupId>
|
| 7 |
+
<artifactId>camunda-example-parse-bpmn</artifactId>
|
| 8 |
+
<version>0.0.1-SNAPSHOT</version>
|
| 9 |
+
<packaging>jar</packaging>
|
| 10 |
+
<name>Parse BPMN by model API</name>
|
| 11 |
+
|
| 12 |
+
<properties>
|
| 13 |
+
<version.camunda>7.24.0</version.camunda>
|
| 14 |
+
<version.junit>4.13.2</version.junit>
|
| 15 |
+
<version.assertj>3.27.6</version.assertj>
|
| 16 |
+
|
| 17 |
+
<!-- maven -->
|
| 18 |
+
<maven.compiler.release>17</maven.compiler.release>
|
| 19 |
+
<maven.compiler.plugin.version>3.13.0</maven.compiler.plugin.version>
|
| 20 |
+
|
| 21 |
+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
| 22 |
+
</properties>
|
| 23 |
+
|
| 24 |
+
<dependencies>
|
| 25 |
+
<dependency>
|
| 26 |
+
<groupId>org.camunda.bpm.model</groupId>
|
| 27 |
+
<artifactId>camunda-bpmn-model</artifactId>
|
| 28 |
+
<version>${version.camunda}</version>
|
| 29 |
+
</dependency>
|
| 30 |
+
|
| 31 |
+
<dependency>
|
| 32 |
+
<groupId>junit</groupId>
|
| 33 |
+
<artifactId>junit</artifactId>
|
| 34 |
+
<version>${version.junit}</version>
|
| 35 |
+
<scope>test</scope>
|
| 36 |
+
</dependency>
|
| 37 |
+
|
| 38 |
+
<dependency>
|
| 39 |
+
<groupId>org.assertj</groupId>
|
| 40 |
+
<artifactId>assertj-core</artifactId>
|
| 41 |
+
<version>${version.assertj}</version>
|
| 42 |
+
</dependency>
|
| 43 |
+
|
| 44 |
+
</dependencies>
|
| 45 |
+
|
| 46 |
+
<build>
|
| 47 |
+
<plugins>
|
| 48 |
+
<plugin>
|
| 49 |
+
<artifactId>maven-compiler-plugin</artifactId>
|
| 50 |
+
<version>${maven.compiler.plugin.version}</version>
|
| 51 |
+
</plugin>
|
| 52 |
+
</plugins>
|
| 53 |
+
</build>
|
| 54 |
+
|
| 55 |
+
<repositories>
|
| 56 |
+
<repository>
|
| 57 |
+
<id>camunda-bpm-nexus</id>
|
| 58 |
+
<name>camunda-bpm-nexus</name>
|
| 59 |
+
<url>https://artifacts.camunda.com/artifactory/private/</url>
|
| 60 |
+
</repository>
|
| 61 |
+
</repositories>
|
| 62 |
+
|
| 63 |
+
</project>
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/src/test/java/org/camunda/bpm/example/modelapi/ParseBpmnTest.java
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm.example.modelapi;
|
| 18 |
+
|
| 19 |
+
import static org.assertj.core.api.Assertions.assertThat;
|
| 20 |
+
|
| 21 |
+
import java.util.Collection;
|
| 22 |
+
|
| 23 |
+
import org.camunda.bpm.model.bpmn.Bpmn;
|
| 24 |
+
import org.camunda.bpm.model.bpmn.BpmnModelInstance;
|
| 25 |
+
import org.camunda.bpm.model.bpmn.impl.BpmnModelConstants;
|
| 26 |
+
import org.camunda.bpm.model.bpmn.instance.ConditionExpression;
|
| 27 |
+
import org.camunda.bpm.model.bpmn.instance.EndEvent;
|
| 28 |
+
import org.camunda.bpm.model.bpmn.instance.Event;
|
| 29 |
+
import org.camunda.bpm.model.bpmn.instance.ExclusiveGateway;
|
| 30 |
+
import org.camunda.bpm.model.bpmn.instance.ExtensionElements;
|
| 31 |
+
import org.camunda.bpm.model.bpmn.instance.FlowNode;
|
| 32 |
+
import org.camunda.bpm.model.bpmn.instance.Gateway;
|
| 33 |
+
import org.camunda.bpm.model.bpmn.instance.Script;
|
| 34 |
+
import org.camunda.bpm.model.bpmn.instance.ScriptTask;
|
| 35 |
+
import org.camunda.bpm.model.bpmn.instance.SequenceFlow;
|
| 36 |
+
import org.camunda.bpm.model.bpmn.instance.ServiceTask;
|
| 37 |
+
import org.camunda.bpm.model.bpmn.instance.StartEvent;
|
| 38 |
+
import org.camunda.bpm.model.bpmn.instance.UserTask;
|
| 39 |
+
import org.camunda.bpm.model.bpmn.instance.bpmndi.BpmnPlane;
|
| 40 |
+
import org.camunda.bpm.model.bpmn.instance.camunda.CamundaExecutionListener;
|
| 41 |
+
import org.camunda.bpm.model.bpmn.instance.camunda.CamundaFormData;
|
| 42 |
+
import org.camunda.bpm.model.bpmn.instance.camunda.CamundaFormField;
|
| 43 |
+
import org.camunda.bpm.model.xml.instance.ModelElementInstance;
|
| 44 |
+
import org.junit.Before;
|
| 45 |
+
import org.junit.Test;
|
| 46 |
+
|
| 47 |
+
public class ParseBpmnTest {
|
| 48 |
+
|
| 49 |
+
protected BpmnModelInstance modelInstance;
|
| 50 |
+
|
| 51 |
+
@Before
|
| 52 |
+
public void loadProcess() {
|
| 53 |
+
// read a BPMN model from an input stream
|
| 54 |
+
modelInstance = Bpmn.readModelFromStream(getClass().getClassLoader().getResourceAsStream("process.bpmn"));
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
@Test
|
| 58 |
+
/*
|
| 59 |
+
* You can access every element of the BPMN model by id.
|
| 60 |
+
*/
|
| 61 |
+
public void findElementById() {
|
| 62 |
+
// get the start event of the process by id
|
| 63 |
+
StartEvent startEvent = modelInstance.getModelElementById("startEvent");
|
| 64 |
+
assertThat(startEvent.getName()).isEqualTo("Start Process");
|
| 65 |
+
|
| 66 |
+
// get the forking gateway by id
|
| 67 |
+
ExclusiveGateway fork = modelInstance.getModelElementById("gatewayFork");
|
| 68 |
+
assertThat(fork.getName()).isEqualTo("Fork");
|
| 69 |
+
|
| 70 |
+
// get the end event of the process by id
|
| 71 |
+
EndEvent endEvent = modelInstance.getModelElementById("endEvent");
|
| 72 |
+
assertThat(endEvent.getName()).isEqualTo("End Process");
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
@Test
|
| 76 |
+
/*
|
| 77 |
+
* You can access elements by their type.
|
| 78 |
+
*/
|
| 79 |
+
public void findElementByType() {
|
| 80 |
+
// get all service tasks from the model
|
| 81 |
+
Collection<ServiceTask> serviceTasks = modelInstance.getModelElementsByType(ServiceTask.class);
|
| 82 |
+
// it only exists one service task
|
| 83 |
+
assertThat(serviceTasks).hasSize(1);
|
| 84 |
+
|
| 85 |
+
// get all events (eg start, intermediate, boundary and end events) from the model
|
| 86 |
+
Collection<Event> events = modelInstance.getModelElementsByType(Event.class);
|
| 87 |
+
// it exists a start and an end event
|
| 88 |
+
assertThat(events).hasSize(2);
|
| 89 |
+
|
| 90 |
+
// get all flow nodes in the model
|
| 91 |
+
Collection<FlowNode> flowNodes = modelInstance.getModelElementsByType(FlowNode.class);
|
| 92 |
+
// there exist 8 flow nodes: start event, service task, 2x exclusive gateways, 2x user tasks, script task, end event
|
| 93 |
+
assertThat(flowNodes).hasSize(8);
|
| 94 |
+
|
| 95 |
+
// get all extension elements in the model
|
| 96 |
+
Collection<ExtensionElements> extensionElements = modelInstance.getModelElementsByType(ExtensionElements.class);
|
| 97 |
+
// the start event and the end event contain extension elements
|
| 98 |
+
assertThat(extensionElements).hasSize(2);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
@Test
|
| 102 |
+
/*
|
| 103 |
+
* You can access attributes from model elements by special getters or by a generic getter.
|
| 104 |
+
*/
|
| 105 |
+
public void readAttributes() {
|
| 106 |
+
// get the service task and use special getters to access known attributes
|
| 107 |
+
ServiceTask serviceTask = modelInstance.getModelElementById("serviceTask");
|
| 108 |
+
assertThat(serviceTask.getId()).isEqualTo("serviceTask");
|
| 109 |
+
assertThat(serviceTask.getName()).isEqualTo("Service Task");
|
| 110 |
+
// you can also access camunda extension attributes
|
| 111 |
+
assertThat(serviceTask.getCamundaExpression()).isEqualTo("${execution.setVariable('foo', 'bar')}");
|
| 112 |
+
assertThat(serviceTask.isCamundaAsyncBefore()).isTrue();
|
| 113 |
+
assertThat(serviceTask.isCamundaExclusive()).isFalse();
|
| 114 |
+
|
| 115 |
+
UserTask userTaskA = modelInstance.getModelElementById("userTaskA");
|
| 116 |
+
assertThat(userTaskA.getCamundaCandidateGroupsList()).containsExactly("management", "accounting");
|
| 117 |
+
|
| 118 |
+
UserTask userTaskB = modelInstance.getModelElementById("userTaskB");
|
| 119 |
+
assertThat(userTaskB.getCamundaAssignee()).isEqualTo("demo");
|
| 120 |
+
|
| 121 |
+
// if the element contains an attribute which is not accessible by a special getter a generic getter can be used
|
| 122 |
+
// Note: for demonstrating purpose we read attributes which also can be accessed by special getters
|
| 123 |
+
assertThat(userTaskB.getAttributeValue("name")).isEqualTo("User Task B");
|
| 124 |
+
assertThat(userTaskB.getAttributeValueNs(BpmnModelConstants.CAMUNDA_NS, "assignee")).isEqualTo("demo");
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
@Test
|
| 128 |
+
/*
|
| 129 |
+
* You can access child elements by type or name and often by special getters
|
| 130 |
+
*/
|
| 131 |
+
public void readChildElements() {
|
| 132 |
+
SequenceFlow flow4 = modelInstance.getModelElementById("flow4");
|
| 133 |
+
// get all child elements of type condition expression
|
| 134 |
+
Collection<ConditionExpression> conditionExpressions = flow4.getChildElementsByType(ConditionExpression.class);
|
| 135 |
+
assertThat(conditionExpressions).hasSize(1);
|
| 136 |
+
|
| 137 |
+
// get unique child element of type condition expression (throws an exception if there are more then one child element of this type)
|
| 138 |
+
ConditionExpression conditionExpression = (ConditionExpression) flow4.getUniqueChildElementByType(ConditionExpression.class);
|
| 139 |
+
assertThat(conditionExpression.getTextContent()).isEqualTo("${foo == 'bar'}");
|
| 140 |
+
|
| 141 |
+
// get unique child element by namespace and name
|
| 142 |
+
ScriptTask scriptTask = modelInstance.getModelElementById("scriptTask");
|
| 143 |
+
Script script = (Script) scriptTask.getUniqueChildElementByNameNs(BpmnModelConstants.BPMN20_NS, "script");
|
| 144 |
+
assertThat(script.getTextContent()).isEqualTo("println 'hello world'");
|
| 145 |
+
|
| 146 |
+
// use special getters for known child elements
|
| 147 |
+
ConditionExpression conditionExpression2 = flow4.getConditionExpression();
|
| 148 |
+
assertThat(conditionExpression2).isEqualTo(conditionExpression);
|
| 149 |
+
|
| 150 |
+
Script script2 = scriptTask.getScript();
|
| 151 |
+
assertThat(script2).isEqualTo(script);
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
@Test
|
| 155 |
+
/*
|
| 156 |
+
* You can access extension elements like other child elements
|
| 157 |
+
*/
|
| 158 |
+
public void readExtensionElements() {
|
| 159 |
+
StartEvent startEvent = modelInstance.getModelElementById("startEvent");
|
| 160 |
+
// get the BPMN 'extensionElements' element of the start event
|
| 161 |
+
ExtensionElements extensionElements = startEvent.getExtensionElements();
|
| 162 |
+
// get all extension elements of the start event (child elements of 'extensionElements')
|
| 163 |
+
Collection<ModelElementInstance> elements = extensionElements.getElements();
|
| 164 |
+
// the start event contains a single extension element (camunda:formData)
|
| 165 |
+
assertThat(elements).hasSize(1);
|
| 166 |
+
|
| 167 |
+
// get the camunda:formData extension element and containing form fields
|
| 168 |
+
CamundaFormData formData = extensionElements.getElementsQuery().filterByType(CamundaFormData.class).singleResult();
|
| 169 |
+
for (CamundaFormField formField : formData.getCamundaFormFields()) {
|
| 170 |
+
assertThat(formField.getCamundaLabel()).isIn("Name", "Age");
|
| 171 |
+
assertThat(formField.getCamundaType()).isIn("string", "long");
|
| 172 |
+
assertThat(formField.getCamundaDefaultValue()).isIn("test", "0");
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
// the end event contains an execution listener
|
| 176 |
+
EndEvent endEvent = modelInstance.getModelElementById("endEvent");
|
| 177 |
+
CamundaExecutionListener executionListener = endEvent.getExtensionElements().getElementsQuery().filterByType(CamundaExecutionListener.class).singleResult();
|
| 178 |
+
assertThat(executionListener.getCamundaEvent()).isEqualTo("start");
|
| 179 |
+
assertThat(executionListener.getCamundaExpression()).isEqualTo("${execution.setVariable('finished', true)}");
|
| 180 |
+
}
|
| 181 |
+
|
| 182 |
+
@Test
|
| 183 |
+
/*
|
| 184 |
+
* You can access references between model elements by special getters. These attributes usually have the prefix
|
| 185 |
+
* 'Ref' like 'sourceRef' and 'targetRef' of a sequenceFlow. But there are also other references like the
|
| 186 |
+
* 'bpmnElement' reference of a BPMN DI element. The model API also supports the revere reference from the BPMN
|
| 187 |
+
* element to its DI element.
|
| 188 |
+
*/
|
| 189 |
+
public void useReferences() {
|
| 190 |
+
// get the first sequence flow in the process
|
| 191 |
+
SequenceFlow flow1 = modelInstance.getModelElementById("flow1");
|
| 192 |
+
// get the source element of the sequence flow (the start event)
|
| 193 |
+
assertThat(flow1.getSource()).isEqualTo(modelInstance.getModelElementById("startEvent"));
|
| 194 |
+
// get the target element of the sequence flow (the service task)
|
| 195 |
+
assertThat(flow1.getTarget()).isEqualTo(modelInstance.getModelElementById("serviceTask"));
|
| 196 |
+
|
| 197 |
+
// get the joining gateway
|
| 198 |
+
Gateway join = modelInstance.getModelElementById("gatewayJoin");
|
| 199 |
+
// the joining gateway has to previous flow nodes, both user tasks
|
| 200 |
+
assertThat(join.getPreviousNodes().list()).hasSize(2)
|
| 201 |
+
.containsOnly(
|
| 202 |
+
modelInstance.<FlowNode>getModelElementById("userTaskA"),
|
| 203 |
+
modelInstance.<FlowNode>getModelElementById("userTaskB")
|
| 204 |
+
);
|
| 205 |
+
// the joining gateway has one succeeding flow node (the script task)
|
| 206 |
+
assertThat(join.getSucceedingNodes().list()).hasSize(1)
|
| 207 |
+
.containsOnly(
|
| 208 |
+
modelInstance.<FlowNode>getModelElementById("scriptTask")
|
| 209 |
+
);
|
| 210 |
+
|
| 211 |
+
// get the bpmn plane DI element by type
|
| 212 |
+
BpmnPlane bpmnPlane = modelInstance.getModelElementsByType(BpmnPlane.class).iterator().next();
|
| 213 |
+
// the process element is the bpmn element corresponding to the bpmn plane
|
| 214 |
+
assertThat(bpmnPlane.getBpmnElement()).isEqualTo(modelInstance.getModelElementById("testProcess"));
|
| 215 |
+
|
| 216 |
+
// get the service task
|
| 217 |
+
ServiceTask serviceTask = modelInstance.getModelElementById("serviceTask");
|
| 218 |
+
// use the reverse reference to get the corresponding BPMN DI element
|
| 219 |
+
assertThat(serviceTask.getDiagramElement()).isEqualTo(modelInstance.getModelElementById("_BPMNShape_ServiceTask_2"));
|
| 220 |
+
}
|
| 221 |
+
|
| 222 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/src/test/resources/process.bpmn
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="_8bKMYE5TEeSvRrSmPCK-VA" targetNamespace="http://camunda.org/examples" exporter="camunda modeler" exporterVersion="2.6.0" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
|
| 3 |
+
<bpmn2:process id="testProcess" name="Test Process" isExecutable="true" camunda:historyTimeToLive="P180D">
|
| 4 |
+
<bpmn2:startEvent id="startEvent" name="Start Process">
|
| 5 |
+
<bpmn2:extensionElements>
|
| 6 |
+
<camunda:formData>
|
| 7 |
+
<camunda:formField id="name" label="Name" type="string" defaultValue="test" />
|
| 8 |
+
<camunda:formField id="age" label="Age" type="long" defaultValue="0" />
|
| 9 |
+
</camunda:formData>
|
| 10 |
+
</bpmn2:extensionElements>
|
| 11 |
+
<bpmn2:outgoing>flow1</bpmn2:outgoing>
|
| 12 |
+
</bpmn2:startEvent>
|
| 13 |
+
<bpmn2:serviceTask id="serviceTask" name="Service Task" camunda:asyncBefore="true" camunda:exclusive="false" camunda:expression="${execution.setVariable('foo', 'bar')}">
|
| 14 |
+
<bpmn2:incoming>flow1</bpmn2:incoming>
|
| 15 |
+
<bpmn2:outgoing>flow2</bpmn2:outgoing>
|
| 16 |
+
</bpmn2:serviceTask>
|
| 17 |
+
<bpmn2:sequenceFlow id="flow1" name="" sourceRef="startEvent" targetRef="serviceTask" />
|
| 18 |
+
<bpmn2:exclusiveGateway id="gatewayFork" name="Fork">
|
| 19 |
+
<bpmn2:incoming>flow2</bpmn2:incoming>
|
| 20 |
+
<bpmn2:outgoing>flow3</bpmn2:outgoing>
|
| 21 |
+
<bpmn2:outgoing>flow4</bpmn2:outgoing>
|
| 22 |
+
</bpmn2:exclusiveGateway>
|
| 23 |
+
<bpmn2:sequenceFlow id="flow2" name="" sourceRef="serviceTask" targetRef="gatewayFork" />
|
| 24 |
+
<bpmn2:sequenceFlow id="flow3" name="" sourceRef="gatewayFork" targetRef="userTaskA">
|
| 25 |
+
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${foo != 'bar'}]]></bpmn2:conditionExpression>
|
| 26 |
+
</bpmn2:sequenceFlow>
|
| 27 |
+
<bpmn2:userTask id="userTaskA" name="User Task A" camunda:candidateGroups="management, accounting">
|
| 28 |
+
<bpmn2:incoming>flow3</bpmn2:incoming>
|
| 29 |
+
<bpmn2:outgoing>flow5</bpmn2:outgoing>
|
| 30 |
+
</bpmn2:userTask>
|
| 31 |
+
<bpmn2:sequenceFlow id="flow4" name="" sourceRef="gatewayFork" targetRef="userTaskB">
|
| 32 |
+
<bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[${foo == 'bar'}]]></bpmn2:conditionExpression>
|
| 33 |
+
</bpmn2:sequenceFlow>
|
| 34 |
+
<bpmn2:userTask id="userTaskB" name="User Task B" camunda:assignee="demo">
|
| 35 |
+
<bpmn2:incoming>flow4</bpmn2:incoming>
|
| 36 |
+
<bpmn2:outgoing>flow6</bpmn2:outgoing>
|
| 37 |
+
</bpmn2:userTask>
|
| 38 |
+
<bpmn2:sequenceFlow id="flow6" name="" sourceRef="userTaskB" targetRef="gatewayJoin" />
|
| 39 |
+
<bpmn2:exclusiveGateway id="gatewayJoin" name="Join">
|
| 40 |
+
<bpmn2:incoming>flow6</bpmn2:incoming>
|
| 41 |
+
<bpmn2:incoming>flow5</bpmn2:incoming>
|
| 42 |
+
<bpmn2:outgoing>flow7</bpmn2:outgoing>
|
| 43 |
+
</bpmn2:exclusiveGateway>
|
| 44 |
+
<bpmn2:sequenceFlow id="flow5" name="" sourceRef="userTaskA" targetRef="gatewayJoin" />
|
| 45 |
+
<bpmn2:scriptTask id="scriptTask" name="Script Task" scriptFormat="groovy">
|
| 46 |
+
<bpmn2:incoming>flow7</bpmn2:incoming>
|
| 47 |
+
<bpmn2:outgoing>SequenceFlow_9</bpmn2:outgoing>
|
| 48 |
+
<bpmn2:script><![CDATA[println 'hello world']]></bpmn2:script>
|
| 49 |
+
</bpmn2:scriptTask>
|
| 50 |
+
<bpmn2:sequenceFlow id="flow7" name="" sourceRef="gatewayJoin" targetRef="scriptTask" />
|
| 51 |
+
<bpmn2:endEvent id="endEvent" name="End Process">
|
| 52 |
+
<bpmn2:extensionElements>
|
| 53 |
+
<camunda:executionListener expression="${execution.setVariable('finished', true)}" event="start" />
|
| 54 |
+
</bpmn2:extensionElements>
|
| 55 |
+
<bpmn2:incoming>SequenceFlow_9</bpmn2:incoming>
|
| 56 |
+
</bpmn2:endEvent>
|
| 57 |
+
<bpmn2:sequenceFlow id="SequenceFlow_9" name="" sourceRef="scriptTask" targetRef="endEvent" />
|
| 58 |
+
</bpmn2:process>
|
| 59 |
+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
| 60 |
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="testProcess">
|
| 61 |
+
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="startEvent">
|
| 62 |
+
<dc:Bounds x="536" y="251" width="36" height="36" />
|
| 63 |
+
</bpmndi:BPMNShape>
|
| 64 |
+
<bpmndi:BPMNShape id="_BPMNShape_ServiceTask_2" bpmnElement="serviceTask">
|
| 65 |
+
<dc:Bounds x="622" y="229" width="100" height="80" />
|
| 66 |
+
</bpmndi:BPMNShape>
|
| 67 |
+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="flow1" sourceElement="_BPMNShape_StartEvent_2" targetElement="_BPMNShape_ServiceTask_2">
|
| 68 |
+
<di:waypoint xsi:type="dc:Point" x="572" y="269" />
|
| 69 |
+
<di:waypoint xsi:type="dc:Point" x="622" y="269" />
|
| 70 |
+
</bpmndi:BPMNEdge>
|
| 71 |
+
<bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_2" bpmnElement="gatewayFork" isMarkerVisible="true">
|
| 72 |
+
<dc:Bounds x="772" y="244" width="50" height="50" />
|
| 73 |
+
<bpmndi:BPMNLabel>
|
| 74 |
+
<dc:Bounds x="828" y="259" width="32" height="22" />
|
| 75 |
+
</bpmndi:BPMNLabel>
|
| 76 |
+
</bpmndi:BPMNShape>
|
| 77 |
+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="flow2" sourceElement="_BPMNShape_ServiceTask_2" targetElement="_BPMNShape_ExclusiveGateway_2">
|
| 78 |
+
<di:waypoint xsi:type="dc:Point" x="722" y="269" />
|
| 79 |
+
<di:waypoint xsi:type="dc:Point" x="772" y="269" />
|
| 80 |
+
</bpmndi:BPMNEdge>
|
| 81 |
+
<bpmndi:BPMNShape id="_BPMNShape_UserTask_2" bpmnElement="userTaskA">
|
| 82 |
+
<dc:Bounds x="876" y="132" width="100" height="80" />
|
| 83 |
+
</bpmndi:BPMNShape>
|
| 84 |
+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="flow3" sourceElement="_BPMNShape_ExclusiveGateway_2" targetElement="_BPMNShape_UserTask_2">
|
| 85 |
+
<di:waypoint xsi:type="dc:Point" x="797" y="244" />
|
| 86 |
+
<di:waypoint xsi:type="dc:Point" x="797" y="172" />
|
| 87 |
+
<di:waypoint xsi:type="dc:Point" x="876" y="172" />
|
| 88 |
+
<bpmndi:BPMNLabel>
|
| 89 |
+
<dc:Bounds x="794" y="219" width="6" height="6" />
|
| 90 |
+
</bpmndi:BPMNLabel>
|
| 91 |
+
</bpmndi:BPMNEdge>
|
| 92 |
+
<bpmndi:BPMNShape id="_BPMNShape_UserTask_3" bpmnElement="userTaskB">
|
| 93 |
+
<dc:Bounds x="876" y="324" width="100" height="80" />
|
| 94 |
+
</bpmndi:BPMNShape>
|
| 95 |
+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="flow4" sourceElement="_BPMNShape_ExclusiveGateway_2" targetElement="_BPMNShape_UserTask_3">
|
| 96 |
+
<di:waypoint xsi:type="dc:Point" x="797" y="294" />
|
| 97 |
+
<di:waypoint xsi:type="dc:Point" x="797" y="364" />
|
| 98 |
+
<di:waypoint xsi:type="dc:Point" x="876" y="364" />
|
| 99 |
+
<bpmndi:BPMNLabel>
|
| 100 |
+
<dc:Bounds x="794" y="319" width="6" height="6" />
|
| 101 |
+
</bpmndi:BPMNLabel>
|
| 102 |
+
</bpmndi:BPMNEdge>
|
| 103 |
+
<bpmndi:BPMNShape id="_BPMNShape_ExclusiveGateway_3" bpmnElement="gatewayJoin" isMarkerVisible="true">
|
| 104 |
+
<dc:Bounds x="1026" y="243" width="50" height="50" />
|
| 105 |
+
<bpmndi:BPMNLabel>
|
| 106 |
+
<dc:Bounds x="998" y="258" width="29" height="22" />
|
| 107 |
+
</bpmndi:BPMNLabel>
|
| 108 |
+
</bpmndi:BPMNShape>
|
| 109 |
+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_5" bpmnElement="flow6" sourceElement="_BPMNShape_UserTask_3" targetElement="_BPMNShape_ExclusiveGateway_3">
|
| 110 |
+
<di:waypoint xsi:type="dc:Point" x="976" y="364" />
|
| 111 |
+
<di:waypoint xsi:type="dc:Point" x="1001" y="364" />
|
| 112 |
+
<di:waypoint xsi:type="dc:Point" x="1051" y="364" />
|
| 113 |
+
<di:waypoint xsi:type="dc:Point" x="1051" y="293" />
|
| 114 |
+
<bpmndi:BPMNLabel>
|
| 115 |
+
<dc:Bounds x="998" y="364" width="6" height="6" />
|
| 116 |
+
</bpmndi:BPMNLabel>
|
| 117 |
+
</bpmndi:BPMNEdge>
|
| 118 |
+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_6" bpmnElement="flow5" sourceElement="_BPMNShape_UserTask_2" targetElement="_BPMNShape_ExclusiveGateway_3">
|
| 119 |
+
<di:waypoint xsi:type="dc:Point" x="976" y="172" />
|
| 120 |
+
<di:waypoint xsi:type="dc:Point" x="1001" y="172" />
|
| 121 |
+
<di:waypoint xsi:type="dc:Point" x="1051" y="172" />
|
| 122 |
+
<di:waypoint xsi:type="dc:Point" x="1051" y="243" />
|
| 123 |
+
<bpmndi:BPMNLabel>
|
| 124 |
+
<dc:Bounds x="1046" y="172" width="6" height="6" />
|
| 125 |
+
</bpmndi:BPMNLabel>
|
| 126 |
+
</bpmndi:BPMNEdge>
|
| 127 |
+
<bpmndi:BPMNShape id="_BPMNShape_ScriptTask_2" bpmnElement="scriptTask">
|
| 128 |
+
<dc:Bounds x="1126" y="228" width="100" height="80" />
|
| 129 |
+
</bpmndi:BPMNShape>
|
| 130 |
+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_8" bpmnElement="flow7" sourceElement="_BPMNShape_ExclusiveGateway_3" targetElement="_BPMNShape_ScriptTask_2">
|
| 131 |
+
<di:waypoint xsi:type="dc:Point" x="1076" y="268" />
|
| 132 |
+
<di:waypoint xsi:type="dc:Point" x="1126" y="268" />
|
| 133 |
+
</bpmndi:BPMNEdge>
|
| 134 |
+
<bpmndi:BPMNShape id="_BPMNShape_EndEvent_3" bpmnElement="endEvent">
|
| 135 |
+
<dc:Bounds x="1276" y="250" width="36" height="36" />
|
| 136 |
+
</bpmndi:BPMNShape>
|
| 137 |
+
<bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_9" bpmnElement="SequenceFlow_9" sourceElement="_BPMNShape_ScriptTask_2" targetElement="_BPMNShape_EndEvent_3">
|
| 138 |
+
<di:waypoint xsi:type="dc:Point" x="1226" y="268" />
|
| 139 |
+
<di:waypoint xsi:type="dc:Point" x="1276" y="268" />
|
| 140 |
+
</bpmndi:BPMNEdge>
|
| 141 |
+
</bpmndi:BPMNPlane>
|
| 142 |
+
</bpmndi:BPMNDiagram>
|
| 143 |
+
</bpmn2:definitions>
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/bpmn-model-api/parse-bpmn/src/test/resources/process.png
ADDED
|
Git LFS Details
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/dataformat/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Camunda External Task Client (Java) Example
|
| 2 |
+
|
| 3 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/clients/java/dataformat).
|
| 4 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 5 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/loan-granting/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Camunda External Task Client (Java) Example
|
| 2 |
+
|
| 3 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/clients/java/loan-granting).
|
| 4 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 5 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/README.md
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Camunda External Task Client (Java) Example
|
| 2 |
+
|
| 3 |
+
In this tutorial you will learn how to use the External Task client for Java.
|
| 4 |
+
|
| 5 |
+
In a nutshell you will be guided through the following steps:
|
| 6 |
+
* Starting the Camunda Platform Runtime
|
| 7 |
+
* Modeling and Deploying a process with the Camunda Modeler
|
| 8 |
+
* Bootstrapping the External Task client
|
| 9 |
+
* Monitor the process in Camunda Cockpit
|
| 10 |
+
|
| 11 |
+
## Prerequisites
|
| 12 |
+
* [Java JDK 11+](https://www.oracle.com/java/technologies/downloads/#java11)
|
| 13 |
+
* [Apache Maven](https://maven.apache.org/download.cgi)
|
| 14 |
+
* [Camunda Modeler](https://camunda.com/download/modeler/)
|
| 15 |
+
* [Camunda Platform Runtime](https://docs.camunda.org/manual/latest/installation/)
|
| 16 |
+
* Camunda External Task Client
|
| 17 |
+
|
| 18 |
+
First, make sure you have downloaded and installed all the necessary prerequisites,
|
| 19 |
+
and the running platform is [compatible](https://docs.camunda.org/manual/user-guide/ext-client/compatibility-matrix/) with the client version.
|
| 20 |
+
|
| 21 |
+
## Start the Camunda Platform Runtime
|
| 22 |
+
* Microsoft Windows users need to run the `start.bat` file
|
| 23 |
+
* Users of Unix based operating systems need to run the `start.sh` file
|
| 24 |
+
|
| 25 |
+
## Deploy a Process
|
| 26 |
+
|
| 27 |
+
Next, we want to deploy a model to the Camunda Platform Runtime with the following steps:
|
| 28 |
+
|
| 29 |
+
* Download the BPMN 2.0 XML of that model [here](./order-handling.bpmn).
|
| 30 |
+
* Open the model in the Camunda Modeler.
|
| 31 |
+
* Click on the "Deploy" icon .
|
| 32 |
+
* Select "Deploy Current Diagram".
|
| 33 |
+
* Select a deployment name of your choice.
|
| 34 |
+
|
| 35 |
+
To complete the deployment, click on the "Deploy" button.
|
| 36 |
+
Your model is now ready to be executed by the **Camunda Platform Process Engine**.
|
| 37 |
+
Start an instance of it in [Camunda Tasklist](http://localhost:8080/camunda/app/tasklist).
|
| 38 |
+
|
| 39 |
+
## Monitor the Process in Camunda Cockpit
|
| 40 |
+
Open [Camunda Cockpit](http://localhost:8080/camunda/app/cockpit) click in the top navigation on "Processes" and then
|
| 41 |
+
on the process "Order Process". You should see the process with the activity instances.
|
| 42 |
+
|
| 43 |
+
## Set Up a Project
|
| 44 |
+
In this step we will set up the External Task client.
|
| 45 |
+
|
| 46 |
+
You can create a new Maven project using your IDE, or run the following command:
|
| 47 |
+
|
| 48 |
+
```sh
|
| 49 |
+
mvn archetype:generate \
|
| 50 |
+
-DgroupId=org.camunda.bpm \
|
| 51 |
+
-DartifactId=order-handling \
|
| 52 |
+
-DarchetypeArtifactId=maven-archetype-quickstart \
|
| 53 |
+
-DinteractiveMode=false
|
| 54 |
+
```
|
| 55 |
+
|
| 56 |
+
Add the `camunda-external-task-client` dependency to the project's `pom.xml`:
|
| 57 |
+
```xml
|
| 58 |
+
<dependency>
|
| 59 |
+
<groupId>org.camunda.bpm</groupId>
|
| 60 |
+
<artifactId>camunda-external-task-client</artifactId>
|
| 61 |
+
<version>${version}</version>
|
| 62 |
+
</dependency>
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Create a main class and add the following lines:
|
| 66 |
+
```java
|
| 67 |
+
// bootstrap the client
|
| 68 |
+
ExternalTaskClient client = ExternalTaskClient.create()
|
| 69 |
+
.baseUrl("http://localhost:8080/engine-rest")
|
| 70 |
+
.asyncResponseTimeout(1000)
|
| 71 |
+
.customizeHttpClient(httpClientBuilder -> {
|
| 72 |
+
httpClientBuilder.setDefaultRequestConfig(RequestConfig.custom()
|
| 73 |
+
.setResponseTimeout(Timeout.ofSeconds(15))
|
| 74 |
+
.build());
|
| 75 |
+
})
|
| 76 |
+
.build();
|
| 77 |
+
|
| 78 |
+
// subscribe to the topic
|
| 79 |
+
client.subscribe("invoiceCreator")
|
| 80 |
+
.handler((externalTask, externalTaskService) -> {
|
| 81 |
+
|
| 82 |
+
// instantiate an invoice object
|
| 83 |
+
Invoice invoice = new Invoice("A123");
|
| 84 |
+
|
| 85 |
+
// create an object typed variable with the serialization format XML
|
| 86 |
+
ObjectValue invoiceValue = ClientValues
|
| 87 |
+
.objectValue(invoice)
|
| 88 |
+
.serializationDataFormat("application/xml")
|
| 89 |
+
.create();
|
| 90 |
+
|
| 91 |
+
// add the invoice object and its id to a map
|
| 92 |
+
Map<String, Object> variables = new HashMap<>();
|
| 93 |
+
variables.put("invoiceId", invoice.id);
|
| 94 |
+
variables.put("invoice", invoiceValue);
|
| 95 |
+
|
| 96 |
+
// select the scope of the variables
|
| 97 |
+
boolean isRandomSample = Math.random() <= 0.5;
|
| 98 |
+
if (isRandomSample) {
|
| 99 |
+
externalTaskService.complete(externalTask, variables);
|
| 100 |
+
} else {
|
| 101 |
+
externalTaskService.complete(externalTask, null, variables);
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
System.out.println("The External Task " + externalTask.getId() +
|
| 105 |
+
" has been completed!");
|
| 106 |
+
|
| 107 |
+
}).open();
|
| 108 |
+
|
| 109 |
+
client.subscribe("invoiceArchiver")
|
| 110 |
+
.handler((externalTask, externalTaskService) -> {
|
| 111 |
+
TypedValue typedInvoice = externalTask.getVariableTyped("invoice");
|
| 112 |
+
Invoice invoice = (Invoice) typedInvoice.getValue();
|
| 113 |
+
System.out.println("Invoice on process scope archived: " + invoice);
|
| 114 |
+
externalTaskService.complete(externalTask);
|
| 115 |
+
}).open();
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
Create an `Invoice` class and add the following lines:
|
| 119 |
+
```java
|
| 120 |
+
public class Invoice {
|
| 121 |
+
|
| 122 |
+
public String id;
|
| 123 |
+
|
| 124 |
+
public Invoice(String id) {
|
| 125 |
+
this.id = id;
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
public Invoice() {
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
@Override
|
| 132 |
+
public String toString() {
|
| 133 |
+
return "Invoice [id=" + id + "]";
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
}
|
| 137 |
+
```
|
| 138 |
+
|
| 139 |
+
Now, just run your application. The client starts to continuously fetch and lock for External Task instances.
|
| 140 |
+
|
| 141 |
+
You should see a similar result in your console window:
|
| 142 |
+
```sh
|
| 143 |
+
The External Task 5baf2670-1bad-11ec-9048-04d3b0c25ec0 has been completed!
|
| 144 |
+
Invoice on process scope archived: Invoice [id=A123]
|
| 145 |
+
...
|
| 146 |
+
```
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/img/deploy-icon.png
ADDED
|
|
Git LFS Details
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/order-handling.bpmn
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
+
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0t9x9qf" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.6.0">
|
| 3 |
+
<bpmn:process id="Order_Process" name="Order Process" isExecutable="true" camunda:historyTimeToLive="P180D">
|
| 4 |
+
<bpmn:sequenceFlow id="SequenceFlow_0xz1ar4" sourceRef="StartEvent_1" targetRef="Task_1nbdup3" />
|
| 5 |
+
<bpmn:subProcess id="Task_1nbdup3">
|
| 6 |
+
<bpmn:incoming>SequenceFlow_0xz1ar4</bpmn:incoming>
|
| 7 |
+
<bpmn:outgoing>SequenceFlow_0mbhk8d</bpmn:outgoing>
|
| 8 |
+
<bpmn:startEvent id="StartEvent_1iul9gy">
|
| 9 |
+
<bpmn:outgoing>SequenceFlow_1e8m45t</bpmn:outgoing>
|
| 10 |
+
</bpmn:startEvent>
|
| 11 |
+
<bpmn:sequenceFlow id="SequenceFlow_1e8m45t" sourceRef="StartEvent_1iul9gy" targetRef="Task_06z99p1" />
|
| 12 |
+
<bpmn:endEvent id="EndEvent_036eexy">
|
| 13 |
+
<bpmn:incoming>SequenceFlow_131wrxd</bpmn:incoming>
|
| 14 |
+
</bpmn:endEvent>
|
| 15 |
+
<bpmn:sequenceFlow id="SequenceFlow_131wrxd" sourceRef="Task_06z99p1" targetRef="EndEvent_036eexy" />
|
| 16 |
+
<bpmn:serviceTask id="Task_06z99p1" name="Create Invoice" camunda:type="external" camunda:topic="invoiceCreator">
|
| 17 |
+
<bpmn:incoming>SequenceFlow_1e8m45t</bpmn:incoming>
|
| 18 |
+
<bpmn:outgoing>SequenceFlow_131wrxd</bpmn:outgoing>
|
| 19 |
+
</bpmn:serviceTask>
|
| 20 |
+
</bpmn:subProcess>
|
| 21 |
+
<bpmn:endEvent id="EndEvent_00asnpf">
|
| 22 |
+
<bpmn:incoming>SequenceFlow_0mbhk8d</bpmn:incoming>
|
| 23 |
+
</bpmn:endEvent>
|
| 24 |
+
<bpmn:sequenceFlow id="SequenceFlow_0mbhk8d" sourceRef="Task_1nbdup3" targetRef="EndEvent_00asnpf" />
|
| 25 |
+
<bpmn:endEvent id="EndEvent_0q2wrcp">
|
| 26 |
+
<bpmn:incoming>SequenceFlow_140kl02</bpmn:incoming>
|
| 27 |
+
</bpmn:endEvent>
|
| 28 |
+
<bpmn:sequenceFlow id="SequenceFlow_1k59pur" sourceRef="BoundaryEvent_1y1bvad" targetRef="Task_1yjkccw" />
|
| 29 |
+
<bpmn:sequenceFlow id="SequenceFlow_140kl02" sourceRef="Task_1yjkccw" targetRef="EndEvent_0q2wrcp" />
|
| 30 |
+
<bpmn:startEvent id="StartEvent_1" name="Order received">
|
| 31 |
+
<bpmn:outgoing>SequenceFlow_0xz1ar4</bpmn:outgoing>
|
| 32 |
+
<bpmn:timerEventDefinition>
|
| 33 |
+
<bpmn:timeCycle xsi:type="bpmn:tFormalExpression">0/5 0/1 * 1/1 * ?</bpmn:timeCycle>
|
| 34 |
+
</bpmn:timerEventDefinition>
|
| 35 |
+
</bpmn:startEvent>
|
| 36 |
+
<bpmn:boundaryEvent id="BoundaryEvent_1y1bvad" name="Archive invoice?" attachedToRef="Task_1nbdup3">
|
| 37 |
+
<bpmn:outgoing>SequenceFlow_1k59pur</bpmn:outgoing>
|
| 38 |
+
<bpmn:conditionalEventDefinition>
|
| 39 |
+
<bpmn:condition xsi:type="bpmn:tFormalExpression">${invoiceId != null}</bpmn:condition>
|
| 40 |
+
</bpmn:conditionalEventDefinition>
|
| 41 |
+
</bpmn:boundaryEvent>
|
| 42 |
+
<bpmn:serviceTask id="Task_1yjkccw" name="Archive invoice" camunda:type="external" camunda:topic="invoiceArchiver">
|
| 43 |
+
<bpmn:incoming>SequenceFlow_1k59pur</bpmn:incoming>
|
| 44 |
+
<bpmn:outgoing>SequenceFlow_140kl02</bpmn:outgoing>
|
| 45 |
+
</bpmn:serviceTask>
|
| 46 |
+
</bpmn:process>
|
| 47 |
+
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
| 48 |
+
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Order_Process">
|
| 49 |
+
<bpmndi:BPMNEdge id="SequenceFlow_140kl02_di" bpmnElement="SequenceFlow_140kl02">
|
| 50 |
+
<di:waypoint x="803" y="259" />
|
| 51 |
+
<di:waypoint x="859" y="259" />
|
| 52 |
+
<bpmndi:BPMNLabel>
|
| 53 |
+
<dc:Bounds x="1151" y="347.5" width="0" height="13" />
|
| 54 |
+
</bpmndi:BPMNLabel>
|
| 55 |
+
</bpmndi:BPMNEdge>
|
| 56 |
+
<bpmndi:BPMNEdge id="SequenceFlow_1k59pur_di" bpmnElement="SequenceFlow_1k59pur">
|
| 57 |
+
<di:waypoint x="643" y="259" />
|
| 58 |
+
<di:waypoint x="703" y="259" />
|
| 59 |
+
<bpmndi:BPMNLabel>
|
| 60 |
+
<dc:Bounds x="948" y="347.5" width="90" height="13" />
|
| 61 |
+
</bpmndi:BPMNLabel>
|
| 62 |
+
</bpmndi:BPMNEdge>
|
| 63 |
+
<bpmndi:BPMNEdge id="SequenceFlow_0mbhk8d_di" bpmnElement="SequenceFlow_0mbhk8d">
|
| 64 |
+
<di:waypoint x="625" y="172" />
|
| 65 |
+
<di:waypoint x="677" y="172" />
|
| 66 |
+
<bpmndi:BPMNLabel>
|
| 67 |
+
<dc:Bounds x="971" y="260.5" width="0" height="13" />
|
| 68 |
+
</bpmndi:BPMNLabel>
|
| 69 |
+
</bpmndi:BPMNEdge>
|
| 70 |
+
<bpmndi:BPMNEdge id="SequenceFlow_0xz1ar4_di" bpmnElement="SequenceFlow_0xz1ar4">
|
| 71 |
+
<di:waypoint x="216" y="172" />
|
| 72 |
+
<di:waypoint x="267" y="172" />
|
| 73 |
+
<bpmndi:BPMNLabel>
|
| 74 |
+
<dc:Bounds x="516.5" y="260.5" width="90" height="13" />
|
| 75 |
+
</bpmndi:BPMNLabel>
|
| 76 |
+
</bpmndi:BPMNEdge>
|
| 77 |
+
<bpmndi:BPMNShape id="SubProcess_1h5qc2w_di" bpmnElement="Task_1nbdup3" isExpanded="true">
|
| 78 |
+
<dc:Bounds x="267" y="85" width="358" height="174" />
|
| 79 |
+
</bpmndi:BPMNShape>
|
| 80 |
+
<bpmndi:BPMNEdge id="SequenceFlow_131wrxd_di" bpmnElement="SequenceFlow_131wrxd">
|
| 81 |
+
<di:waypoint x="503" y="170" />
|
| 82 |
+
<di:waypoint x="549" y="170" />
|
| 83 |
+
<bpmndi:BPMNLabel>
|
| 84 |
+
<dc:Bounds x="801" y="258.5" width="90" height="13" />
|
| 85 |
+
</bpmndi:BPMNLabel>
|
| 86 |
+
</bpmndi:BPMNEdge>
|
| 87 |
+
<bpmndi:BPMNEdge id="SequenceFlow_1e8m45t_di" bpmnElement="SequenceFlow_1e8m45t">
|
| 88 |
+
<di:waypoint x="345" y="170" />
|
| 89 |
+
<di:waypoint x="403" y="170" />
|
| 90 |
+
<bpmndi:BPMNLabel>
|
| 91 |
+
<dc:Bounds x="649" y="258.5" width="90" height="13" />
|
| 92 |
+
</bpmndi:BPMNLabel>
|
| 93 |
+
</bpmndi:BPMNEdge>
|
| 94 |
+
<bpmndi:BPMNShape id="StartEvent_1iul9gy_di" bpmnElement="StartEvent_1iul9gy">
|
| 95 |
+
<dc:Bounds x="309" y="152" width="36" height="36" />
|
| 96 |
+
<bpmndi:BPMNLabel>
|
| 97 |
+
<dc:Bounds x="647" y="301" width="0" height="13" />
|
| 98 |
+
</bpmndi:BPMNLabel>
|
| 99 |
+
</bpmndi:BPMNShape>
|
| 100 |
+
<bpmndi:BPMNShape id="EndEvent_036eexy_di" bpmnElement="EndEvent_036eexy">
|
| 101 |
+
<dc:Bounds x="549" y="152" width="36" height="36" />
|
| 102 |
+
<bpmndi:BPMNLabel>
|
| 103 |
+
<dc:Bounds x="887" y="301" width="0" height="13" />
|
| 104 |
+
</bpmndi:BPMNLabel>
|
| 105 |
+
</bpmndi:BPMNShape>
|
| 106 |
+
<bpmndi:BPMNShape id="ServiceTask_0ptfphj_di" bpmnElement="Task_06z99p1">
|
| 107 |
+
<dc:Bounds x="403" y="130" width="100" height="80" />
|
| 108 |
+
</bpmndi:BPMNShape>
|
| 109 |
+
<bpmndi:BPMNShape id="EndEvent_00asnpf_di" bpmnElement="EndEvent_00asnpf">
|
| 110 |
+
<dc:Bounds x="677" y="154" width="36" height="36" />
|
| 111 |
+
<bpmndi:BPMNLabel>
|
| 112 |
+
<dc:Bounds x="1015" y="303" width="0" height="13" />
|
| 113 |
+
</bpmndi:BPMNLabel>
|
| 114 |
+
</bpmndi:BPMNShape>
|
| 115 |
+
<bpmndi:BPMNShape id="EndEvent_0q2wrcp_di" bpmnElement="EndEvent_0q2wrcp">
|
| 116 |
+
<dc:Bounds x="859" y="241" width="36" height="36" />
|
| 117 |
+
<bpmndi:BPMNLabel>
|
| 118 |
+
<dc:Bounds x="1197" y="390" width="0" height="13" />
|
| 119 |
+
</bpmndi:BPMNLabel>
|
| 120 |
+
</bpmndi:BPMNShape>
|
| 121 |
+
<bpmndi:BPMNShape id="StartEvent_1rsiu04_di" bpmnElement="StartEvent_1">
|
| 122 |
+
<dc:Bounds x="180" y="154" width="36" height="36" />
|
| 123 |
+
<bpmndi:BPMNLabel>
|
| 124 |
+
<dc:Bounds x="161" y="194" width="73" height="14" />
|
| 125 |
+
</bpmndi:BPMNLabel>
|
| 126 |
+
</bpmndi:BPMNShape>
|
| 127 |
+
<bpmndi:BPMNShape id="ServiceTask_1s3frzs_di" bpmnElement="Task_1yjkccw">
|
| 128 |
+
<dc:Bounds x="703" y="219" width="100" height="80" />
|
| 129 |
+
</bpmndi:BPMNShape>
|
| 130 |
+
<bpmndi:BPMNShape id="BoundaryEvent_1jdmsqk_di" bpmnElement="BoundaryEvent_1y1bvad">
|
| 131 |
+
<dc:Bounds x="607" y="241" width="36" height="36" />
|
| 132 |
+
<bpmndi:BPMNLabel>
|
| 133 |
+
<dc:Bounds x="586" y="285" width="80" height="14" />
|
| 134 |
+
</bpmndi:BPMNLabel>
|
| 135 |
+
</bpmndi:BPMNShape>
|
| 136 |
+
</bpmndi:BPMNPlane>
|
| 137 |
+
</bpmndi:BPMNDiagram>
|
| 138 |
+
</bpmn:definitions>
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/pom.xml
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| 2 |
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
| 3 |
+
|
| 4 |
+
<modelVersion>4.0.0</modelVersion>
|
| 5 |
+
|
| 6 |
+
<groupId>org.camunda.bpm</groupId>
|
| 7 |
+
<artifactId>order-handling-example</artifactId>
|
| 8 |
+
<version>1.0-SNAPSHOT</version>
|
| 9 |
+
|
| 10 |
+
<packaging>jar</packaging>
|
| 11 |
+
<name>order-handling-example</name>
|
| 12 |
+
|
| 13 |
+
<properties>
|
| 14 |
+
<camunda.platform.version>7.24.0</camunda.platform.version>
|
| 15 |
+
<slf4j.version>1.7.36</slf4j.version>
|
| 16 |
+
<jaxb.version>4.0.5</jaxb.version>
|
| 17 |
+
<maven.compiler.version>3.11.0</maven.compiler.version>
|
| 18 |
+
<maven.compiler.release>11</maven.compiler.release>
|
| 19 |
+
</properties>
|
| 20 |
+
|
| 21 |
+
<dependencies>
|
| 22 |
+
<dependency>
|
| 23 |
+
<groupId>org.camunda.bpm</groupId>
|
| 24 |
+
<artifactId>camunda-external-task-client</artifactId>
|
| 25 |
+
<version>${camunda.platform.version}</version>
|
| 26 |
+
</dependency>
|
| 27 |
+
|
| 28 |
+
<dependency>
|
| 29 |
+
<groupId>org.slf4j</groupId>
|
| 30 |
+
<artifactId>slf4j-simple</artifactId>
|
| 31 |
+
<version>${slf4j.version}</version>
|
| 32 |
+
</dependency>
|
| 33 |
+
|
| 34 |
+
<dependency>
|
| 35 |
+
<groupId>com.sun.xml.bind</groupId>
|
| 36 |
+
<artifactId>jaxb-impl</artifactId>
|
| 37 |
+
<version>${jaxb.version}</version>
|
| 38 |
+
</dependency>
|
| 39 |
+
</dependencies>
|
| 40 |
+
|
| 41 |
+
<build>
|
| 42 |
+
<plugins>
|
| 43 |
+
<plugin>
|
| 44 |
+
<groupId>org.apache.maven.plugins</groupId>
|
| 45 |
+
<artifactId>maven-compiler-plugin</artifactId>
|
| 46 |
+
<version>${maven.compiler.version}</version>
|
| 47 |
+
<configuration>
|
| 48 |
+
<source>${java.version}</source>
|
| 49 |
+
<target>${java.version}</target>
|
| 50 |
+
</configuration>
|
| 51 |
+
</plugin>
|
| 52 |
+
</plugins>
|
| 53 |
+
</build>
|
| 54 |
+
|
| 55 |
+
</project>
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/src/main/java/org/camunda/bpm/App.java
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm;
|
| 18 |
+
|
| 19 |
+
import org.apache.hc.client5.http.config.RequestConfig;
|
| 20 |
+
import org.apache.hc.core5.util.Timeout;
|
| 21 |
+
import org.camunda.bpm.client.ExternalTaskClient;
|
| 22 |
+
import org.camunda.bpm.client.variable.ClientValues;
|
| 23 |
+
import org.camunda.bpm.engine.variable.value.ObjectValue;
|
| 24 |
+
import org.camunda.bpm.engine.variable.value.TypedValue;
|
| 25 |
+
|
| 26 |
+
import java.util.HashMap;
|
| 27 |
+
import java.util.Map;
|
| 28 |
+
|
| 29 |
+
public class App {
|
| 30 |
+
|
| 31 |
+
public static void main(String... args) {
|
| 32 |
+
// bootstrap the client
|
| 33 |
+
ExternalTaskClient client = ExternalTaskClient.create()
|
| 34 |
+
.baseUrl("http://localhost:8080/engine-rest")
|
| 35 |
+
.asyncResponseTimeout(1000)
|
| 36 |
+
.customizeHttpClient(httpClientBuilder -> {
|
| 37 |
+
httpClientBuilder.setDefaultRequestConfig(RequestConfig.custom()
|
| 38 |
+
.setResponseTimeout(Timeout.ofSeconds(15))
|
| 39 |
+
.build());
|
| 40 |
+
})
|
| 41 |
+
.build();
|
| 42 |
+
|
| 43 |
+
// subscribe to the topic
|
| 44 |
+
client.subscribe("invoiceCreator")
|
| 45 |
+
.handler((externalTask, externalTaskService) -> {
|
| 46 |
+
|
| 47 |
+
// instantiate an invoice object
|
| 48 |
+
Invoice invoice = new Invoice("A123");
|
| 49 |
+
|
| 50 |
+
// create an object typed variable with the serialization format XML
|
| 51 |
+
ObjectValue invoiceValue = ClientValues
|
| 52 |
+
.objectValue(invoice)
|
| 53 |
+
.serializationDataFormat("application/xml")
|
| 54 |
+
.create();
|
| 55 |
+
|
| 56 |
+
// add the invoice object and its id to a map
|
| 57 |
+
Map<String, Object> variables = new HashMap<>();
|
| 58 |
+
variables.put("invoiceId", invoice.id);
|
| 59 |
+
variables.put("invoice", invoiceValue);
|
| 60 |
+
|
| 61 |
+
// select the scope of the variables
|
| 62 |
+
boolean isRandomSample = Math.random() <= 0.5;
|
| 63 |
+
if (isRandomSample) {
|
| 64 |
+
externalTaskService.complete(externalTask, variables);
|
| 65 |
+
} else {
|
| 66 |
+
externalTaskService.complete(externalTask, null, variables);
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
System.out.println("The External Task " + externalTask.getId() +
|
| 70 |
+
" has been completed!");
|
| 71 |
+
|
| 72 |
+
}).open();
|
| 73 |
+
|
| 74 |
+
client.subscribe("invoiceArchiver")
|
| 75 |
+
.handler((externalTask, externalTaskService) -> {
|
| 76 |
+
TypedValue typedInvoice = externalTask.getVariableTyped("invoice");
|
| 77 |
+
Invoice invoice = (Invoice) typedInvoice.getValue();
|
| 78 |
+
System.out.println("Invoice on process scope archived: " + invoice);
|
| 79 |
+
externalTaskService.complete(externalTask);
|
| 80 |
+
}).open();
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/clients/java/order-handling/src/main/java/org/camunda/bpm/Invoice.java
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
package org.camunda.bpm;
|
| 18 |
+
|
| 19 |
+
public class Invoice {
|
| 20 |
+
|
| 21 |
+
public String id;
|
| 22 |
+
|
| 23 |
+
public Invoice(String id) {
|
| 24 |
+
this.id = id;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
public Invoice() {
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
@Override
|
| 31 |
+
public String toString() {
|
| 32 |
+
return "Invoice [id=" + id + "]";
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cmmn-model-api/typed-custom-elements/README.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Accessing custom CMMN extension elements in a strongly-typed way
|
| 2 |
+
|
| 3 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/cmmn-model-api/typed-custom-elements).
|
| 4 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 5 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-angular-open-usertasks/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Angular "Open Usertasks" Cockpit Tab
|
| 2 |
+
=======================================
|
| 3 |
+
|
| 4 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/cockpit/cockpit-angular-open-usertasks).
|
| 5 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 6 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-angularjs-search-processes/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
AngularJS 1.x "Search Processes" Cockpit Plugin
|
| 2 |
+
======================================================
|
| 3 |
+
|
| 4 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/cockpit/cockpit-angularjs-search-processes).
|
| 5 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 6 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
node_modules/*
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# bpmn.js Cockpit module - bundled
|
| 2 |
+
|
| 3 |
+
This example shows how to develop, bundle and include a bpmn-js custom module into Cockpit.
|
| 4 |
+
|
| 5 |
+
For additional information, please also see the [documentation](https://docs.camunda.org/manual/latest/webapps/cockpit/extend/configuration/#bpmn-diagram-viewer-bpmn-js).
|
| 6 |
+
|
| 7 |
+
Built and tested against Camunda Platform version `7.24.0`.
|
| 8 |
+
|
| 9 |
+

|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
## Develop the custom bpmn-js module
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
For this example, we will implement a custom renderer, which will renderer BPMN UserTasks and Events differently.
|
| 16 |
+
|
| 17 |
+
You can find the source code in the [`custom-renderer` directory](./custom-renderer).
|
| 18 |
+
|
| 19 |
+
Implementing a custom renderer is just one of many examples how you can customize [bpmn-js](https://github.com/bpmn-io/bpmn-js) to your needs. Please visit the [bpmn-js Custom Rendering](https://github.com/bpmn-io/bpmn-js-example-custom-rendering) example to find out more about rendering and how to customize it. Please visit [awesome bpmn-js](https://github.com/bpmn-io/awesome-bpmn-io) for various other resources and projects around bpmn-js and other bpmn-io libraries.
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
## Bundle the custom renderer
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
The Cockpit WebApplication will import the additional modules during runtime in the browser. Hence, the [sources](./custom-renderer) need to be bundled so that they can be interpreted by the browser. In order to do that, we will use [rollup](https://rollupjs.org/). We will also use the [rollup-commonjs](https://github.com/rollup/plugins/tree/master/packages/commonjs) plugin to convert the sources to ES6 and the [rollup-node-resolve](https://github.com/rollup/plugins/tree/master/packages/node-resolve) plugin to include third party modules required by our custom renderer.
|
| 26 |
+
|
| 27 |
+
Our `rollup.config.js` file looks like this:
|
| 28 |
+
```js
|
| 29 |
+
import resolve from "@rollup/plugin-node-resolve";
|
| 30 |
+
import commonjs from "@rollup/plugin-commonjs";
|
| 31 |
+
|
| 32 |
+
export default {
|
| 33 |
+
input: "custom-renderer/index.js",
|
| 34 |
+
output: {
|
| 35 |
+
file: "dist/custom-renderer-module-bundled.js"
|
| 36 |
+
},
|
| 37 |
+
plugins: [resolve(), commonjs()]
|
| 38 |
+
};
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
We can create the bundled `.js` file by running
|
| 42 |
+
```sh
|
| 43 |
+
$ npm run bundle
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
Note that the bundled [`custom-renderer-module-bundled.js` module](./dist/custom-renderer-module-bundled.js) is included in this repository, so you don't necessarily have to locally run all of the above steps.
|
| 47 |
+
|
| 48 |
+
## Include the bundled module in Cockpit
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
To include the bundled module in your Cockpit application, copy the [`custom-renderer-module-bundled.js` file](./dist/custom-renderer-module-bundled.js) into the `app/cockpit/scripts/` folder in your Camunda webapp distribution.
|
| 52 |
+
For the Tomcat distribution, this would be `server/apache-tomcat-X.X.XX/webapps/camunda/app/cockpit/scripts/`.
|
| 53 |
+
|
| 54 |
+
Then, add the following content to the `app/cockpit/scripts/config.js` file:
|
| 55 |
+
|
| 56 |
+
```javascript
|
| 57 |
+
// …
|
| 58 |
+
bpmnJs: {
|
| 59 |
+
additionalModules: [
|
| 60 |
+
'scripts/custom-renderer-module-bundled'
|
| 61 |
+
]
|
| 62 |
+
}
|
| 63 |
+
// …
|
| 64 |
+
```
|
| 65 |
+
After that, start the server, login to Cockpit and navigate to the Process instance view to check the result.
|
| 66 |
+
|
| 67 |
+
License
|
| 68 |
+
-------
|
| 69 |
+
|
| 70 |
+
Use under terms of the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/custom-renderer/CustomRenderer.js
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
import BaseRenderer from 'diagram-js/lib/draw/BaseRenderer';
|
| 20 |
+
|
| 21 |
+
import {
|
| 22 |
+
append as svgAppend,
|
| 23 |
+
attr as svgAttr,
|
| 24 |
+
create as svgCreate,
|
| 25 |
+
remove as svgRemove
|
| 26 |
+
} from 'tiny-svg';
|
| 27 |
+
|
| 28 |
+
import {
|
| 29 |
+
getRoundRectPath
|
| 30 |
+
} from 'bpmn-js/lib/draw/BpmnRenderUtil';
|
| 31 |
+
|
| 32 |
+
import { is } from 'bpmn-js/lib/util/ModelUtil';
|
| 33 |
+
import { isAny } from 'bpmn-js/lib/features/modeling/util/ModelingUtil';
|
| 34 |
+
|
| 35 |
+
const HIGH_PRIORITY = 1500,
|
| 36 |
+
TASK_BORDER_RADIUS = 2;
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
export default class CustomRenderer extends BaseRenderer {
|
| 40 |
+
constructor(eventBus, bpmnRenderer) {
|
| 41 |
+
super(eventBus, HIGH_PRIORITY);
|
| 42 |
+
|
| 43 |
+
this.bpmnRenderer = bpmnRenderer;
|
| 44 |
+
}
|
| 45 |
+
|
| 46 |
+
canRender(element) {
|
| 47 |
+
|
| 48 |
+
// only render tasks and events (ignore labels)
|
| 49 |
+
return isAny(element, [ 'bpmn:Task', 'bpmn:Event' ]) && !element.labelTarget;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
drawShape(parentNode, element) {
|
| 53 |
+
const shape = this.bpmnRenderer.drawShape(parentNode, element);
|
| 54 |
+
|
| 55 |
+
if (is(element, 'bpmn:Task')) {
|
| 56 |
+
const rect = drawRect(parentNode, 100, 80, TASK_BORDER_RADIUS, '#52B415');
|
| 57 |
+
|
| 58 |
+
prependTo(rect, parentNode);
|
| 59 |
+
|
| 60 |
+
svgRemove(shape);
|
| 61 |
+
|
| 62 |
+
return shape;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
const rect = drawRect(parentNode, 30, 20, TASK_BORDER_RADIUS, '#cc0000');
|
| 66 |
+
|
| 67 |
+
svgAttr(rect, {
|
| 68 |
+
transform: 'translate(-20, -10)'
|
| 69 |
+
});
|
| 70 |
+
|
| 71 |
+
return shape;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
getShapePath(shape) {
|
| 75 |
+
if (is(shape, 'bpmn:Task')) {
|
| 76 |
+
return getRoundRectPath(shape, TASK_BORDER_RADIUS);
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
return this.bpmnRenderer.getShapePath(shape);
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
CustomRenderer.$inject = [ 'eventBus', 'bpmnRenderer' ];
|
| 84 |
+
|
| 85 |
+
// helpers //////////
|
| 86 |
+
|
| 87 |
+
// copied from https://github.com/bpmn-io/bpmn-js/blob/master/lib/draw/BpmnRenderer.js
|
| 88 |
+
function drawRect(parentNode, width, height, borderRadius, strokeColor) {
|
| 89 |
+
const rect = svgCreate('rect');
|
| 90 |
+
|
| 91 |
+
svgAttr(rect, {
|
| 92 |
+
width: width,
|
| 93 |
+
height: height,
|
| 94 |
+
rx: borderRadius,
|
| 95 |
+
ry: borderRadius,
|
| 96 |
+
stroke: strokeColor || '#000',
|
| 97 |
+
strokeWidth: 2,
|
| 98 |
+
fill: '#fff'
|
| 99 |
+
});
|
| 100 |
+
|
| 101 |
+
svgAppend(parentNode, rect);
|
| 102 |
+
|
| 103 |
+
return rect;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
// copied from https://github.com/bpmn-io/diagram-js/blob/master/lib/core/GraphicsFactory.js
|
| 107 |
+
function prependTo(newNode, parentNode, siblingNode) {
|
| 108 |
+
parentNode.insertBefore(newNode, siblingNode || parentNode.firstChild);
|
| 109 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/custom-renderer/index.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
import CustomRenderer from './CustomRenderer';
|
| 20 |
+
|
| 21 |
+
export default {
|
| 22 |
+
__init__: [ 'customRenderer' ],
|
| 23 |
+
customRenderer: [ 'type', CustomRenderer ]
|
| 24 |
+
};
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/dist/custom-renderer-module-bundled.js
ADDED
|
@@ -0,0 +1,779 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
var DEFAULT_RENDER_PRIORITY = 1000;
|
| 2 |
+
|
| 3 |
+
/**
|
| 4 |
+
* @typedef {import('../core/Types').ElementLike} Element
|
| 5 |
+
* @typedef {import('../core/Types').ConnectionLike} Connection
|
| 6 |
+
* @typedef {import('../core/Types').ShapeLike} Shape
|
| 7 |
+
*
|
| 8 |
+
* @typedef {import('../core/EventBus').default} EventBus
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
/**
|
| 12 |
+
* The base implementation of shape and connection renderers.
|
| 13 |
+
*
|
| 14 |
+
* @param {EventBus} eventBus
|
| 15 |
+
* @param {number} [renderPriority=1000]
|
| 16 |
+
*/
|
| 17 |
+
function BaseRenderer(eventBus, renderPriority) {
|
| 18 |
+
var self = this;
|
| 19 |
+
|
| 20 |
+
renderPriority = renderPriority || DEFAULT_RENDER_PRIORITY;
|
| 21 |
+
|
| 22 |
+
eventBus.on([ 'render.shape', 'render.connection' ], renderPriority, function(evt, context) {
|
| 23 |
+
var type = evt.type,
|
| 24 |
+
element = context.element,
|
| 25 |
+
visuals = context.gfx,
|
| 26 |
+
attrs = context.attrs;
|
| 27 |
+
|
| 28 |
+
if (self.canRender(element)) {
|
| 29 |
+
if (type === 'render.shape') {
|
| 30 |
+
return self.drawShape(visuals, element, attrs);
|
| 31 |
+
} else {
|
| 32 |
+
return self.drawConnection(visuals, element, attrs);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
});
|
| 36 |
+
|
| 37 |
+
eventBus.on([ 'render.getShapePath', 'render.getConnectionPath' ], renderPriority, function(evt, element) {
|
| 38 |
+
if (self.canRender(element)) {
|
| 39 |
+
if (evt.type === 'render.getShapePath') {
|
| 40 |
+
return self.getShapePath(element);
|
| 41 |
+
} else {
|
| 42 |
+
return self.getConnectionPath(element);
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
});
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
/**
|
| 49 |
+
* Checks whether an element can be rendered.
|
| 50 |
+
*
|
| 51 |
+
* @param {Element} element The element to be rendered.
|
| 52 |
+
*
|
| 53 |
+
* @return {boolean} Whether the element can be rendered.
|
| 54 |
+
*/
|
| 55 |
+
BaseRenderer.prototype.canRender = function(element) {};
|
| 56 |
+
|
| 57 |
+
/**
|
| 58 |
+
* Draws a shape.
|
| 59 |
+
*
|
| 60 |
+
* @param {SVGElement} visuals The SVG element to draw the shape into.
|
| 61 |
+
* @param {Shape} shape The shape to be drawn.
|
| 62 |
+
*
|
| 63 |
+
* @return {SVGElement} The SVG element of the shape drawn.
|
| 64 |
+
*/
|
| 65 |
+
BaseRenderer.prototype.drawShape = function(visuals, shape) {};
|
| 66 |
+
|
| 67 |
+
/**
|
| 68 |
+
* Draws a connection.
|
| 69 |
+
*
|
| 70 |
+
* @param {SVGElement} visuals The SVG element to draw the connection into.
|
| 71 |
+
* @param {Connection} connection The connection to be drawn.
|
| 72 |
+
*
|
| 73 |
+
* @return {SVGElement} The SVG element of the connection drawn.
|
| 74 |
+
*/
|
| 75 |
+
BaseRenderer.prototype.drawConnection = function(visuals, connection) {};
|
| 76 |
+
|
| 77 |
+
/**
|
| 78 |
+
* Gets the SVG path of the graphical representation of a shape.
|
| 79 |
+
*
|
| 80 |
+
* @param {Shape} shape The shape.
|
| 81 |
+
*
|
| 82 |
+
* @return {string} The SVG path of the shape.
|
| 83 |
+
*/
|
| 84 |
+
BaseRenderer.prototype.getShapePath = function(shape) {};
|
| 85 |
+
|
| 86 |
+
/**
|
| 87 |
+
* Gets the SVG path of the graphical representation of a connection.
|
| 88 |
+
*
|
| 89 |
+
* @param {Connection} connection The connection.
|
| 90 |
+
*
|
| 91 |
+
* @return {string} The SVG path of the connection.
|
| 92 |
+
*/
|
| 93 |
+
BaseRenderer.prototype.getConnectionPath = function(connection) {};
|
| 94 |
+
|
| 95 |
+
function ensureImported(element, target) {
|
| 96 |
+
|
| 97 |
+
if (element.ownerDocument !== target.ownerDocument) {
|
| 98 |
+
try {
|
| 99 |
+
|
| 100 |
+
// may fail on webkit
|
| 101 |
+
return target.ownerDocument.importNode(element, true);
|
| 102 |
+
} catch (e) {
|
| 103 |
+
|
| 104 |
+
// ignore
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
return element;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
/**
|
| 112 |
+
* appendTo utility
|
| 113 |
+
*/
|
| 114 |
+
|
| 115 |
+
|
| 116 |
+
/**
|
| 117 |
+
* Append a node to a target element and return the appended node.
|
| 118 |
+
*
|
| 119 |
+
* @param {SVGElement} element
|
| 120 |
+
* @param {SVGElement} target
|
| 121 |
+
*
|
| 122 |
+
* @return {SVGElement} the appended node
|
| 123 |
+
*/
|
| 124 |
+
function appendTo(element, target) {
|
| 125 |
+
return target.appendChild(ensureImported(element, target));
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
/**
|
| 129 |
+
* append utility
|
| 130 |
+
*/
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
/**
|
| 134 |
+
* Append a node to an element
|
| 135 |
+
*
|
| 136 |
+
* @param {SVGElement} element
|
| 137 |
+
* @param {SVGElement} node
|
| 138 |
+
*
|
| 139 |
+
* @return {SVGElement} the element
|
| 140 |
+
*/
|
| 141 |
+
function append(target, node) {
|
| 142 |
+
appendTo(node, target);
|
| 143 |
+
return target;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
/**
|
| 147 |
+
* attribute accessor utility
|
| 148 |
+
*/
|
| 149 |
+
|
| 150 |
+
var LENGTH_ATTR = 2;
|
| 151 |
+
|
| 152 |
+
var CSS_PROPERTIES = {
|
| 153 |
+
'alignment-baseline': 1,
|
| 154 |
+
'baseline-shift': 1,
|
| 155 |
+
'clip': 1,
|
| 156 |
+
'clip-path': 1,
|
| 157 |
+
'clip-rule': 1,
|
| 158 |
+
'color': 1,
|
| 159 |
+
'color-interpolation': 1,
|
| 160 |
+
'color-interpolation-filters': 1,
|
| 161 |
+
'color-profile': 1,
|
| 162 |
+
'color-rendering': 1,
|
| 163 |
+
'cursor': 1,
|
| 164 |
+
'direction': 1,
|
| 165 |
+
'display': 1,
|
| 166 |
+
'dominant-baseline': 1,
|
| 167 |
+
'enable-background': 1,
|
| 168 |
+
'fill': 1,
|
| 169 |
+
'fill-opacity': 1,
|
| 170 |
+
'fill-rule': 1,
|
| 171 |
+
'filter': 1,
|
| 172 |
+
'flood-color': 1,
|
| 173 |
+
'flood-opacity': 1,
|
| 174 |
+
'font': 1,
|
| 175 |
+
'font-family': 1,
|
| 176 |
+
'font-size': LENGTH_ATTR,
|
| 177 |
+
'font-size-adjust': 1,
|
| 178 |
+
'font-stretch': 1,
|
| 179 |
+
'font-style': 1,
|
| 180 |
+
'font-variant': 1,
|
| 181 |
+
'font-weight': 1,
|
| 182 |
+
'glyph-orientation-horizontal': 1,
|
| 183 |
+
'glyph-orientation-vertical': 1,
|
| 184 |
+
'image-rendering': 1,
|
| 185 |
+
'kerning': 1,
|
| 186 |
+
'letter-spacing': 1,
|
| 187 |
+
'lighting-color': 1,
|
| 188 |
+
'marker': 1,
|
| 189 |
+
'marker-end': 1,
|
| 190 |
+
'marker-mid': 1,
|
| 191 |
+
'marker-start': 1,
|
| 192 |
+
'mask': 1,
|
| 193 |
+
'opacity': 1,
|
| 194 |
+
'overflow': 1,
|
| 195 |
+
'pointer-events': 1,
|
| 196 |
+
'shape-rendering': 1,
|
| 197 |
+
'stop-color': 1,
|
| 198 |
+
'stop-opacity': 1,
|
| 199 |
+
'stroke': 1,
|
| 200 |
+
'stroke-dasharray': 1,
|
| 201 |
+
'stroke-dashoffset': 1,
|
| 202 |
+
'stroke-linecap': 1,
|
| 203 |
+
'stroke-linejoin': 1,
|
| 204 |
+
'stroke-miterlimit': 1,
|
| 205 |
+
'stroke-opacity': 1,
|
| 206 |
+
'stroke-width': LENGTH_ATTR,
|
| 207 |
+
'text-anchor': 1,
|
| 208 |
+
'text-decoration': 1,
|
| 209 |
+
'text-rendering': 1,
|
| 210 |
+
'unicode-bidi': 1,
|
| 211 |
+
'visibility': 1,
|
| 212 |
+
'word-spacing': 1,
|
| 213 |
+
'writing-mode': 1
|
| 214 |
+
};
|
| 215 |
+
|
| 216 |
+
|
| 217 |
+
function getAttribute(node, name) {
|
| 218 |
+
if (CSS_PROPERTIES[name]) {
|
| 219 |
+
return node.style[name];
|
| 220 |
+
} else {
|
| 221 |
+
return node.getAttributeNS(null, name);
|
| 222 |
+
}
|
| 223 |
+
}
|
| 224 |
+
|
| 225 |
+
function setAttribute(node, name, value) {
|
| 226 |
+
var hyphenated = name.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();
|
| 227 |
+
|
| 228 |
+
var type = CSS_PROPERTIES[hyphenated];
|
| 229 |
+
|
| 230 |
+
if (type) {
|
| 231 |
+
|
| 232 |
+
// append pixel unit, unless present
|
| 233 |
+
if (type === LENGTH_ATTR && typeof value === 'number') {
|
| 234 |
+
value = String(value) + 'px';
|
| 235 |
+
}
|
| 236 |
+
|
| 237 |
+
node.style[hyphenated] = value;
|
| 238 |
+
} else {
|
| 239 |
+
node.setAttributeNS(null, name, value);
|
| 240 |
+
}
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
function setAttributes(node, attrs) {
|
| 244 |
+
|
| 245 |
+
var names = Object.keys(attrs), i, name;
|
| 246 |
+
|
| 247 |
+
for (i = 0, name; (name = names[i]); i++) {
|
| 248 |
+
setAttribute(node, name, attrs[name]);
|
| 249 |
+
}
|
| 250 |
+
}
|
| 251 |
+
|
| 252 |
+
/**
|
| 253 |
+
* Gets or sets raw attributes on a node.
|
| 254 |
+
*
|
| 255 |
+
* @param {SVGElement} node
|
| 256 |
+
* @param {Object} [attrs]
|
| 257 |
+
* @param {String} [name]
|
| 258 |
+
* @param {String} [value]
|
| 259 |
+
*
|
| 260 |
+
* @return {String}
|
| 261 |
+
*/
|
| 262 |
+
function attr(node, name, value) {
|
| 263 |
+
if (typeof name === 'string') {
|
| 264 |
+
{
|
| 265 |
+
return getAttribute(node, name);
|
| 266 |
+
}
|
| 267 |
+
} else {
|
| 268 |
+
setAttributes(node, name);
|
| 269 |
+
}
|
| 270 |
+
|
| 271 |
+
return node;
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
var ns = {
|
| 275 |
+
svg: 'http://www.w3.org/2000/svg'
|
| 276 |
+
};
|
| 277 |
+
|
| 278 |
+
/**
|
| 279 |
+
* DOM parsing utility
|
| 280 |
+
*/
|
| 281 |
+
|
| 282 |
+
|
| 283 |
+
var SVG_START = '<svg xmlns="' + ns.svg + '"';
|
| 284 |
+
|
| 285 |
+
function parse(svg) {
|
| 286 |
+
|
| 287 |
+
var unwrap = false;
|
| 288 |
+
|
| 289 |
+
// ensure we import a valid svg document
|
| 290 |
+
if (svg.substring(0, 4) === '<svg') {
|
| 291 |
+
if (svg.indexOf(ns.svg) === -1) {
|
| 292 |
+
svg = SVG_START + svg.substring(4);
|
| 293 |
+
}
|
| 294 |
+
} else {
|
| 295 |
+
|
| 296 |
+
// namespace svg
|
| 297 |
+
svg = SVG_START + '>' + svg + '</svg>';
|
| 298 |
+
unwrap = true;
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
var parsed = parseDocument(svg);
|
| 302 |
+
|
| 303 |
+
if (!unwrap) {
|
| 304 |
+
return parsed;
|
| 305 |
+
}
|
| 306 |
+
|
| 307 |
+
var fragment = document.createDocumentFragment();
|
| 308 |
+
|
| 309 |
+
var parent = parsed.firstChild;
|
| 310 |
+
|
| 311 |
+
while (parent.firstChild) {
|
| 312 |
+
fragment.appendChild(parent.firstChild);
|
| 313 |
+
}
|
| 314 |
+
|
| 315 |
+
return fragment;
|
| 316 |
+
}
|
| 317 |
+
|
| 318 |
+
function parseDocument(svg) {
|
| 319 |
+
|
| 320 |
+
var parser;
|
| 321 |
+
|
| 322 |
+
// parse
|
| 323 |
+
parser = new DOMParser();
|
| 324 |
+
parser.async = false;
|
| 325 |
+
|
| 326 |
+
return parser.parseFromString(svg, 'text/xml');
|
| 327 |
+
}
|
| 328 |
+
|
| 329 |
+
/**
|
| 330 |
+
* Create utility for SVG elements
|
| 331 |
+
*/
|
| 332 |
+
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
/**
|
| 336 |
+
* Create a specific type from name or SVG markup.
|
| 337 |
+
*
|
| 338 |
+
* @param {String} name the name or markup of the element
|
| 339 |
+
* @param {Object} [attrs] attributes to set on the element
|
| 340 |
+
*
|
| 341 |
+
* @returns {SVGElement}
|
| 342 |
+
*/
|
| 343 |
+
function create(name, attrs) {
|
| 344 |
+
var element;
|
| 345 |
+
|
| 346 |
+
name = name.trim();
|
| 347 |
+
|
| 348 |
+
if (name.charAt(0) === '<') {
|
| 349 |
+
element = parse(name).firstChild;
|
| 350 |
+
element = document.importNode(element, true);
|
| 351 |
+
} else {
|
| 352 |
+
element = document.createElementNS(ns.svg, name);
|
| 353 |
+
}
|
| 354 |
+
|
| 355 |
+
return element;
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
function remove(element) {
|
| 359 |
+
var parent = element.parentNode;
|
| 360 |
+
|
| 361 |
+
if (parent) {
|
| 362 |
+
parent.removeChild(element);
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
return element;
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
/**
|
| 369 |
+
* Flatten array, one level deep.
|
| 370 |
+
*
|
| 371 |
+
* @template T
|
| 372 |
+
*
|
| 373 |
+
* @param {T[][] | T[] | null} [arr]
|
| 374 |
+
*
|
| 375 |
+
* @return {T[]}
|
| 376 |
+
*/
|
| 377 |
+
|
| 378 |
+
const nativeToString = Object.prototype.toString;
|
| 379 |
+
const nativeHasOwnProperty = Object.prototype.hasOwnProperty;
|
| 380 |
+
|
| 381 |
+
function isUndefined(obj) {
|
| 382 |
+
return obj === undefined;
|
| 383 |
+
}
|
| 384 |
+
|
| 385 |
+
function isNil(obj) {
|
| 386 |
+
return obj == null;
|
| 387 |
+
}
|
| 388 |
+
|
| 389 |
+
function isArray(obj) {
|
| 390 |
+
return nativeToString.call(obj) === '[object Array]';
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
/**
|
| 394 |
+
* @param {any} obj
|
| 395 |
+
*
|
| 396 |
+
* @return {boolean}
|
| 397 |
+
*/
|
| 398 |
+
function isFunction(obj) {
|
| 399 |
+
const tag = nativeToString.call(obj);
|
| 400 |
+
|
| 401 |
+
return (
|
| 402 |
+
tag === '[object Function]' ||
|
| 403 |
+
tag === '[object AsyncFunction]' ||
|
| 404 |
+
tag === '[object GeneratorFunction]' ||
|
| 405 |
+
tag === '[object AsyncGeneratorFunction]' ||
|
| 406 |
+
tag === '[object Proxy]'
|
| 407 |
+
);
|
| 408 |
+
}
|
| 409 |
+
|
| 410 |
+
/**
|
| 411 |
+
* Return true, if target owns a property with the given key.
|
| 412 |
+
*
|
| 413 |
+
* @param {Object} target
|
| 414 |
+
* @param {String} key
|
| 415 |
+
*
|
| 416 |
+
* @return {Boolean}
|
| 417 |
+
*/
|
| 418 |
+
function has(target, key) {
|
| 419 |
+
return !isNil(target) && nativeHasOwnProperty.call(target, key);
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
/**
|
| 423 |
+
* @template T
|
| 424 |
+
* @typedef { (
|
| 425 |
+
* ((e: T) => boolean) |
|
| 426 |
+
* ((e: T, idx: number) => boolean) |
|
| 427 |
+
* ((e: T, key: string) => boolean) |
|
| 428 |
+
* string |
|
| 429 |
+
* number
|
| 430 |
+
* ) } Matcher
|
| 431 |
+
*/
|
| 432 |
+
|
| 433 |
+
/**
|
| 434 |
+
* @template T
|
| 435 |
+
* @template U
|
| 436 |
+
*
|
| 437 |
+
* @typedef { (
|
| 438 |
+
* ((e: T) => U) | string | number
|
| 439 |
+
* ) } Extractor
|
| 440 |
+
*/
|
| 441 |
+
|
| 442 |
+
|
| 443 |
+
/**
|
| 444 |
+
* @template T
|
| 445 |
+
* @typedef { (val: T, key: any) => boolean } MatchFn
|
| 446 |
+
*/
|
| 447 |
+
|
| 448 |
+
/**
|
| 449 |
+
* @template T
|
| 450 |
+
* @typedef { T[] } ArrayCollection
|
| 451 |
+
*/
|
| 452 |
+
|
| 453 |
+
/**
|
| 454 |
+
* @template T
|
| 455 |
+
* @typedef { { [key: string]: T } } StringKeyValueCollection
|
| 456 |
+
*/
|
| 457 |
+
|
| 458 |
+
/**
|
| 459 |
+
* @template T
|
| 460 |
+
* @typedef { { [key: number]: T } } NumberKeyValueCollection
|
| 461 |
+
*/
|
| 462 |
+
|
| 463 |
+
/**
|
| 464 |
+
* @template T
|
| 465 |
+
* @typedef { StringKeyValueCollection<T> | NumberKeyValueCollection<T> } KeyValueCollection
|
| 466 |
+
*/
|
| 467 |
+
|
| 468 |
+
/**
|
| 469 |
+
* @template T
|
| 470 |
+
* @typedef { KeyValueCollection<T> | ArrayCollection<T> } Collection
|
| 471 |
+
*/
|
| 472 |
+
|
| 473 |
+
/**
|
| 474 |
+
* Find element in collection.
|
| 475 |
+
*
|
| 476 |
+
* @template T
|
| 477 |
+
* @param {Collection<T>} collection
|
| 478 |
+
* @param {Matcher<T>} matcher
|
| 479 |
+
*
|
| 480 |
+
* @return {Object}
|
| 481 |
+
*/
|
| 482 |
+
function find(collection, matcher) {
|
| 483 |
+
|
| 484 |
+
const matchFn = toMatcher(matcher);
|
| 485 |
+
|
| 486 |
+
let match;
|
| 487 |
+
|
| 488 |
+
forEach(collection, function(val, key) {
|
| 489 |
+
if (matchFn(val, key)) {
|
| 490 |
+
match = val;
|
| 491 |
+
|
| 492 |
+
return false;
|
| 493 |
+
}
|
| 494 |
+
});
|
| 495 |
+
|
| 496 |
+
return match;
|
| 497 |
+
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
|
| 501 |
+
/**
|
| 502 |
+
* Iterate over collection; returning something
|
| 503 |
+
* (non-undefined) will stop iteration.
|
| 504 |
+
*
|
| 505 |
+
* @template T
|
| 506 |
+
* @param {Collection<T>} collection
|
| 507 |
+
* @param { ((item: T, idx: number) => (boolean|void)) | ((item: T, key: string) => (boolean|void)) } iterator
|
| 508 |
+
*
|
| 509 |
+
* @return {T} return result that stopped the iteration
|
| 510 |
+
*/
|
| 511 |
+
function forEach(collection, iterator) {
|
| 512 |
+
|
| 513 |
+
let val,
|
| 514 |
+
result;
|
| 515 |
+
|
| 516 |
+
if (isUndefined(collection)) {
|
| 517 |
+
return;
|
| 518 |
+
}
|
| 519 |
+
|
| 520 |
+
const convertKey = isArray(collection) ? toNum : identity;
|
| 521 |
+
|
| 522 |
+
for (let key in collection) {
|
| 523 |
+
|
| 524 |
+
if (has(collection, key)) {
|
| 525 |
+
val = collection[key];
|
| 526 |
+
|
| 527 |
+
result = iterator(val, convertKey(key));
|
| 528 |
+
|
| 529 |
+
if (result === false) {
|
| 530 |
+
return val;
|
| 531 |
+
}
|
| 532 |
+
}
|
| 533 |
+
}
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
|
| 537 |
+
/**
|
| 538 |
+
* Return true if some elements in the collection
|
| 539 |
+
* match the criteria.
|
| 540 |
+
*
|
| 541 |
+
* @param {Object|Array} collection
|
| 542 |
+
* @param {Function} matcher
|
| 543 |
+
*
|
| 544 |
+
* @return {Boolean}
|
| 545 |
+
*/
|
| 546 |
+
function some(collection, matcher) {
|
| 547 |
+
|
| 548 |
+
return !!find(collection, matcher);
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
|
| 552 |
+
/**
|
| 553 |
+
* @template T
|
| 554 |
+
* @param {Matcher<T>} matcher
|
| 555 |
+
*
|
| 556 |
+
* @return {MatchFn<T>}
|
| 557 |
+
*/
|
| 558 |
+
function toMatcher(matcher) {
|
| 559 |
+
return isFunction(matcher) ? matcher : (e) => {
|
| 560 |
+
return e === matcher;
|
| 561 |
+
};
|
| 562 |
+
}
|
| 563 |
+
|
| 564 |
+
|
| 565 |
+
function identity(arg) {
|
| 566 |
+
return arg;
|
| 567 |
+
}
|
| 568 |
+
|
| 569 |
+
function toNum(arg) {
|
| 570 |
+
return Number(arg);
|
| 571 |
+
}
|
| 572 |
+
|
| 573 |
+
/**
|
| 574 |
+
* @typedef { import('../model/Types').Element } Element
|
| 575 |
+
* @typedef { import('../model/Types').ModdleElement } ModdleElement
|
| 576 |
+
*/
|
| 577 |
+
|
| 578 |
+
/**
|
| 579 |
+
* Is an element of the given BPMN type?
|
| 580 |
+
*
|
| 581 |
+
* @param {Element|ModdleElement} element
|
| 582 |
+
* @param {string} type
|
| 583 |
+
*
|
| 584 |
+
* @return {boolean}
|
| 585 |
+
*/
|
| 586 |
+
function is(element, type) {
|
| 587 |
+
var bo = getBusinessObject(element);
|
| 588 |
+
|
| 589 |
+
return bo && (typeof bo.$instanceOf === 'function') && bo.$instanceOf(type);
|
| 590 |
+
}
|
| 591 |
+
|
| 592 |
+
|
| 593 |
+
/**
|
| 594 |
+
* Return true if element has any of the given types.
|
| 595 |
+
*
|
| 596 |
+
* @param {Element|ModdleElement} element
|
| 597 |
+
* @param {string[]} types
|
| 598 |
+
*
|
| 599 |
+
* @return {boolean}
|
| 600 |
+
*/
|
| 601 |
+
function isAny(element, types) {
|
| 602 |
+
return some(types, function(t) {
|
| 603 |
+
return is(element, t);
|
| 604 |
+
});
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
/**
|
| 608 |
+
* Return the business object for a given element.
|
| 609 |
+
*
|
| 610 |
+
* @param {Element|ModdleElement} element
|
| 611 |
+
*
|
| 612 |
+
* @return {ModdleElement}
|
| 613 |
+
*/
|
| 614 |
+
function getBusinessObject(element) {
|
| 615 |
+
return (element && element.businessObject) || element;
|
| 616 |
+
}
|
| 617 |
+
|
| 618 |
+
/**
|
| 619 |
+
* @typedef {(string|number)[]} Component
|
| 620 |
+
*
|
| 621 |
+
* @typedef {import('../util/Types').Point} Point
|
| 622 |
+
*/
|
| 623 |
+
|
| 624 |
+
/**
|
| 625 |
+
* @param {Component[] | Component[][]} elements
|
| 626 |
+
*
|
| 627 |
+
* @return {string}
|
| 628 |
+
*/
|
| 629 |
+
function componentsToPath(elements) {
|
| 630 |
+
return elements.flat().join(',').replace(/,?([A-Za-z]),?/g, '$1');
|
| 631 |
+
}
|
| 632 |
+
|
| 633 |
+
/**
|
| 634 |
+
* @param {ShapeLike} shape
|
| 635 |
+
* @param {number} [borderRadius]
|
| 636 |
+
*
|
| 637 |
+
* @return {string} path
|
| 638 |
+
*/
|
| 639 |
+
function getRoundRectPath(shape, borderRadius) {
|
| 640 |
+
|
| 641 |
+
var x = shape.x,
|
| 642 |
+
y = shape.y,
|
| 643 |
+
width = shape.width,
|
| 644 |
+
height = shape.height;
|
| 645 |
+
|
| 646 |
+
var roundRectPath = [
|
| 647 |
+
[ 'M', x + borderRadius, y ],
|
| 648 |
+
[ 'l', width - borderRadius * 2, 0 ],
|
| 649 |
+
[ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, borderRadius ],
|
| 650 |
+
[ 'l', 0, height - borderRadius * 2 ],
|
| 651 |
+
[ 'a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, borderRadius ],
|
| 652 |
+
[ 'l', borderRadius * 2 - width, 0 ],
|
| 653 |
+
[ 'a', borderRadius, borderRadius, 0, 0, 1, -borderRadius, -borderRadius ],
|
| 654 |
+
[ 'l', 0, borderRadius * 2 - height ],
|
| 655 |
+
[ 'a', borderRadius, borderRadius, 0, 0, 1, borderRadius, -borderRadius ],
|
| 656 |
+
[ 'z' ]
|
| 657 |
+
];
|
| 658 |
+
|
| 659 |
+
return componentsToPath(roundRectPath);
|
| 660 |
+
}
|
| 661 |
+
|
| 662 |
+
/*
|
| 663 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 664 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 665 |
+
* distributed with this work for additional information regarding copyright
|
| 666 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 667 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 668 |
+
* You may obtain a copy of the License at
|
| 669 |
+
*
|
| 670 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 671 |
+
*
|
| 672 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 673 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 674 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 675 |
+
* See the License for the specific language governing permissions and
|
| 676 |
+
* limitations under the License.
|
| 677 |
+
*/
|
| 678 |
+
|
| 679 |
+
|
| 680 |
+
const HIGH_PRIORITY = 1500,
|
| 681 |
+
TASK_BORDER_RADIUS = 2;
|
| 682 |
+
|
| 683 |
+
|
| 684 |
+
class CustomRenderer extends BaseRenderer {
|
| 685 |
+
constructor(eventBus, bpmnRenderer) {
|
| 686 |
+
super(eventBus, HIGH_PRIORITY);
|
| 687 |
+
|
| 688 |
+
this.bpmnRenderer = bpmnRenderer;
|
| 689 |
+
}
|
| 690 |
+
|
| 691 |
+
canRender(element) {
|
| 692 |
+
|
| 693 |
+
// only render tasks and events (ignore labels)
|
| 694 |
+
return isAny(element, [ 'bpmn:Task', 'bpmn:Event' ]) && !element.labelTarget;
|
| 695 |
+
}
|
| 696 |
+
|
| 697 |
+
drawShape(parentNode, element) {
|
| 698 |
+
const shape = this.bpmnRenderer.drawShape(parentNode, element);
|
| 699 |
+
|
| 700 |
+
if (is(element, 'bpmn:Task')) {
|
| 701 |
+
const rect = drawRect(parentNode, 100, 80, TASK_BORDER_RADIUS, '#52B415');
|
| 702 |
+
|
| 703 |
+
prependTo(rect, parentNode);
|
| 704 |
+
|
| 705 |
+
remove(shape);
|
| 706 |
+
|
| 707 |
+
return shape;
|
| 708 |
+
}
|
| 709 |
+
|
| 710 |
+
const rect = drawRect(parentNode, 30, 20, TASK_BORDER_RADIUS, '#cc0000');
|
| 711 |
+
|
| 712 |
+
attr(rect, {
|
| 713 |
+
transform: 'translate(-20, -10)'
|
| 714 |
+
});
|
| 715 |
+
|
| 716 |
+
return shape;
|
| 717 |
+
}
|
| 718 |
+
|
| 719 |
+
getShapePath(shape) {
|
| 720 |
+
if (is(shape, 'bpmn:Task')) {
|
| 721 |
+
return getRoundRectPath(shape, TASK_BORDER_RADIUS);
|
| 722 |
+
}
|
| 723 |
+
|
| 724 |
+
return this.bpmnRenderer.getShapePath(shape);
|
| 725 |
+
}
|
| 726 |
+
}
|
| 727 |
+
|
| 728 |
+
CustomRenderer.$inject = [ 'eventBus', 'bpmnRenderer' ];
|
| 729 |
+
|
| 730 |
+
// helpers //////////
|
| 731 |
+
|
| 732 |
+
// copied from https://github.com/bpmn-io/bpmn-js/blob/master/lib/draw/BpmnRenderer.js
|
| 733 |
+
function drawRect(parentNode, width, height, borderRadius, strokeColor) {
|
| 734 |
+
const rect = create('rect');
|
| 735 |
+
|
| 736 |
+
attr(rect, {
|
| 737 |
+
width: width,
|
| 738 |
+
height: height,
|
| 739 |
+
rx: borderRadius,
|
| 740 |
+
ry: borderRadius,
|
| 741 |
+
stroke: strokeColor || '#000',
|
| 742 |
+
strokeWidth: 2,
|
| 743 |
+
fill: '#fff'
|
| 744 |
+
});
|
| 745 |
+
|
| 746 |
+
append(parentNode, rect);
|
| 747 |
+
|
| 748 |
+
return rect;
|
| 749 |
+
}
|
| 750 |
+
|
| 751 |
+
// copied from https://github.com/bpmn-io/diagram-js/blob/master/lib/core/GraphicsFactory.js
|
| 752 |
+
function prependTo(newNode, parentNode, siblingNode) {
|
| 753 |
+
parentNode.insertBefore(newNode, parentNode.firstChild);
|
| 754 |
+
}
|
| 755 |
+
|
| 756 |
+
/*
|
| 757 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 758 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 759 |
+
* distributed with this work for additional information regarding copyright
|
| 760 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 761 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 762 |
+
* You may obtain a copy of the License at
|
| 763 |
+
*
|
| 764 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 765 |
+
*
|
| 766 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 767 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 768 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 769 |
+
* See the License for the specific language governing permissions and
|
| 770 |
+
* limitations under the License.
|
| 771 |
+
*/
|
| 772 |
+
|
| 773 |
+
|
| 774 |
+
var index = {
|
| 775 |
+
__init__: [ 'customRenderer' ],
|
| 776 |
+
customRenderer: [ 'type', CustomRenderer ]
|
| 777 |
+
};
|
| 778 |
+
|
| 779 |
+
export { index as default };
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/package-lock.json
ADDED
|
@@ -0,0 +1,830 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "cockpit-bpmn-js-module-bundled",
|
| 3 |
+
"version": "0.0.1",
|
| 4 |
+
"lockfileVersion": 3,
|
| 5 |
+
"requires": true,
|
| 6 |
+
"packages": {
|
| 7 |
+
"": {
|
| 8 |
+
"name": "cockpit-bpmn-js-module-bundled",
|
| 9 |
+
"version": "0.0.1",
|
| 10 |
+
"license": "Apache-2.0",
|
| 11 |
+
"dependencies": {
|
| 12 |
+
"@rollup/plugin-commonjs": "~28.0.3",
|
| 13 |
+
"@rollup/plugin-node-resolve": "~16.0.1",
|
| 14 |
+
"bpmn-js": "^18.7.0",
|
| 15 |
+
"diagram-js": "^15.4.0",
|
| 16 |
+
"rollup": "^4.52.3",
|
| 17 |
+
"tiny-svg": "^4.1.3"
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
"node_modules/@bpmn-io/diagram-js-ui": {
|
| 21 |
+
"version": "0.2.3",
|
| 22 |
+
"resolved": "https://registry.npmjs.org/@bpmn-io/diagram-js-ui/-/diagram-js-ui-0.2.3.tgz",
|
| 23 |
+
"integrity": "sha512-OGyjZKvGK8tHSZ0l7RfeKhilGoOGtFDcoqSGYkX0uhFlo99OVZ9Jn1K7TJGzcE9BdKwvA5Y5kGqHEhdTxHvFfw==",
|
| 24 |
+
"license": "MIT",
|
| 25 |
+
"dependencies": {
|
| 26 |
+
"htm": "^3.1.1",
|
| 27 |
+
"preact": "^10.11.2"
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"node_modules/@jridgewell/sourcemap-codec": {
|
| 31 |
+
"version": "1.5.5",
|
| 32 |
+
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
|
| 33 |
+
"integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",
|
| 34 |
+
"license": "MIT"
|
| 35 |
+
},
|
| 36 |
+
"node_modules/@rollup/plugin-commonjs": {
|
| 37 |
+
"version": "28.0.6",
|
| 38 |
+
"resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.6.tgz",
|
| 39 |
+
"integrity": "sha512-XSQB1K7FUU5QP+3lOQmVCE3I0FcbbNvmNT4VJSj93iUjayaARrTQeoRdiYQoftAJBLrR9t2agwAd3ekaTgHNlw==",
|
| 40 |
+
"license": "MIT",
|
| 41 |
+
"dependencies": {
|
| 42 |
+
"@rollup/pluginutils": "^5.0.1",
|
| 43 |
+
"commondir": "^1.0.1",
|
| 44 |
+
"estree-walker": "^2.0.2",
|
| 45 |
+
"fdir": "^6.2.0",
|
| 46 |
+
"is-reference": "1.2.1",
|
| 47 |
+
"magic-string": "^0.30.3",
|
| 48 |
+
"picomatch": "^4.0.2"
|
| 49 |
+
},
|
| 50 |
+
"engines": {
|
| 51 |
+
"node": ">=16.0.0 || 14 >= 14.17"
|
| 52 |
+
},
|
| 53 |
+
"peerDependencies": {
|
| 54 |
+
"rollup": "^2.68.0||^3.0.0||^4.0.0"
|
| 55 |
+
},
|
| 56 |
+
"peerDependenciesMeta": {
|
| 57 |
+
"rollup": {
|
| 58 |
+
"optional": true
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
},
|
| 62 |
+
"node_modules/@rollup/plugin-node-resolve": {
|
| 63 |
+
"version": "16.0.1",
|
| 64 |
+
"resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.1.tgz",
|
| 65 |
+
"integrity": "sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==",
|
| 66 |
+
"license": "MIT",
|
| 67 |
+
"dependencies": {
|
| 68 |
+
"@rollup/pluginutils": "^5.0.1",
|
| 69 |
+
"@types/resolve": "1.20.2",
|
| 70 |
+
"deepmerge": "^4.2.2",
|
| 71 |
+
"is-module": "^1.0.0",
|
| 72 |
+
"resolve": "^1.22.1"
|
| 73 |
+
},
|
| 74 |
+
"engines": {
|
| 75 |
+
"node": ">=14.0.0"
|
| 76 |
+
},
|
| 77 |
+
"peerDependencies": {
|
| 78 |
+
"rollup": "^2.78.0||^3.0.0||^4.0.0"
|
| 79 |
+
},
|
| 80 |
+
"peerDependenciesMeta": {
|
| 81 |
+
"rollup": {
|
| 82 |
+
"optional": true
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
},
|
| 86 |
+
"node_modules/@rollup/pluginutils": {
|
| 87 |
+
"version": "5.3.0",
|
| 88 |
+
"resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz",
|
| 89 |
+
"integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==",
|
| 90 |
+
"license": "MIT",
|
| 91 |
+
"dependencies": {
|
| 92 |
+
"@types/estree": "^1.0.0",
|
| 93 |
+
"estree-walker": "^2.0.2",
|
| 94 |
+
"picomatch": "^4.0.2"
|
| 95 |
+
},
|
| 96 |
+
"engines": {
|
| 97 |
+
"node": ">=14.0.0"
|
| 98 |
+
},
|
| 99 |
+
"peerDependencies": {
|
| 100 |
+
"rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
|
| 101 |
+
},
|
| 102 |
+
"peerDependenciesMeta": {
|
| 103 |
+
"rollup": {
|
| 104 |
+
"optional": true
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
},
|
| 108 |
+
"node_modules/@rollup/rollup-android-arm-eabi": {
|
| 109 |
+
"version": "4.52.3",
|
| 110 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.52.3.tgz",
|
| 111 |
+
"integrity": "sha512-h6cqHGZ6VdnwliFG1NXvMPTy/9PS3h8oLh7ImwR+kl+oYnQizgjxsONmmPSb2C66RksfkfIxEVtDSEcJiO0tqw==",
|
| 112 |
+
"cpu": [
|
| 113 |
+
"arm"
|
| 114 |
+
],
|
| 115 |
+
"license": "MIT",
|
| 116 |
+
"optional": true,
|
| 117 |
+
"os": [
|
| 118 |
+
"android"
|
| 119 |
+
]
|
| 120 |
+
},
|
| 121 |
+
"node_modules/@rollup/rollup-android-arm64": {
|
| 122 |
+
"version": "4.52.3",
|
| 123 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.52.3.tgz",
|
| 124 |
+
"integrity": "sha512-wd+u7SLT/u6knklV/ifG7gr5Qy4GUbH2hMWcDauPFJzmCZUAJ8L2bTkVXC2niOIxp8lk3iH/QX8kSrUxVZrOVw==",
|
| 125 |
+
"cpu": [
|
| 126 |
+
"arm64"
|
| 127 |
+
],
|
| 128 |
+
"license": "MIT",
|
| 129 |
+
"optional": true,
|
| 130 |
+
"os": [
|
| 131 |
+
"android"
|
| 132 |
+
]
|
| 133 |
+
},
|
| 134 |
+
"node_modules/@rollup/rollup-darwin-arm64": {
|
| 135 |
+
"version": "4.52.3",
|
| 136 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.52.3.tgz",
|
| 137 |
+
"integrity": "sha512-lj9ViATR1SsqycwFkJCtYfQTheBdvlWJqzqxwc9f2qrcVrQaF/gCuBRTiTolkRWS6KvNxSk4KHZWG7tDktLgjg==",
|
| 138 |
+
"cpu": [
|
| 139 |
+
"arm64"
|
| 140 |
+
],
|
| 141 |
+
"license": "MIT",
|
| 142 |
+
"optional": true,
|
| 143 |
+
"os": [
|
| 144 |
+
"darwin"
|
| 145 |
+
]
|
| 146 |
+
},
|
| 147 |
+
"node_modules/@rollup/rollup-darwin-x64": {
|
| 148 |
+
"version": "4.52.3",
|
| 149 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.52.3.tgz",
|
| 150 |
+
"integrity": "sha512-+Dyo7O1KUmIsbzx1l+4V4tvEVnVQqMOIYtrxK7ncLSknl1xnMHLgn7gddJVrYPNZfEB8CIi3hK8gq8bDhb3h5A==",
|
| 151 |
+
"cpu": [
|
| 152 |
+
"x64"
|
| 153 |
+
],
|
| 154 |
+
"license": "MIT",
|
| 155 |
+
"optional": true,
|
| 156 |
+
"os": [
|
| 157 |
+
"darwin"
|
| 158 |
+
]
|
| 159 |
+
},
|
| 160 |
+
"node_modules/@rollup/rollup-freebsd-arm64": {
|
| 161 |
+
"version": "4.52.3",
|
| 162 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.52.3.tgz",
|
| 163 |
+
"integrity": "sha512-u9Xg2FavYbD30g3DSfNhxgNrxhi6xVG4Y6i9Ur1C7xUuGDW3banRbXj+qgnIrwRN4KeJ396jchwy9bCIzbyBEQ==",
|
| 164 |
+
"cpu": [
|
| 165 |
+
"arm64"
|
| 166 |
+
],
|
| 167 |
+
"license": "MIT",
|
| 168 |
+
"optional": true,
|
| 169 |
+
"os": [
|
| 170 |
+
"freebsd"
|
| 171 |
+
]
|
| 172 |
+
},
|
| 173 |
+
"node_modules/@rollup/rollup-freebsd-x64": {
|
| 174 |
+
"version": "4.52.3",
|
| 175 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.52.3.tgz",
|
| 176 |
+
"integrity": "sha512-5M8kyi/OX96wtD5qJR89a/3x5x8x5inXBZO04JWhkQb2JWavOWfjgkdvUqibGJeNNaz1/Z1PPza5/tAPXICI6A==",
|
| 177 |
+
"cpu": [
|
| 178 |
+
"x64"
|
| 179 |
+
],
|
| 180 |
+
"license": "MIT",
|
| 181 |
+
"optional": true,
|
| 182 |
+
"os": [
|
| 183 |
+
"freebsd"
|
| 184 |
+
]
|
| 185 |
+
},
|
| 186 |
+
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
|
| 187 |
+
"version": "4.52.3",
|
| 188 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.52.3.tgz",
|
| 189 |
+
"integrity": "sha512-IoerZJ4l1wRMopEHRKOO16e04iXRDyZFZnNZKrWeNquh5d6bucjezgd+OxG03mOMTnS1x7hilzb3uURPkJ0OfA==",
|
| 190 |
+
"cpu": [
|
| 191 |
+
"arm"
|
| 192 |
+
],
|
| 193 |
+
"license": "MIT",
|
| 194 |
+
"optional": true,
|
| 195 |
+
"os": [
|
| 196 |
+
"linux"
|
| 197 |
+
]
|
| 198 |
+
},
|
| 199 |
+
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
|
| 200 |
+
"version": "4.52.3",
|
| 201 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.52.3.tgz",
|
| 202 |
+
"integrity": "sha512-ZYdtqgHTDfvrJHSh3W22TvjWxwOgc3ThK/XjgcNGP2DIwFIPeAPNsQxrJO5XqleSlgDux2VAoWQ5iJrtaC1TbA==",
|
| 203 |
+
"cpu": [
|
| 204 |
+
"arm"
|
| 205 |
+
],
|
| 206 |
+
"license": "MIT",
|
| 207 |
+
"optional": true,
|
| 208 |
+
"os": [
|
| 209 |
+
"linux"
|
| 210 |
+
]
|
| 211 |
+
},
|
| 212 |
+
"node_modules/@rollup/rollup-linux-arm64-gnu": {
|
| 213 |
+
"version": "4.52.3",
|
| 214 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.52.3.tgz",
|
| 215 |
+
"integrity": "sha512-NcViG7A0YtuFDA6xWSgmFb6iPFzHlf5vcqb2p0lGEbT+gjrEEz8nC/EeDHvx6mnGXnGCC1SeVV+8u+smj0CeGQ==",
|
| 216 |
+
"cpu": [
|
| 217 |
+
"arm64"
|
| 218 |
+
],
|
| 219 |
+
"license": "MIT",
|
| 220 |
+
"optional": true,
|
| 221 |
+
"os": [
|
| 222 |
+
"linux"
|
| 223 |
+
]
|
| 224 |
+
},
|
| 225 |
+
"node_modules/@rollup/rollup-linux-arm64-musl": {
|
| 226 |
+
"version": "4.52.3",
|
| 227 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.52.3.tgz",
|
| 228 |
+
"integrity": "sha512-d3pY7LWno6SYNXRm6Ebsq0DJGoiLXTb83AIPCXl9fmtIQs/rXoS8SJxxUNtFbJ5MiOvs+7y34np77+9l4nfFMw==",
|
| 229 |
+
"cpu": [
|
| 230 |
+
"arm64"
|
| 231 |
+
],
|
| 232 |
+
"license": "MIT",
|
| 233 |
+
"optional": true,
|
| 234 |
+
"os": [
|
| 235 |
+
"linux"
|
| 236 |
+
]
|
| 237 |
+
},
|
| 238 |
+
"node_modules/@rollup/rollup-linux-loong64-gnu": {
|
| 239 |
+
"version": "4.52.3",
|
| 240 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.52.3.tgz",
|
| 241 |
+
"integrity": "sha512-3y5GA0JkBuirLqmjwAKwB0keDlI6JfGYduMlJD/Rl7fvb4Ni8iKdQs1eiunMZJhwDWdCvrcqXRY++VEBbvk6Eg==",
|
| 242 |
+
"cpu": [
|
| 243 |
+
"loong64"
|
| 244 |
+
],
|
| 245 |
+
"license": "MIT",
|
| 246 |
+
"optional": true,
|
| 247 |
+
"os": [
|
| 248 |
+
"linux"
|
| 249 |
+
]
|
| 250 |
+
},
|
| 251 |
+
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
|
| 252 |
+
"version": "4.52.3",
|
| 253 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.52.3.tgz",
|
| 254 |
+
"integrity": "sha512-AUUH65a0p3Q0Yfm5oD2KVgzTKgwPyp9DSXc3UA7DtxhEb/WSPfbG4wqXeSN62OG5gSo18em4xv6dbfcUGXcagw==",
|
| 255 |
+
"cpu": [
|
| 256 |
+
"ppc64"
|
| 257 |
+
],
|
| 258 |
+
"license": "MIT",
|
| 259 |
+
"optional": true,
|
| 260 |
+
"os": [
|
| 261 |
+
"linux"
|
| 262 |
+
]
|
| 263 |
+
},
|
| 264 |
+
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
|
| 265 |
+
"version": "4.52.3",
|
| 266 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.52.3.tgz",
|
| 267 |
+
"integrity": "sha512-1makPhFFVBqZE+XFg3Dkq+IkQ7JvmUrwwqaYBL2CE+ZpxPaqkGaiWFEWVGyvTwZace6WLJHwjVh/+CXbKDGPmg==",
|
| 268 |
+
"cpu": [
|
| 269 |
+
"riscv64"
|
| 270 |
+
],
|
| 271 |
+
"license": "MIT",
|
| 272 |
+
"optional": true,
|
| 273 |
+
"os": [
|
| 274 |
+
"linux"
|
| 275 |
+
]
|
| 276 |
+
},
|
| 277 |
+
"node_modules/@rollup/rollup-linux-riscv64-musl": {
|
| 278 |
+
"version": "4.52.3",
|
| 279 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.52.3.tgz",
|
| 280 |
+
"integrity": "sha512-OOFJa28dxfl8kLOPMUOQBCO6z3X2SAfzIE276fwT52uXDWUS178KWq0pL7d6p1kz7pkzA0yQwtqL0dEPoVcRWg==",
|
| 281 |
+
"cpu": [
|
| 282 |
+
"riscv64"
|
| 283 |
+
],
|
| 284 |
+
"license": "MIT",
|
| 285 |
+
"optional": true,
|
| 286 |
+
"os": [
|
| 287 |
+
"linux"
|
| 288 |
+
]
|
| 289 |
+
},
|
| 290 |
+
"node_modules/@rollup/rollup-linux-s390x-gnu": {
|
| 291 |
+
"version": "4.52.3",
|
| 292 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.52.3.tgz",
|
| 293 |
+
"integrity": "sha512-jMdsML2VI5l+V7cKfZx3ak+SLlJ8fKvLJ0Eoa4b9/vCUrzXKgoKxvHqvJ/mkWhFiyp88nCkM5S2v6nIwRtPcgg==",
|
| 294 |
+
"cpu": [
|
| 295 |
+
"s390x"
|
| 296 |
+
],
|
| 297 |
+
"license": "MIT",
|
| 298 |
+
"optional": true,
|
| 299 |
+
"os": [
|
| 300 |
+
"linux"
|
| 301 |
+
]
|
| 302 |
+
},
|
| 303 |
+
"node_modules/@rollup/rollup-linux-x64-gnu": {
|
| 304 |
+
"version": "4.52.3",
|
| 305 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.52.3.tgz",
|
| 306 |
+
"integrity": "sha512-tPgGd6bY2M2LJTA1uGq8fkSPK8ZLYjDjY+ZLK9WHncCnfIz29LIXIqUgzCR0hIefzy6Hpbe8Th5WOSwTM8E7LA==",
|
| 307 |
+
"cpu": [
|
| 308 |
+
"x64"
|
| 309 |
+
],
|
| 310 |
+
"license": "MIT",
|
| 311 |
+
"optional": true,
|
| 312 |
+
"os": [
|
| 313 |
+
"linux"
|
| 314 |
+
]
|
| 315 |
+
},
|
| 316 |
+
"node_modules/@rollup/rollup-linux-x64-musl": {
|
| 317 |
+
"version": "4.52.3",
|
| 318 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.52.3.tgz",
|
| 319 |
+
"integrity": "sha512-BCFkJjgk+WFzP+tcSMXq77ymAPIxsX9lFJWs+2JzuZTLtksJ2o5hvgTdIcZ5+oKzUDMwI0PfWzRBYAydAHF2Mw==",
|
| 320 |
+
"cpu": [
|
| 321 |
+
"x64"
|
| 322 |
+
],
|
| 323 |
+
"license": "MIT",
|
| 324 |
+
"optional": true,
|
| 325 |
+
"os": [
|
| 326 |
+
"linux"
|
| 327 |
+
]
|
| 328 |
+
},
|
| 329 |
+
"node_modules/@rollup/rollup-openharmony-arm64": {
|
| 330 |
+
"version": "4.52.3",
|
| 331 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.52.3.tgz",
|
| 332 |
+
"integrity": "sha512-KTD/EqjZF3yvRaWUJdD1cW+IQBk4fbQaHYJUmP8N4XoKFZilVL8cobFSTDnjTtxWJQ3JYaMgF4nObY/+nYkumA==",
|
| 333 |
+
"cpu": [
|
| 334 |
+
"arm64"
|
| 335 |
+
],
|
| 336 |
+
"license": "MIT",
|
| 337 |
+
"optional": true,
|
| 338 |
+
"os": [
|
| 339 |
+
"openharmony"
|
| 340 |
+
]
|
| 341 |
+
},
|
| 342 |
+
"node_modules/@rollup/rollup-win32-arm64-msvc": {
|
| 343 |
+
"version": "4.52.3",
|
| 344 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.52.3.tgz",
|
| 345 |
+
"integrity": "sha512-+zteHZdoUYLkyYKObGHieibUFLbttX2r+58l27XZauq0tcWYYuKUwY2wjeCN9oK1Um2YgH2ibd6cnX/wFD7DuA==",
|
| 346 |
+
"cpu": [
|
| 347 |
+
"arm64"
|
| 348 |
+
],
|
| 349 |
+
"license": "MIT",
|
| 350 |
+
"optional": true,
|
| 351 |
+
"os": [
|
| 352 |
+
"win32"
|
| 353 |
+
]
|
| 354 |
+
},
|
| 355 |
+
"node_modules/@rollup/rollup-win32-ia32-msvc": {
|
| 356 |
+
"version": "4.52.3",
|
| 357 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.52.3.tgz",
|
| 358 |
+
"integrity": "sha512-of1iHkTQSo3kr6dTIRX6t81uj/c/b15HXVsPcEElN5sS859qHrOepM5p9G41Hah+CTqSh2r8Bm56dL2z9UQQ7g==",
|
| 359 |
+
"cpu": [
|
| 360 |
+
"ia32"
|
| 361 |
+
],
|
| 362 |
+
"license": "MIT",
|
| 363 |
+
"optional": true,
|
| 364 |
+
"os": [
|
| 365 |
+
"win32"
|
| 366 |
+
]
|
| 367 |
+
},
|
| 368 |
+
"node_modules/@rollup/rollup-win32-x64-gnu": {
|
| 369 |
+
"version": "4.52.3",
|
| 370 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.52.3.tgz",
|
| 371 |
+
"integrity": "sha512-s0hybmlHb56mWVZQj8ra9048/WZTPLILKxcvcq+8awSZmyiSUZjjem1AhU3Tf4ZKpYhK4mg36HtHDOe8QJS5PQ==",
|
| 372 |
+
"cpu": [
|
| 373 |
+
"x64"
|
| 374 |
+
],
|
| 375 |
+
"license": "MIT",
|
| 376 |
+
"optional": true,
|
| 377 |
+
"os": [
|
| 378 |
+
"win32"
|
| 379 |
+
]
|
| 380 |
+
},
|
| 381 |
+
"node_modules/@rollup/rollup-win32-x64-msvc": {
|
| 382 |
+
"version": "4.52.3",
|
| 383 |
+
"resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.52.3.tgz",
|
| 384 |
+
"integrity": "sha512-zGIbEVVXVtauFgl3MRwGWEN36P5ZGenHRMgNw88X5wEhEBpq0XrMEZwOn07+ICrwM17XO5xfMZqh0OldCH5VTA==",
|
| 385 |
+
"cpu": [
|
| 386 |
+
"x64"
|
| 387 |
+
],
|
| 388 |
+
"license": "MIT",
|
| 389 |
+
"optional": true,
|
| 390 |
+
"os": [
|
| 391 |
+
"win32"
|
| 392 |
+
]
|
| 393 |
+
},
|
| 394 |
+
"node_modules/@types/estree": {
|
| 395 |
+
"version": "1.0.8",
|
| 396 |
+
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz",
|
| 397 |
+
"integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==",
|
| 398 |
+
"license": "MIT"
|
| 399 |
+
},
|
| 400 |
+
"node_modules/@types/resolve": {
|
| 401 |
+
"version": "1.20.2",
|
| 402 |
+
"resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
|
| 403 |
+
"integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
|
| 404 |
+
"license": "MIT"
|
| 405 |
+
},
|
| 406 |
+
"node_modules/bpmn-js": {
|
| 407 |
+
"version": "18.7.0",
|
| 408 |
+
"resolved": "https://registry.npmjs.org/bpmn-js/-/bpmn-js-18.7.0.tgz",
|
| 409 |
+
"integrity": "sha512-i4Xkcc5oJajTvsZv6Tmam3Tu4iB1AI4ARq4jGx5KaoJpDl11Qw8O5IurCw3u86Vrhe+a8EmXs1ibs4/oIwlAfg==",
|
| 410 |
+
"license": "SEE LICENSE IN LICENSE",
|
| 411 |
+
"dependencies": {
|
| 412 |
+
"bpmn-moddle": "^9.0.4",
|
| 413 |
+
"diagram-js": "^15.4.0",
|
| 414 |
+
"diagram-js-direct-editing": "^3.2.0",
|
| 415 |
+
"ids": "^1.0.5",
|
| 416 |
+
"inherits-browser": "^0.1.0",
|
| 417 |
+
"min-dash": "^4.1.1",
|
| 418 |
+
"min-dom": "^4.2.1",
|
| 419 |
+
"tiny-svg": "^3.1.2"
|
| 420 |
+
},
|
| 421 |
+
"engines": {
|
| 422 |
+
"node": "*"
|
| 423 |
+
}
|
| 424 |
+
},
|
| 425 |
+
"node_modules/bpmn-js/node_modules/tiny-svg": {
|
| 426 |
+
"version": "3.1.3",
|
| 427 |
+
"resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-3.1.3.tgz",
|
| 428 |
+
"integrity": "sha512-9mwnPqXInRsBmH/DO6NMxBE++9LsqpVXQSSTZGc5bomoKKvL5OX/Hlotw7XVXP6XLRcHWIzZpxfovGqWKgCypQ==",
|
| 429 |
+
"license": "MIT"
|
| 430 |
+
},
|
| 431 |
+
"node_modules/bpmn-moddle": {
|
| 432 |
+
"version": "9.0.4",
|
| 433 |
+
"resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-9.0.4.tgz",
|
| 434 |
+
"integrity": "sha512-dr5s3vtOG8NkVSwa8CC55XBIKKwajomSZRb0RiMOOOF6TpqZBZvtbDjpzWICvdd/plDF6uOtaRfSgblPQLAioQ==",
|
| 435 |
+
"license": "MIT",
|
| 436 |
+
"dependencies": {
|
| 437 |
+
"min-dash": "^4.2.1",
|
| 438 |
+
"moddle": "^7.0.0",
|
| 439 |
+
"moddle-xml": "^11.0.0"
|
| 440 |
+
},
|
| 441 |
+
"engines": {
|
| 442 |
+
"node": ">= 18"
|
| 443 |
+
}
|
| 444 |
+
},
|
| 445 |
+
"node_modules/clsx": {
|
| 446 |
+
"version": "2.1.1",
|
| 447 |
+
"resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",
|
| 448 |
+
"integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",
|
| 449 |
+
"license": "MIT",
|
| 450 |
+
"engines": {
|
| 451 |
+
"node": ">=6"
|
| 452 |
+
}
|
| 453 |
+
},
|
| 454 |
+
"node_modules/commondir": {
|
| 455 |
+
"version": "1.0.1",
|
| 456 |
+
"resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz",
|
| 457 |
+
"integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==",
|
| 458 |
+
"license": "MIT"
|
| 459 |
+
},
|
| 460 |
+
"node_modules/component-event": {
|
| 461 |
+
"version": "0.2.1",
|
| 462 |
+
"resolved": "https://registry.npmjs.org/component-event/-/component-event-0.2.1.tgz",
|
| 463 |
+
"integrity": "sha512-wGA++isMqiDq1jPYeyv2as/Bt/u+3iLW0rEa+8NQ82jAv3TgqMiCM+B2SaBdn2DfLilLjjq736YcezihRYhfxw==",
|
| 464 |
+
"license": "MIT"
|
| 465 |
+
},
|
| 466 |
+
"node_modules/deepmerge": {
|
| 467 |
+
"version": "4.3.1",
|
| 468 |
+
"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz",
|
| 469 |
+
"integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==",
|
| 470 |
+
"license": "MIT",
|
| 471 |
+
"engines": {
|
| 472 |
+
"node": ">=0.10.0"
|
| 473 |
+
}
|
| 474 |
+
},
|
| 475 |
+
"node_modules/diagram-js": {
|
| 476 |
+
"version": "15.4.0",
|
| 477 |
+
"resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-15.4.0.tgz",
|
| 478 |
+
"integrity": "sha512-rpwDLA/w55wPfiZgp/z2T6cFdCXU3bARGdjhUpEOoh673K18OJ4ruEu3+/94ALRIIyEvJ0XHUk9sgZrzzE79ng==",
|
| 479 |
+
"license": "MIT",
|
| 480 |
+
"dependencies": {
|
| 481 |
+
"@bpmn-io/diagram-js-ui": "^0.2.3",
|
| 482 |
+
"clsx": "^2.1.0",
|
| 483 |
+
"didi": "^10.2.2",
|
| 484 |
+
"inherits-browser": "^0.1.0",
|
| 485 |
+
"min-dash": "^4.1.0",
|
| 486 |
+
"min-dom": "^4.2.1",
|
| 487 |
+
"object-refs": "^0.4.0",
|
| 488 |
+
"path-intersection": "^3.0.0",
|
| 489 |
+
"tiny-svg": "^3.1.2"
|
| 490 |
+
},
|
| 491 |
+
"engines": {
|
| 492 |
+
"node": "*"
|
| 493 |
+
}
|
| 494 |
+
},
|
| 495 |
+
"node_modules/diagram-js-direct-editing": {
|
| 496 |
+
"version": "3.2.0",
|
| 497 |
+
"resolved": "https://registry.npmjs.org/diagram-js-direct-editing/-/diagram-js-direct-editing-3.2.0.tgz",
|
| 498 |
+
"integrity": "sha512-+pyxeQGBSdLiZX0/tmmsm2qZSvm9YtVzod5W3RMHSTR7VrkUMD6E7EX/W9JQv3ebxO7oIdqFmytmNDDpSHnYEw==",
|
| 499 |
+
"license": "MIT",
|
| 500 |
+
"dependencies": {
|
| 501 |
+
"min-dash": "^4.0.0",
|
| 502 |
+
"min-dom": "^4.2.1"
|
| 503 |
+
},
|
| 504 |
+
"engines": {
|
| 505 |
+
"node": "*"
|
| 506 |
+
},
|
| 507 |
+
"peerDependencies": {
|
| 508 |
+
"diagram-js": "*"
|
| 509 |
+
}
|
| 510 |
+
},
|
| 511 |
+
"node_modules/diagram-js/node_modules/tiny-svg": {
|
| 512 |
+
"version": "3.1.3",
|
| 513 |
+
"resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-3.1.3.tgz",
|
| 514 |
+
"integrity": "sha512-9mwnPqXInRsBmH/DO6NMxBE++9LsqpVXQSSTZGc5bomoKKvL5OX/Hlotw7XVXP6XLRcHWIzZpxfovGqWKgCypQ==",
|
| 515 |
+
"license": "MIT"
|
| 516 |
+
},
|
| 517 |
+
"node_modules/didi": {
|
| 518 |
+
"version": "10.2.2",
|
| 519 |
+
"resolved": "https://registry.npmjs.org/didi/-/didi-10.2.2.tgz",
|
| 520 |
+
"integrity": "sha512-l8NYkYFXV1izHI65EyT8EXOjUZtKmQkHLTT89cSP7HU5J/G7AOj0dXKtLc04EXYlga99PBY18IPjOeZ+c3DI4w==",
|
| 521 |
+
"license": "MIT",
|
| 522 |
+
"engines": {
|
| 523 |
+
"node": ">= 16"
|
| 524 |
+
}
|
| 525 |
+
},
|
| 526 |
+
"node_modules/domify": {
|
| 527 |
+
"version": "1.4.2",
|
| 528 |
+
"resolved": "https://registry.npmjs.org/domify/-/domify-1.4.2.tgz",
|
| 529 |
+
"integrity": "sha512-m4yreHcUWHBncGVV7U+yQzc12vIlq0jMrtHZ5mW6dQMiL/7skSYNVX9wqKwOtyO9SGCgevrAFEgOCAHmamHTUA==",
|
| 530 |
+
"license": "MIT",
|
| 531 |
+
"funding": {
|
| 532 |
+
"url": "https://github.com/sponsors/sindresorhus"
|
| 533 |
+
}
|
| 534 |
+
},
|
| 535 |
+
"node_modules/estree-walker": {
|
| 536 |
+
"version": "2.0.2",
|
| 537 |
+
"resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
|
| 538 |
+
"integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
|
| 539 |
+
"license": "MIT"
|
| 540 |
+
},
|
| 541 |
+
"node_modules/fdir": {
|
| 542 |
+
"version": "6.5.0",
|
| 543 |
+
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",
|
| 544 |
+
"integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",
|
| 545 |
+
"license": "MIT",
|
| 546 |
+
"engines": {
|
| 547 |
+
"node": ">=12.0.0"
|
| 548 |
+
},
|
| 549 |
+
"peerDependencies": {
|
| 550 |
+
"picomatch": "^3 || ^4"
|
| 551 |
+
},
|
| 552 |
+
"peerDependenciesMeta": {
|
| 553 |
+
"picomatch": {
|
| 554 |
+
"optional": true
|
| 555 |
+
}
|
| 556 |
+
}
|
| 557 |
+
},
|
| 558 |
+
"node_modules/fsevents": {
|
| 559 |
+
"version": "2.3.3",
|
| 560 |
+
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
| 561 |
+
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
| 562 |
+
"hasInstallScript": true,
|
| 563 |
+
"license": "MIT",
|
| 564 |
+
"optional": true,
|
| 565 |
+
"os": [
|
| 566 |
+
"darwin"
|
| 567 |
+
],
|
| 568 |
+
"engines": {
|
| 569 |
+
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
| 570 |
+
}
|
| 571 |
+
},
|
| 572 |
+
"node_modules/function-bind": {
|
| 573 |
+
"version": "1.1.2",
|
| 574 |
+
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
|
| 575 |
+
"integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
|
| 576 |
+
"license": "MIT",
|
| 577 |
+
"funding": {
|
| 578 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 579 |
+
}
|
| 580 |
+
},
|
| 581 |
+
"node_modules/hasown": {
|
| 582 |
+
"version": "2.0.2",
|
| 583 |
+
"resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
|
| 584 |
+
"integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
|
| 585 |
+
"license": "MIT",
|
| 586 |
+
"dependencies": {
|
| 587 |
+
"function-bind": "^1.1.2"
|
| 588 |
+
},
|
| 589 |
+
"engines": {
|
| 590 |
+
"node": ">= 0.4"
|
| 591 |
+
}
|
| 592 |
+
},
|
| 593 |
+
"node_modules/htm": {
|
| 594 |
+
"version": "3.1.1",
|
| 595 |
+
"resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz",
|
| 596 |
+
"integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==",
|
| 597 |
+
"license": "Apache-2.0"
|
| 598 |
+
},
|
| 599 |
+
"node_modules/ids": {
|
| 600 |
+
"version": "1.0.5",
|
| 601 |
+
"resolved": "https://registry.npmjs.org/ids/-/ids-1.0.5.tgz",
|
| 602 |
+
"integrity": "sha512-XQ0yom/4KWTL29sLG+tyuycy7UmeaM/79GRtSJq6IG9cJGIPeBz5kwDCguie3TwxaMNIc3WtPi0cTa1XYHicpw==",
|
| 603 |
+
"license": "MIT"
|
| 604 |
+
},
|
| 605 |
+
"node_modules/inherits-browser": {
|
| 606 |
+
"version": "0.1.0",
|
| 607 |
+
"resolved": "https://registry.npmjs.org/inherits-browser/-/inherits-browser-0.1.0.tgz",
|
| 608 |
+
"integrity": "sha512-CJHHvW3jQ6q7lzsXPpapLdMx5hDpSF3FSh45pwsj6bKxJJ8Nl8v43i5yXnr3BdfOimGHKyniewQtnAIp3vyJJw==",
|
| 609 |
+
"license": "ISC"
|
| 610 |
+
},
|
| 611 |
+
"node_modules/is-core-module": {
|
| 612 |
+
"version": "2.16.1",
|
| 613 |
+
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz",
|
| 614 |
+
"integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==",
|
| 615 |
+
"license": "MIT",
|
| 616 |
+
"dependencies": {
|
| 617 |
+
"hasown": "^2.0.2"
|
| 618 |
+
},
|
| 619 |
+
"engines": {
|
| 620 |
+
"node": ">= 0.4"
|
| 621 |
+
},
|
| 622 |
+
"funding": {
|
| 623 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 624 |
+
}
|
| 625 |
+
},
|
| 626 |
+
"node_modules/is-module": {
|
| 627 |
+
"version": "1.0.0",
|
| 628 |
+
"resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
|
| 629 |
+
"integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
|
| 630 |
+
"license": "MIT"
|
| 631 |
+
},
|
| 632 |
+
"node_modules/is-reference": {
|
| 633 |
+
"version": "1.2.1",
|
| 634 |
+
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
|
| 635 |
+
"integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
|
| 636 |
+
"license": "MIT",
|
| 637 |
+
"dependencies": {
|
| 638 |
+
"@types/estree": "*"
|
| 639 |
+
}
|
| 640 |
+
},
|
| 641 |
+
"node_modules/magic-string": {
|
| 642 |
+
"version": "0.30.19",
|
| 643 |
+
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.19.tgz",
|
| 644 |
+
"integrity": "sha512-2N21sPY9Ws53PZvsEpVtNuSW+ScYbQdp4b9qUaL+9QkHUrGFKo56Lg9Emg5s9V/qrtNBmiR01sYhUOwu3H+VOw==",
|
| 645 |
+
"license": "MIT",
|
| 646 |
+
"dependencies": {
|
| 647 |
+
"@jridgewell/sourcemap-codec": "^1.5.5"
|
| 648 |
+
}
|
| 649 |
+
},
|
| 650 |
+
"node_modules/min-dash": {
|
| 651 |
+
"version": "4.2.3",
|
| 652 |
+
"resolved": "https://registry.npmjs.org/min-dash/-/min-dash-4.2.3.tgz",
|
| 653 |
+
"integrity": "sha512-VLMYQI5+FcD9Ad24VcB08uA83B07OhueAlZ88jBK6PyupTvEJwllTMUqMy0wPGYs7pZUEtEEMWdHB63m3LtEcg==",
|
| 654 |
+
"license": "MIT"
|
| 655 |
+
},
|
| 656 |
+
"node_modules/min-dom": {
|
| 657 |
+
"version": "4.2.1",
|
| 658 |
+
"resolved": "https://registry.npmjs.org/min-dom/-/min-dom-4.2.1.tgz",
|
| 659 |
+
"integrity": "sha512-TMoL8SEEIhUWYgkj7XMSgxmwSyGI+4fP2KFFGnN3FbHfbGHVdsLYSz8LoIsgPhz4dWRmLvxWWSMgzZMJW5sZuA==",
|
| 660 |
+
"license": "MIT",
|
| 661 |
+
"dependencies": {
|
| 662 |
+
"component-event": "^0.2.1",
|
| 663 |
+
"domify": "^1.4.1",
|
| 664 |
+
"min-dash": "^4.2.1"
|
| 665 |
+
}
|
| 666 |
+
},
|
| 667 |
+
"node_modules/moddle": {
|
| 668 |
+
"version": "7.2.0",
|
| 669 |
+
"resolved": "https://registry.npmjs.org/moddle/-/moddle-7.2.0.tgz",
|
| 670 |
+
"integrity": "sha512-x1+JREThy7JBOBR3g2hbOnOfrlC/YAWXX9RzrSZS5HhqeuBly9H/PCtOBtcQs+Y2sjRAXF+WTNSgHvn8Uq+6Yw==",
|
| 671 |
+
"license": "MIT",
|
| 672 |
+
"dependencies": {
|
| 673 |
+
"min-dash": "^4.2.1"
|
| 674 |
+
}
|
| 675 |
+
},
|
| 676 |
+
"node_modules/moddle-xml": {
|
| 677 |
+
"version": "11.0.0",
|
| 678 |
+
"resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-11.0.0.tgz",
|
| 679 |
+
"integrity": "sha512-L3Sseepfcq9Uy0iIfqEDTXSoYLva1Y/JGbN/4AMOeQ6cqbu8Ma/SDJIdOFm7smsAa64j2z3SwCGG3FIilQVnUg==",
|
| 680 |
+
"license": "MIT",
|
| 681 |
+
"dependencies": {
|
| 682 |
+
"min-dash": "^4.0.0",
|
| 683 |
+
"saxen": "^10.0.0"
|
| 684 |
+
},
|
| 685 |
+
"engines": {
|
| 686 |
+
"node": ">= 18"
|
| 687 |
+
},
|
| 688 |
+
"peerDependencies": {
|
| 689 |
+
"moddle": ">= 6.2.0"
|
| 690 |
+
}
|
| 691 |
+
},
|
| 692 |
+
"node_modules/object-refs": {
|
| 693 |
+
"version": "0.4.0",
|
| 694 |
+
"resolved": "https://registry.npmjs.org/object-refs/-/object-refs-0.4.0.tgz",
|
| 695 |
+
"integrity": "sha512-6kJqKWryKZmtte6QYvouas0/EIJKPI1/MMIuRsiBlNuhIMfqYTggzX2F1AJ2+cDs288xyi9GL7FyasHINR98BQ==",
|
| 696 |
+
"license": "MIT",
|
| 697 |
+
"engines": {
|
| 698 |
+
"node": "*"
|
| 699 |
+
}
|
| 700 |
+
},
|
| 701 |
+
"node_modules/path-intersection": {
|
| 702 |
+
"version": "3.1.0",
|
| 703 |
+
"resolved": "https://registry.npmjs.org/path-intersection/-/path-intersection-3.1.0.tgz",
|
| 704 |
+
"integrity": "sha512-3xS3lvv/vuwm5aH2BVvNRvnvwR2Drde7jQClKpCXTYXIMMjcw/EnMhzCgeHwqbCpzi760PEfAkU53vSIlrNr9A==",
|
| 705 |
+
"license": "MIT",
|
| 706 |
+
"engines": {
|
| 707 |
+
"node": ">= 14.20"
|
| 708 |
+
}
|
| 709 |
+
},
|
| 710 |
+
"node_modules/path-parse": {
|
| 711 |
+
"version": "1.0.7",
|
| 712 |
+
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
| 713 |
+
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
| 714 |
+
"license": "MIT"
|
| 715 |
+
},
|
| 716 |
+
"node_modules/picomatch": {
|
| 717 |
+
"version": "4.0.3",
|
| 718 |
+
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
|
| 719 |
+
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
|
| 720 |
+
"license": "MIT",
|
| 721 |
+
"engines": {
|
| 722 |
+
"node": ">=12"
|
| 723 |
+
},
|
| 724 |
+
"funding": {
|
| 725 |
+
"url": "https://github.com/sponsors/jonschlinkert"
|
| 726 |
+
}
|
| 727 |
+
},
|
| 728 |
+
"node_modules/preact": {
|
| 729 |
+
"version": "10.27.2",
|
| 730 |
+
"resolved": "https://registry.npmjs.org/preact/-/preact-10.27.2.tgz",
|
| 731 |
+
"integrity": "sha512-5SYSgFKSyhCbk6SrXyMpqjb5+MQBgfvEKE/OC+PujcY34sOpqtr+0AZQtPYx5IA6VxynQ7rUPCtKzyovpj9Bpg==",
|
| 732 |
+
"license": "MIT",
|
| 733 |
+
"funding": {
|
| 734 |
+
"type": "opencollective",
|
| 735 |
+
"url": "https://opencollective.com/preact"
|
| 736 |
+
}
|
| 737 |
+
},
|
| 738 |
+
"node_modules/resolve": {
|
| 739 |
+
"version": "1.22.10",
|
| 740 |
+
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.10.tgz",
|
| 741 |
+
"integrity": "sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==",
|
| 742 |
+
"license": "MIT",
|
| 743 |
+
"dependencies": {
|
| 744 |
+
"is-core-module": "^2.16.0",
|
| 745 |
+
"path-parse": "^1.0.7",
|
| 746 |
+
"supports-preserve-symlinks-flag": "^1.0.0"
|
| 747 |
+
},
|
| 748 |
+
"bin": {
|
| 749 |
+
"resolve": "bin/resolve"
|
| 750 |
+
},
|
| 751 |
+
"engines": {
|
| 752 |
+
"node": ">= 0.4"
|
| 753 |
+
},
|
| 754 |
+
"funding": {
|
| 755 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 756 |
+
}
|
| 757 |
+
},
|
| 758 |
+
"node_modules/rollup": {
|
| 759 |
+
"version": "4.52.3",
|
| 760 |
+
"resolved": "https://registry.npmjs.org/rollup/-/rollup-4.52.3.tgz",
|
| 761 |
+
"integrity": "sha512-RIDh866U8agLgiIcdpB+COKnlCreHJLfIhWC3LVflku5YHfpnsIKigRZeFfMfCc4dVcqNVfQQ5gO/afOck064A==",
|
| 762 |
+
"license": "MIT",
|
| 763 |
+
"dependencies": {
|
| 764 |
+
"@types/estree": "1.0.8"
|
| 765 |
+
},
|
| 766 |
+
"bin": {
|
| 767 |
+
"rollup": "dist/bin/rollup"
|
| 768 |
+
},
|
| 769 |
+
"engines": {
|
| 770 |
+
"node": ">=18.0.0",
|
| 771 |
+
"npm": ">=8.0.0"
|
| 772 |
+
},
|
| 773 |
+
"optionalDependencies": {
|
| 774 |
+
"@rollup/rollup-android-arm-eabi": "4.52.3",
|
| 775 |
+
"@rollup/rollup-android-arm64": "4.52.3",
|
| 776 |
+
"@rollup/rollup-darwin-arm64": "4.52.3",
|
| 777 |
+
"@rollup/rollup-darwin-x64": "4.52.3",
|
| 778 |
+
"@rollup/rollup-freebsd-arm64": "4.52.3",
|
| 779 |
+
"@rollup/rollup-freebsd-x64": "4.52.3",
|
| 780 |
+
"@rollup/rollup-linux-arm-gnueabihf": "4.52.3",
|
| 781 |
+
"@rollup/rollup-linux-arm-musleabihf": "4.52.3",
|
| 782 |
+
"@rollup/rollup-linux-arm64-gnu": "4.52.3",
|
| 783 |
+
"@rollup/rollup-linux-arm64-musl": "4.52.3",
|
| 784 |
+
"@rollup/rollup-linux-loong64-gnu": "4.52.3",
|
| 785 |
+
"@rollup/rollup-linux-ppc64-gnu": "4.52.3",
|
| 786 |
+
"@rollup/rollup-linux-riscv64-gnu": "4.52.3",
|
| 787 |
+
"@rollup/rollup-linux-riscv64-musl": "4.52.3",
|
| 788 |
+
"@rollup/rollup-linux-s390x-gnu": "4.52.3",
|
| 789 |
+
"@rollup/rollup-linux-x64-gnu": "4.52.3",
|
| 790 |
+
"@rollup/rollup-linux-x64-musl": "4.52.3",
|
| 791 |
+
"@rollup/rollup-openharmony-arm64": "4.52.3",
|
| 792 |
+
"@rollup/rollup-win32-arm64-msvc": "4.52.3",
|
| 793 |
+
"@rollup/rollup-win32-ia32-msvc": "4.52.3",
|
| 794 |
+
"@rollup/rollup-win32-x64-gnu": "4.52.3",
|
| 795 |
+
"@rollup/rollup-win32-x64-msvc": "4.52.3",
|
| 796 |
+
"fsevents": "~2.3.2"
|
| 797 |
+
}
|
| 798 |
+
},
|
| 799 |
+
"node_modules/saxen": {
|
| 800 |
+
"version": "10.0.0",
|
| 801 |
+
"resolved": "https://registry.npmjs.org/saxen/-/saxen-10.0.0.tgz",
|
| 802 |
+
"integrity": "sha512-RXsmWok/SAWqOG/f5ADEz51DN9WtZEzqih3e08ranldcaXekxjx8NBKjGh/y5hlowjo0JH/LekBu6gtPFD1G6g==",
|
| 803 |
+
"license": "MIT",
|
| 804 |
+
"engines": {
|
| 805 |
+
"node": ">= 18"
|
| 806 |
+
}
|
| 807 |
+
},
|
| 808 |
+
"node_modules/supports-preserve-symlinks-flag": {
|
| 809 |
+
"version": "1.0.0",
|
| 810 |
+
"resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
|
| 811 |
+
"integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
|
| 812 |
+
"license": "MIT",
|
| 813 |
+
"engines": {
|
| 814 |
+
"node": ">= 0.4"
|
| 815 |
+
},
|
| 816 |
+
"funding": {
|
| 817 |
+
"url": "https://github.com/sponsors/ljharb"
|
| 818 |
+
}
|
| 819 |
+
},
|
| 820 |
+
"node_modules/tiny-svg": {
|
| 821 |
+
"version": "4.1.3",
|
| 822 |
+
"resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-4.1.3.tgz",
|
| 823 |
+
"integrity": "sha512-OPXLrGkpdRxLBPV7RXkR9zFx6Zx5vXpHFnenaNhrLQbHxTdoU0T91nwFbIrAMiLr+XSpjt8S73qF7U9MP/Jhjg==",
|
| 824 |
+
"license": "MIT",
|
| 825 |
+
"engines": {
|
| 826 |
+
"node": ">= 16"
|
| 827 |
+
}
|
| 828 |
+
}
|
| 829 |
+
}
|
| 830 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "cockpit-bpmn-js-module-bundled",
|
| 3 |
+
"version": "0.0.1",
|
| 4 |
+
"description": "bundle a custom bpmn-js module to be used in cockpit",
|
| 5 |
+
"main": "index.js",
|
| 6 |
+
"scripts": {
|
| 7 |
+
"bundle": "rollup --config",
|
| 8 |
+
"start": "npm run bundle"
|
| 9 |
+
},
|
| 10 |
+
"type": "module",
|
| 11 |
+
"repository": {
|
| 12 |
+
"type": "git",
|
| 13 |
+
"url": "git+https://github.com/camunda/camunda-bpm-examples.git"
|
| 14 |
+
},
|
| 15 |
+
"keywords": [
|
| 16 |
+
"bpmn-js"
|
| 17 |
+
],
|
| 18 |
+
"author": "MaxTru",
|
| 19 |
+
"license": "Apache-2.0",
|
| 20 |
+
"bugs": {
|
| 21 |
+
"url": "https://github.com/camunda/camunda-bpm-examples/issues"
|
| 22 |
+
},
|
| 23 |
+
"homepage": "https://github.com/camunda/camunda-bpm-examples/tree/master/cockpit/cockpit-bpmn-js-module-bundled",
|
| 24 |
+
"dependencies": {
|
| 25 |
+
"@rollup/plugin-commonjs": "~28.0.3",
|
| 26 |
+
"@rollup/plugin-node-resolve": "~16.0.1",
|
| 27 |
+
"bpmn-js": "^18.7.0",
|
| 28 |
+
"diagram-js": "^15.4.0",
|
| 29 |
+
"rollup": "^4.52.3",
|
| 30 |
+
"tiny-svg": "^4.1.3"
|
| 31 |
+
}
|
| 32 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/rollup.config.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
|
| 18 |
+
import resolve from "@rollup/plugin-node-resolve";
|
| 19 |
+
import commonjs from "@rollup/plugin-commonjs";
|
| 20 |
+
|
| 21 |
+
export default {
|
| 22 |
+
input: "custom-renderer/index.js",
|
| 23 |
+
output: {
|
| 24 |
+
file: "dist/custom-renderer-module-bundled.js"
|
| 25 |
+
},
|
| 26 |
+
plugins: [resolve(), commonjs()]
|
| 27 |
+
};
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module-bundled/screenshot.png
ADDED
|
Git LFS Details
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-bpmn-js-module/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
bpmn.js Cockpit module
|
| 2 |
+
======================
|
| 3 |
+
|
| 4 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/cockpit/cockpit-bpmn-js-module).
|
| 5 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 6 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-cats/README.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"Cats" Cockpit Plugin
|
| 2 |
+
=====================
|
| 3 |
+
|
| 4 |
+
This example is not actively maintained anymore. You can refer to the [example with fixed version of Camunda 7.18](https://github.com/camunda/camunda-bpm-examples/blob/7.18/cockpit/cockpit-cats).
|
| 5 |
+
Due to Camunda Platform 7 backward compatibility, the examples usually still work with later versions. However, you
|
| 6 |
+
might need to adjust them to make them work.
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-diagram-interactions/README.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"Diagram interactions" Cockpit Plugin
|
| 2 |
+
=====================================
|
| 3 |
+
|
| 4 |
+
This example shows how you can achieve diagram interactions with custom plugins.
|
| 5 |
+
Click on an activity in the BPMN diagram to apply a filter to the table.
|
| 6 |
+
|
| 7 |
+
Built and tested against Camunda Platform version `7.24.0`.
|
| 8 |
+
|
| 9 |
+

|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
Diagram Interaction
|
| 13 |
+
-------------------
|
| 14 |
+
|
| 15 |
+
To achieve diagram interaction, we will use 2 plugins scoped in one module.
|
| 16 |
+
The first plugin registers at `cockpit.processDefinition.diagram.plugin` or another diagram plugin point and registers a listener on the viewer event bus. With the dispatched event we can call our own functions:
|
| 17 |
+
```javascript
|
| 18 |
+
render: viewer => {
|
| 19 |
+
viewer.get("eventBus").on("element.click", event => {
|
| 20 |
+
if (event.element.type.includes("Task")) {
|
| 21 |
+
cb(event.element);
|
| 22 |
+
}
|
| 23 |
+
// ...
|
| 24 |
+
});
|
| 25 |
+
}
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
In the second plugin, we can create a callback function which the diagram plugin calls. In this example, we will apply a filter to a table depending on what task was clicked on.
|
| 29 |
+
|
| 30 |
+
```javascript
|
| 31 |
+
render: (node, { processDefinitionId }) => {
|
| 32 |
+
// ...
|
| 33 |
+
cb = el => {
|
| 34 |
+
getUsertasks(el.id);
|
| 35 |
+
};
|
| 36 |
+
}
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
Integrate into Camunda Webapp
|
| 40 |
+
-----------------------------
|
| 41 |
+
|
| 42 |
+
Copy the `plugin.js` file into the `app/cockpit/scripts/` folder in your Camunda webapp distribution.
|
| 43 |
+
For the Tomcat distribution, this would be `server/apache-tomcat-X.X.XX/webapps/camunda/app/cockpit/scripts/`.
|
| 44 |
+
|
| 45 |
+
Add the following content to the `app/cockpit/scripts/config.js` file:
|
| 46 |
+
|
| 47 |
+
```
|
| 48 |
+
// …
|
| 49 |
+
customScripts: [
|
| 50 |
+
'scripts/plugin.js'
|
| 51 |
+
]
|
| 52 |
+
// …
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
After that start the server, login to Cockpit and navigate to the process definition view to check the result.
|
| 56 |
+
|
| 57 |
+
License
|
| 58 |
+
-------
|
| 59 |
+
|
| 60 |
+
Use under terms of the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-diagram-interactions/plugin.js
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright Camunda Services GmbH and/or licensed to Camunda Services GmbH
|
| 3 |
+
* under one or more contributor license agreements. See the NOTICE file
|
| 4 |
+
* distributed with this work for additional information regarding copyright
|
| 5 |
+
* ownership. Camunda licenses this file to you under the Apache License,
|
| 6 |
+
* Version 2.0; you may not use this file except in compliance with the License.
|
| 7 |
+
* You may obtain a copy of the License at
|
| 8 |
+
*
|
| 9 |
+
* http://www.apache.org/licenses/LICENSE-2.0
|
| 10 |
+
*
|
| 11 |
+
* Unless required by applicable law or agreed to in writing, software
|
| 12 |
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
| 13 |
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 14 |
+
* See the License for the specific language governing permissions and
|
| 15 |
+
* limitations under the License.
|
| 16 |
+
*/
|
| 17 |
+
|
| 18 |
+
const renderTable = async (operationMap, node) => {
|
| 19 |
+
if (!Object.keys(operationMap).length) {
|
| 20 |
+
node.innerHTML = "No open Tasks";
|
| 21 |
+
return;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
const table = document.createElement("table");
|
| 25 |
+
table.style = "table-layout: fixed; width: 100%;";
|
| 26 |
+
table.createTHead().innerHTML = `
|
| 27 |
+
<td>User</td>
|
| 28 |
+
<td>Activity ID</td>
|
| 29 |
+
<td>Open Task Count</td>`;
|
| 30 |
+
|
| 31 |
+
const body = table.createTBody();
|
| 32 |
+
|
| 33 |
+
for (const [user, tasks] of Object.entries(operationMap)) {
|
| 34 |
+
for (const [task, count] of Object.entries(tasks)) {
|
| 35 |
+
const row = document.createElement("tr");
|
| 36 |
+
const userCol = document.createElement("td");
|
| 37 |
+
const taskCol = document.createElement("td");
|
| 38 |
+
const countCol = document.createElement("td");
|
| 39 |
+
|
| 40 |
+
userCol.innerText = user;
|
| 41 |
+
taskCol.innerText = task;
|
| 42 |
+
countCol.innerText = count;
|
| 43 |
+
|
| 44 |
+
row.appendChild(userCol);
|
| 45 |
+
row.appendChild(taskCol);
|
| 46 |
+
row.appendChild(countCol);
|
| 47 |
+
body.appendChild(row);
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
node.innerHTML = "";
|
| 52 |
+
node.appendChild(table);
|
| 53 |
+
};
|
| 54 |
+
|
| 55 |
+
let cb = el => console.error("No callback defined: ", el);
|
| 56 |
+
|
| 57 |
+
const diagramPlugin = {
|
| 58 |
+
id: "diagramPlugin",
|
| 59 |
+
pluginPoint: "cockpit.processDefinition.diagram.plugin",
|
| 60 |
+
priority: 5,
|
| 61 |
+
render: viewer => {
|
| 62 |
+
viewer.get("eventBus").on("element.click", event => {
|
| 63 |
+
if (event.element.type.includes("Task")) {
|
| 64 |
+
cb(event.element);
|
| 65 |
+
} else {
|
| 66 |
+
cb(false);
|
| 67 |
+
}
|
| 68 |
+
});
|
| 69 |
+
}
|
| 70 |
+
};
|
| 71 |
+
|
| 72 |
+
const tabPlugin = {
|
| 73 |
+
id: "tabPlugin",
|
| 74 |
+
pluginPoint: "cockpit.processDefinition.runtime.tab",
|
| 75 |
+
priority: 5,
|
| 76 |
+
render: (node, { processDefinitionId, api }) => {
|
| 77 |
+
async function getUsertasks(taskId) {
|
| 78 |
+
const apiUrl = api.engineApi;
|
| 79 |
+
let result;
|
| 80 |
+
|
| 81 |
+
if (taskId) {
|
| 82 |
+
result = await fetch(
|
| 83 |
+
`${apiUrl}/task?processDefinitionId=${processDefinitionId}&taskDefinitionKey=${taskId}&maxResults=500`
|
| 84 |
+
);
|
| 85 |
+
} else {
|
| 86 |
+
result = await fetch(
|
| 87 |
+
`${apiUrl}/task?processDefinitionId=${processDefinitionId}&maxResults=500`
|
| 88 |
+
);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
const json = await result.json();
|
| 92 |
+
const operationMap = {};
|
| 93 |
+
json.forEach(task => {
|
| 94 |
+
const assignee = task.assignee || "unassigned";
|
| 95 |
+
const operationPerUser = operationMap[assignee] || {};
|
| 96 |
+
operationPerUser[task.taskDefinitionKey] =
|
| 97 |
+
operationPerUser[task.taskDefinitionKey] || 0;
|
| 98 |
+
operationPerUser[task.taskDefinitionKey]++;
|
| 99 |
+
operationMap[assignee] = operationPerUser;
|
| 100 |
+
});
|
| 101 |
+
|
| 102 |
+
renderTable(operationMap, node);
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
getUsertasks();
|
| 106 |
+
|
| 107 |
+
cb = el => {
|
| 108 |
+
getUsertasks(el.id);
|
| 109 |
+
};
|
| 110 |
+
},
|
| 111 |
+
unmount: () => {
|
| 112 |
+
cb = () => {};
|
| 113 |
+
},
|
| 114 |
+
properties: {
|
| 115 |
+
label: "Open User Tasks"
|
| 116 |
+
}
|
| 117 |
+
};
|
| 118 |
+
|
| 119 |
+
export default [tabPlugin, diagramPlugin];
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-diagram-interactions/screenshot.png
ADDED
|
Git LFS Details
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/.gitignore
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
target
|
| 2 |
+
frontend/dist
|
| 3 |
+
frontend/node
|
| 4 |
+
frontend/node_modules
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/README.md
ADDED
|
@@ -0,0 +1,510 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Fullstack (ReactJS & Java) "Count Processes" Cockpit Plugin
|
| 2 |
+
===========================================================
|
| 3 |
+
|
| 4 |
+
This is a simple plugin that showcases the plugin system of Cockpit, the process monitoring tool of [Camunda Platform](http://docs.camunda.org).
|
| 5 |
+
|
| 6 |
+
Built and tested against Camunda Platform version `7.24.0`.
|
| 7 |
+
This example uses Jakarta API. It is compatible with the latest releases of Camunda Tomcat and WildFly distributions.
|
| 8 |
+
|
| 9 |
+

|
| 10 |
+
|
| 11 |
+
> Note: If you need please take a look at the [Cockpit Plug-ins](https://docs.camunda.org/manual/7.24/webapps/cockpit/extend/plugins/) for the basics first.
|
| 12 |
+
|
| 13 |
+
# Table of contents
|
| 14 |
+
|
| 15 |
+
1. [Integrate into Camunda Platform Webapp](#integrate-into-camunda-bpm-webapp)
|
| 16 |
+
2. [Server Side](#server-side)
|
| 17 |
+
1. [Plug-in Archive](#plug-in-archive)
|
| 18 |
+
2. [Plug-in Main Class](#plug-in-main-class)
|
| 19 |
+
* [Testing Plug-in Discovery](#testing-plug-in-discovery)
|
| 20 |
+
3. [Custom Query](#custom-query)
|
| 21 |
+
* [Testing Queries](#testing-queries)
|
| 22 |
+
4. [Defining and Publishing Plug-in Services](#defining-and-publishing-plug-in-services)
|
| 23 |
+
* [Use Tenant Check](#use-tenant-check)
|
| 24 |
+
* [Testing JAX-RS Resources](#testing-jax-rs-resources)
|
| 25 |
+
3. [Client Side](#client-side)
|
| 26 |
+
1. [Static Plugin Assets](#static-plugin-assets)
|
| 27 |
+
* [Testing Assets](#testing-assets)
|
| 28 |
+
2. [Integration into Cockpit](#integration-into-cockpit)
|
| 29 |
+
3. [plugin.js Main File](#pluginjs-main-file)
|
| 30 |
+
4. [HTML View](#html-view)
|
| 31 |
+
4. [Summary](#summary)
|
| 32 |
+
|
| 33 |
+
## Integrate into Camunda Platform Webapp
|
| 34 |
+
|
| 35 |
+
1. Build this demo: `mvn clean install`
|
| 36 |
+
2. There are two ways to add your plugin to the Camunda Platform webapp.
|
| 37 |
+
|
| 38 |
+
1. You can copy `./target/cockpit-sample-plugin-1.0-SNAPSHOT.jar` to the `WEB-INF/lib` folder of the Camunda webapp.
|
| 39 |
+
2. You can set up a maven war overlay for the Camunda webapp.
|
| 40 |
+
|
| 41 |
+
The first solution is the simplest: if you downloaded the tomcat distribution, you can copy the plugin
|
| 42 |
+
jar file to the `/server/apache-tomcat-${tomcat-version}/webapps/camunda/WEB-INF/lib/` folder and
|
| 43 |
+
restart the server.
|
| 44 |
+
|
| 45 |
+
## Server Side
|
| 46 |
+
|
| 47 |
+
We will walk through the important aspects of developing the server-side parts of the plug-in, i.e., creating a plug-in jar, defining a custom query and exposing that query via a JAX-RS resource.
|
| 48 |
+
|
| 49 |
+
### Plug-in Archive
|
| 50 |
+
|
| 51 |
+
As a first step we create a maven jar project that represents our plug-in library. Inside the projects `pom.xml` we must declare a dependency to the Camunda webapp with the maven coordinates `org.camunda.bpm.webapp:camunda-webapp`. The project contains all the infrastructure necessary to create and test the server-side parts of a plug-in.
|
| 52 |
+
|
| 53 |
+
```xml
|
| 54 |
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| 55 |
+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
| 56 |
+
<modelVersion>4.0.0</modelVersion>
|
| 57 |
+
|
| 58 |
+
<groupId>org.camunda.bpm.cockpit.plugin</groupId>
|
| 59 |
+
<artifactId>cockpit-sample-plugin</artifactId>
|
| 60 |
+
<version>1.0-SNAPSHOT</version>
|
| 61 |
+
<packaging>jar</packaging>
|
| 62 |
+
|
| 63 |
+
<name>cockpit-sample-plugin</name>
|
| 64 |
+
<dependencies>
|
| 65 |
+
<dependency>
|
| 66 |
+
<groupId>org.camunda.bpm.webapp</groupId>
|
| 67 |
+
<artifactId>camunda-webapp</artifactId>
|
| 68 |
+
<classifier>classes</classifier>
|
| 69 |
+
<version>${camunda.version}</version>
|
| 70 |
+
</dependency>
|
| 71 |
+
|
| 72 |
+
<dependency>
|
| 73 |
+
<groupId>junit</groupId>
|
| 74 |
+
<artifactId>junit</artifactId>
|
| 75 |
+
<version>${junit.version}</version>
|
| 76 |
+
<scope>test</scope>
|
| 77 |
+
</dependency>
|
| 78 |
+
</dependencies>
|
| 79 |
+
</project>
|
| 80 |
+
```
|
| 81 |
+
|
| 82 |
+
### Plug-in Main Class
|
| 83 |
+
|
| 84 |
+
The main entry point for a plug-in is the service provider interface (SPI) `org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin`. Each plug-in must provide an implementation of this class and register it via `META-INF/services`.
|
| 85 |
+
|
| 86 |
+
We will go ahead and create an implementation of that API called `SampleCockpitPlugin`.
|
| 87 |
+
|
| 88 |
+
```java
|
| 89 |
+
package org.camunda.bpm.cockpit.plugin.sample;
|
| 90 |
+
|
| 91 |
+
import org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin;
|
| 92 |
+
|
| 93 |
+
public class SamplePlugin extends AbstractCockpitPlugin {
|
| 94 |
+
|
| 95 |
+
public static final String ID = "sample-plugin";
|
| 96 |
+
|
| 97 |
+
public String getId() {
|
| 98 |
+
return ID;
|
| 99 |
+
}
|
| 100 |
+
}
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
By inheriting from `org.camunda.bpm.cockpit.plugin.spi.impl.AbstractCockpitPlugin`, we ensure that the plug-in is initialized with reasonable defaults.
|
| 104 |
+
|
| 105 |
+
To register the plug-in with Cockpit, we must put its class name into a file called `org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin` that resides in the directory `META-INF/services`. That will publish the plug-in via the Java [ServiceLoader facilities](http://docs.oracle.com/javase/6/docs/api/java/util/ServiceLoader.html).
|
| 106 |
+
|
| 107 |
+
|
| 108 |
+
#### Testing Plug-in Discovery
|
| 109 |
+
|
| 110 |
+
Now let's go ahead and write a test case that makes sure the plug-in gets discovered properly. Before we do so, we need to add test dependencies to our project `pom.xml`.
|
| 111 |
+
|
| 112 |
+
```xml
|
| 113 |
+
<dependencies>
|
| 114 |
+
...
|
| 115 |
+
|
| 116 |
+
<!-- test dependencies -->
|
| 117 |
+
<dependency>
|
| 118 |
+
<groupId>org.camunda.bpm</groupId>
|
| 119 |
+
<artifactId>camunda-engine</artifactId>
|
| 120 |
+
<version>${camunda.version}</version>
|
| 121 |
+
<scope>test</scope>
|
| 122 |
+
</dependency>
|
| 123 |
+
<dependency>
|
| 124 |
+
<groupId>com.h2database</groupId>
|
| 125 |
+
<artifactId>h2</artifactId>
|
| 126 |
+
<version>${h2.version}</version>
|
| 127 |
+
<scope>test</scope>
|
| 128 |
+
</dependency>
|
| 129 |
+
<dependency>
|
| 130 |
+
<groupId>junit</groupId>
|
| 131 |
+
<artifactId>junit</artifactId>
|
| 132 |
+
<version>${junit.version}</version>
|
| 133 |
+
<scope>test</scope>
|
| 134 |
+
</dependency>
|
| 135 |
+
...
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
The next step consists of wiring the Camunda webapp and the process engine. To do this, we need to create a Service Provider that implements the interface `ProcessEngineProvider` and declare it in a file called `org.camunda.bpm.engine.rest.spi.ProcessEngineProvider` that resides in the directory `src/test/resources/META-INF/services/`. The file should contain the following content:
|
| 139 |
+
|
| 140 |
+
```java
|
| 141 |
+
org.camunda.bpm.cockpit.plugin.test.application.TestProcessEngineProvider
|
| 142 |
+
```
|
| 143 |
+
|
| 144 |
+
The `TestProcessEngineProvider` is provided with the Camunda webapp core, uses the methods of the class `org.camunda.bpm.BpmPlatform` and exposes the default process engine.
|
| 145 |
+
|
| 146 |
+
The class `org.camunda.bpm.cockpit.plugin.test.AbstractCockpitPluginTest` can work as a basis for Cockpit plugin tests. It initializes the Cockpit environment around each test and bootstraps a single process engine that is made available to Cockpit and the plug-in.
|
| 147 |
+
|
| 148 |
+
A first test may look as follows:
|
| 149 |
+
|
| 150 |
+
```java
|
| 151 |
+
package org.camunda.bpm.cockpit.plugin.sample;
|
| 152 |
+
|
| 153 |
+
import org.camunda.bpm.cockpit.Cockpit;
|
| 154 |
+
import org.camunda.bpm.cockpit.plugin.spi.CockpitPlugin;
|
| 155 |
+
import org.camunda.bpm.cockpit.plugin.test.AbstractCockpitPluginTest;
|
| 156 |
+
import org.junit.Assert;
|
| 157 |
+
import org.junit.Test;
|
| 158 |
+
|
| 159 |
+
public class SamplePluginsTest extends AbstractCockpitPluginTest {
|
| 160 |
+
|
| 161 |
+
@Test
|
| 162 |
+
public void testPluginDiscovery() {
|
| 163 |
+
CockpitPlugin samplePlugin = Cockpit.getRuntimeDelegate().getPluginRegistry().getPlugin("sample-plugin");
|
| 164 |
+
|
| 165 |
+
Assert.assertNotNull(samplePlugin);
|
| 166 |
+
}
|
| 167 |
+
}
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
In the test `#testPluginDiscovery` we use the internal Cockpit API to check if the plug-in was recognized.
|
| 171 |
+
|
| 172 |
+
Before we can actually run the test, we need to create a `camunda.cfg.xml` to be present on the class path (usually under `src/test/resources`). That file configures the process engine to be bootstrapped.
|
| 173 |
+
|
| 174 |
+
Let's ahead and create the file with the following content:
|
| 175 |
+
|
| 176 |
+
```xml
|
| 177 |
+
<?xml version="1.0" encoding="UTF-8"?>
|
| 178 |
+
|
| 179 |
+
<beans xmlns="http://www.springframework.org/schema/beans"
|
| 180 |
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
| 181 |
+
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
|
| 182 |
+
|
| 183 |
+
<bean id="processEngineConfiguration" class="org.camunda.bpm.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
|
| 184 |
+
|
| 185 |
+
<property name="jdbcUrl" value="jdbc:h2:mem:camunda;DB_CLOSE_DELAY=1000" />
|
| 186 |
+
<property name="jdbcDriver" value="org.h2.Driver" />
|
| 187 |
+
<property name="jdbcUsername" value="sa" />
|
| 188 |
+
<property name="jdbcPassword" value="" />
|
| 189 |
+
|
| 190 |
+
<!-- Database configurations -->
|
| 191 |
+
<property name="databaseSchemaUpdate" value="true" />
|
| 192 |
+
|
| 193 |
+
<!-- job executor configurations -->
|
| 194 |
+
<property name="jobExecutorActivate" value="false" />
|
| 195 |
+
|
| 196 |
+
<property name="history" value="full" />
|
| 197 |
+
|
| 198 |
+
</bean>
|
| 199 |
+
</beans>
|
| 200 |
+
```
|
| 201 |
+
|
| 202 |
+
### Custom Query
|
| 203 |
+
|
| 204 |
+
The plug-in mechanism allows us to provide additional SQL queries that may be run against the process engine database. Those queries must be defined via MyBatis mapping files.
|
| 205 |
+
|
| 206 |
+
To implement a custom query, we will create a file `sample.xml` in the directory `org/camunda/bpm/cockpit/plugin/sample/queries` with the following content:
|
| 207 |
+
|
| 208 |
+
```xml
|
| 209 |
+
<?xml version="1.0" encoding="UTF-8" ?>
|
| 210 |
+
|
| 211 |
+
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
| 212 |
+
|
| 213 |
+
<mapper namespace="cockpit.sample">
|
| 214 |
+
|
| 215 |
+
<resultMap id="processInstanceCountMap" type="org.camunda.bpm.cockpit.plugin.sample.db.ProcessInstanceCountDto">
|
| 216 |
+
<result property="key" column="KEY_" jdbcType="VARCHAR" />
|
| 217 |
+
<result property="instanceCount" column="INSTANCES_" jdbcType="INTEGER" />
|
| 218 |
+
</resultMap>
|
| 219 |
+
|
| 220 |
+
<select id="selectProcessInstanceCountsByProcessDefinition" resultMap="processInstanceCountMap">
|
| 221 |
+
select d.KEY_, count(d.KEY_) INSTANCES_
|
| 222 |
+
from ACT_RU_EXECUTION e JOIN ACT_RE_PROCDEF d ON e.PROC_DEF_ID_ = d.ID_
|
| 223 |
+
group by d.KEY_
|
| 224 |
+
</select>
|
| 225 |
+
|
| 226 |
+
</mapper>
|
| 227 |
+
```
|
| 228 |
+
|
| 229 |
+
both the usage of a custom namespace (`cockpit.sample`) as well as the result mapping to the plug-in provided class `org.camunda.bpm.cockpit.plugin.sample.db.ProcessInstanceCountDto`.
|
| 230 |
+
|
| 231 |
+
We need to define the class to which the result is mapped:
|
| 232 |
+
|
| 233 |
+
```java
|
| 234 |
+
package org.camunda.bpm.cockpit.plugin.sample.db;
|
| 235 |
+
|
| 236 |
+
public class ProcessInstanceCountDto {
|
| 237 |
+
|
| 238 |
+
private String key;
|
| 239 |
+
|
| 240 |
+
private int instanceCount;
|
| 241 |
+
|
| 242 |
+
public String getKey() {
|
| 243 |
+
return key;
|
| 244 |
+
}
|
| 245 |
+
|
| 246 |
+
public void setKey(String key) {
|
| 247 |
+
this.key = key;
|
| 248 |
+
}
|
| 249 |
+
|
| 250 |
+
public int getInstanceCount() {
|
| 251 |
+
return instanceCount;
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
public void setInstanceCount(int instanceCount) {
|
| 255 |
+
this.instanceCount = instanceCount;
|
| 256 |
+
}
|
| 257 |
+
}
|
| 258 |
+
```
|
| 259 |
+
|
| 260 |
+
Additionally, we need to publish the mapping file by overriding the method `#getMappingFiles()` in our plug-in class:
|
| 261 |
+
|
| 262 |
+
```java
|
| 263 |
+
public class SamplePlugin extends AbstractCockpitPlugin {
|
| 264 |
+
|
| 265 |
+
// ...
|
| 266 |
+
|
| 267 |
+
@Override
|
| 268 |
+
public List<String> getMappingFiles() {
|
| 269 |
+
return Arrays.asList("org/camunda/bpm/cockpit/plugin/sample/queries/sample.xml");
|
| 270 |
+
}
|
| 271 |
+
}
|
| 272 |
+
```
|
| 273 |
+
|
| 274 |
+
#### Testing Queries
|
| 275 |
+
|
| 276 |
+
To test that the plug-in defined query actually works, we extend our testcase. By using the Cockpit provided service `QueryService` we can verify that the query can be executed:
|
| 277 |
+
|
| 278 |
+
```java
|
| 279 |
+
public class SamplePluginsTest extends AbstractCockpitPluginTest {
|
| 280 |
+
|
| 281 |
+
// ...
|
| 282 |
+
|
| 283 |
+
@Test
|
| 284 |
+
public void testSampleQueryWorks() {
|
| 285 |
+
|
| 286 |
+
QueryService queryService = getQueryService();
|
| 287 |
+
|
| 288 |
+
List<ProcessInstanceCountDto> instanceCounts =
|
| 289 |
+
queryService
|
| 290 |
+
.executeQuery(
|
| 291 |
+
"cockpit.sample.selectProcessInstanceCountsByProcessDefinition",
|
| 292 |
+
new QueryParameters());
|
| 293 |
+
|
| 294 |
+
Assert.assertEquals(0, instanceCounts.size());
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
```
|
| 298 |
+
|
| 299 |
+
Note that `#getQueryService()` is merely a shortcut to the service that may also be accessed via Cockpit's main entry point, the `org.camunda.bpm.cockpit.Cockpit` class.
|
| 300 |
+
|
| 301 |
+
### Defining and Publishing Plug-in Services
|
| 302 |
+
|
| 303 |
+
Plug-ins publish their services via APIs defined through JAX-RS resources.
|
| 304 |
+
|
| 305 |
+
First, we need to add the JAX-RS API to our projects `pom.xml`. That is best done by including the following dependency:
|
| 306 |
+
|
| 307 |
+
```xml
|
| 308 |
+
<dependencies>
|
| 309 |
+
...
|
| 310 |
+
|
| 311 |
+
<!-- provides jax-rs (among other APIs) -->
|
| 312 |
+
<dependency>
|
| 313 |
+
<groupId>org.jboss.spec</groupId>
|
| 314 |
+
<artifactId>jboss-javaee-6.0</artifactId>
|
| 315 |
+
<type>pom</type>
|
| 316 |
+
<scope>provided</scope>
|
| 317 |
+
<version>${jboss-javaee.version}</version>
|
| 318 |
+
</dependency>
|
| 319 |
+
...
|
| 320 |
+
```
|
| 321 |
+
|
| 322 |
+
A server-side plug-in API consists of a root resource and a number of sub resources that are provided by the root resource. A root resource may inherit from `org.camunda.bpm.cockpit.plugin.resource.AbstractPluginRootResource` to receive some basic traits. It must publish itself on the path `plugin/$pluginName` via a `@Path` annotation.
|
| 323 |
+
|
| 324 |
+
A root resource for our plug-in may look as follows:
|
| 325 |
+
|
| 326 |
+
```java
|
| 327 |
+
package org.camunda.bpm.cockpit.plugin.sample.resources;
|
| 328 |
+
|
| 329 |
+
import jakarta.ws.rs.Path;
|
| 330 |
+
import jakarta.ws.rs.PathParam;
|
| 331 |
+
import org.camunda.bpm.cockpit.plugin.resource.AbstractCockpitPluginRootResource;
|
| 332 |
+
import org.camunda.bpm.cockpit.plugin.sample.SamplePlugin;
|
| 333 |
+
|
| 334 |
+
@Path("plugin/" + SamplePlugin.ID)
|
| 335 |
+
public class SamplePluginRootResource extends AbstractPluginRootResource {
|
| 336 |
+
|
| 337 |
+
public SamplePluginRootResource() {
|
| 338 |
+
super(SamplePlugin.ID);
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
@Path("{engineName}/process-instance")
|
| 342 |
+
public ProcessInstanceResource getProcessInstanceResource(@PathParam("engineName") String engineName) {
|
| 343 |
+
return subResource(new ProcessInstanceResource(engineName), engineName);
|
| 344 |
+
}
|
| 345 |
+
}
|
| 346 |
+
```
|
| 347 |
+
|
| 348 |
+
Note that a sub resource gets initialized by the plug-in when requests to `{engineName}/process-instance` are being made. That ensures that a Cockpit service is multi-tenancy ready out of the box (i.e. capable to work with all process engines provided by the Camunda Platform).
|
| 349 |
+
|
| 350 |
+
A sub-resource may extend `org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource` to get initialized with the correct process engine mappings. The resource shown below exposes our custom SQL query to the client when accessing the resource via `GET`.
|
| 351 |
+
|
| 352 |
+
```java
|
| 353 |
+
package org.camunda.bpm.cockpit.plugin.sample.resources;
|
| 354 |
+
|
| 355 |
+
import java.util.List;
|
| 356 |
+
import jakarta.ws.rs.GET;
|
| 357 |
+
|
| 358 |
+
import org.camunda.bpm.cockpit.db.QueryParameters;
|
| 359 |
+
import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
|
| 360 |
+
import org.camunda.bpm.cockpit.plugin.sample.db.ProcessInstanceCountDto;
|
| 361 |
+
|
| 362 |
+
public class ProcessInstanceResource extends AbstractPluginResource {
|
| 363 |
+
|
| 364 |
+
public ProcessInstanceResource(String engineName) {
|
| 365 |
+
super(engineName);
|
| 366 |
+
}
|
| 367 |
+
|
| 368 |
+
@GET
|
| 369 |
+
public List<ProcessInstanceCountDto> getProcessInstanceCounts() {
|
| 370 |
+
|
| 371 |
+
return getQueryService()
|
| 372 |
+
.executeQuery(
|
| 373 |
+
"cockpit.sample.selectProcessInstanceCountsByProcessDefinition",
|
| 374 |
+
new QueryParameters());
|
| 375 |
+
}
|
| 376 |
+
}
|
| 377 |
+
```
|
| 378 |
+
|
| 379 |
+
To include plug-in resources into the Cockpit application those resources must be published in the main plug-in file by overriding `#getResourceClasses()`:
|
| 380 |
+
|
| 381 |
+
```java
|
| 382 |
+
import org.camunda.bpm.cockpit.plugin.sample.SamplePlugin;
|
| 383 |
+
|
| 384 |
+
public class SamplePlugin extends AbstractCockpitPlugin {
|
| 385 |
+
|
| 386 |
+
// ...
|
| 387 |
+
|
| 388 |
+
@Override
|
| 389 |
+
public Set<Class<?>> getResourceClasses() {
|
| 390 |
+
Set<Class<?>> classes = new HashSet<Class<?>>();
|
| 391 |
+
|
| 392 |
+
classes.add(SamplePluginRootResource.class);
|
| 393 |
+
|
| 394 |
+
return classes;
|
| 395 |
+
}
|
| 396 |
+
|
| 397 |
+
// ...
|
| 398 |
+
}
|
| 399 |
+
```
|
| 400 |
+
|
| 401 |
+
Given the above setup the resource class extends the Cockpit API with the following paths
|
| 402 |
+
|
| 403 |
+
```
|
| 404 |
+
GET $cockpit_api_root/plugin/sample/$engine/process-instance
|
| 405 |
+
```
|
| 406 |
+
|
| 407 |
+
#### Use Tenant Check
|
| 408 |
+
|
| 409 |
+
It is possible to use the tenant check in the sub-resource of the cockpit plugin. Therefore, the sub-resource may extend `org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource` to configure the custom query with the tenant check. See the following example for the tenant check usage.
|
| 410 |
+
|
| 411 |
+
```java
|
| 412 |
+
package org.camunda.bpm.cockpit.plugin.sample.resources;
|
| 413 |
+
|
| 414 |
+
import java.util.List;
|
| 415 |
+
import jakarta.ws.rs.GET;
|
| 416 |
+
|
| 417 |
+
import org.camunda.bpm.cockpit.db.QueryParameters;
|
| 418 |
+
import org.camunda.bpm.cockpit.plugin.resource.AbstractPluginResource;
|
| 419 |
+
import org.camunda.bpm.cockpit.plugin.sample.db.ProcessInstanceCountDto;
|
| 420 |
+
|
| 421 |
+
public class ProcessInstanceResource extends AbstractPluginResource {
|
| 422 |
+
|
| 423 |
+
public ProcessInstanceResource(String engineName) {
|
| 424 |
+
super(engineName);
|
| 425 |
+
}
|
| 426 |
+
|
| 427 |
+
@GET
|
| 428 |
+
public List<ProcessInstanceCountDto> getProcessInstanceCounts() {
|
| 429 |
+
QueryParameters queryParameters = new QueryParameters();
|
| 430 |
+
|
| 431 |
+
configureTenantCheck(queryParameters);
|
| 432 |
+
|
| 433 |
+
return getQueryService()
|
| 434 |
+
.executeQuery(
|
| 435 |
+
"cockpit.sample.selectProcessInstanceCountsByProcessDefinition", queryParameters);
|
| 436 |
+
}
|
| 437 |
+
}
|
| 438 |
+
```
|
| 439 |
+
|
| 440 |
+
Additionally, it is necessary to include the tenant check query to the custom query XML file. For it, add the following line to the custom query.
|
| 441 |
+
|
| 442 |
+
```xml
|
| 443 |
+
<include refid="org.camunda.bpm.engine.impl.persistence.entity.TenantEntity.queryTenantCheck" />
|
| 444 |
+
```
|
| 445 |
+
|
| 446 |
+
#### Testing JAX-RS Resources
|
| 447 |
+
|
| 448 |
+
To test your JAX-RS resources you can instantiate them directly during a plug-in test case. Alternatively, you can write a real API test using [arquillian](http://arquillian.org/).
|
| 449 |
+
|
| 450 |
+
Now we are done with the server-side parts of the plug-in. Next, we will go ahead and write the client-side extension that exposes the functionality to the user.
|
| 451 |
+
|
| 452 |
+
## Client Side
|
| 453 |
+
|
| 454 |
+
|
| 455 |
+
>This section only provides a short overview of the client-side plug-in mechanism in Cockpit.
|
| 456 |
+
>Consider reading about the [Structure of a Frontend Module](https://docs.camunda.org/manual/7.24/webapps/cockpit/extend/plugins/#structure-of-a-frontend-module) if you are interested in more details.
|
| 457 |
+
|
| 458 |
+
|
| 459 |
+
The client-side part of a Cockpit plug-in consists of an extension to the Cockpit webapp client application. It is served through the plug-in serverside extension as a static plug-in asset.
|
| 460 |
+
|
| 461 |
+
### Static Plugin Assets
|
| 462 |
+
|
| 463 |
+
When using `AbstractPluginRootResource` as the plug-in resources base class, serving static assets is already built in. The root resource accepts a `GET` request under `/static` to serve plug-in-provided client-side resources. Per convention, these resources must reside in a `/plugin-webapp/$plugin_id` directory absolute to the classpath root.
|
| 464 |
+
|
| 465 |
+
So, let's create a file `plugin-webapp/$plugin_id/info.txt` in the `src/main/resources` directory of our project. We can give it the following content (optional):
|
| 466 |
+
|
| 467 |
+
```
|
| 468 |
+
FOO BAR
|
| 469 |
+
```
|
| 470 |
+
|
| 471 |
+
#### Testing Assets
|
| 472 |
+
|
| 473 |
+
To test that the assets are served, we can either implement a test case or test the matter manually after we integrated the plug-in into the Cockpit webapp.
|
| 474 |
+
|
| 475 |
+
### plugin.js Main File
|
| 476 |
+
|
| 477 |
+
Each plug-in must contain a file `app/plugin.js` in the plug-ins assets directory (i.e., `plugin-webapp/$plugin_id`). That file bootstraps the client-side plug-in and registers it with Cockpit. To do so it must declare and export a default module.
|
| 478 |
+
|
| 479 |
+
Without going too deeply into detail, our plugins `plugin.js` may look like this:
|
| 480 |
+
|
| 481 |
+
```javascript
|
| 482 |
+
//...
|
| 483 |
+
export default {
|
| 484 |
+
id: "process-instance-count",
|
| 485 |
+
pluginPoint: "cockpit.dashboard",
|
| 486 |
+
render: node => {
|
| 487 |
+
// render plugin
|
| 488 |
+
},
|
| 489 |
+
unmount: () => {
|
| 490 |
+
// unmount plugin
|
| 491 |
+
},
|
| 492 |
+
|
| 493 |
+
// make sure we have a higher priority than the default plugin
|
| 494 |
+
priority: 12,
|
| 495 |
+
};
|
| 496 |
+
```
|
| 497 |
+
|
| 498 |
+
The file defines a plugin with the id `process-instance-count` which is automatically registered at the plugin point `cockpit.dashboard`.
|
| 499 |
+
|
| 500 |
+
When deploying the extended Camunda webapplication on the Camunda Platform, we can see the plug-in in action.
|
| 501 |
+
|
| 502 |
+
## Summary
|
| 503 |
+
|
| 504 |
+
You made it! In this example we walked through all important steps required to build a Cockpit plug-in, from creating a plug-in skeleton through defining server-side plug-in parts up to implementing the client-side portions of the plug-in.
|
| 505 |
+
|
| 506 |
+
# License
|
| 507 |
+
|
| 508 |
+
Use under terms of the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
| 509 |
+
|
| 510 |
+
[1]: https://github.com/camunda/camunda-bpm-platform/tree/master/webapps
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/frontend/.babelrc
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"presets": ["@babel/preset-env", "@babel/preset-react"],
|
| 3 |
+
"exclude": "node_modules/**",
|
| 4 |
+
"plugins": ["@babel/plugin-transform-runtime"]
|
| 5 |
+
}
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/frontend/package-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
source_data/pinned/camunda-dmn-examples/commit-6c7f4c4adb4b/cockpit/cockpit-fullstack-count-processes/frontend/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "camunda-cockpit-sample-plugin",
|
| 3 |
+
"version": "0.0.1",
|
| 4 |
+
"scripts": {
|
| 5 |
+
"build": "rollup -c"
|
| 6 |
+
},
|
| 7 |
+
"type": "module",
|
| 8 |
+
"dependencies": {
|
| 9 |
+
"@babel/runtime": "^7.28.4",
|
| 10 |
+
"react": "~18.3.1",
|
| 11 |
+
"react-dom": "~18.3.1"
|
| 12 |
+
},
|
| 13 |
+
"devDependencies": {
|
| 14 |
+
"@babel/core": "~7.25.2",
|
| 15 |
+
"@babel/plugin-transform-runtime": "~7.25.4",
|
| 16 |
+
"@babel/preset-env": "~7.25.4",
|
| 17 |
+
"@babel/preset-react": "~7.24.7",
|
| 18 |
+
"@rollup/plugin-babel": "~6.0.4",
|
| 19 |
+
"@rollup/plugin-commonjs": "~28.0.0",
|
| 20 |
+
"@rollup/plugin-node-resolve": "~15.3.0",
|
| 21 |
+
"@rollup/plugin-replace": "~6.0.1",
|
| 22 |
+
"rollup": "~4.23.0",
|
| 23 |
+
"rollup-plugin-scss": "~4.0.0",
|
| 24 |
+
"sass": "^1.93.2"
|
| 25 |
+
}
|
| 26 |
+
}
|