@pbinitiative/zenbpm-js-properties-panel 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026-present Process Builders Initiative, z.s.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,97 @@
1
+ # @pbinitiative/zenbpm-js-properties-panel
2
+
3
+ A [bpmn-js](https://github.com/bpmn-io/bpmn-js) properties panel provider that adds **ZenBPM-specific element properties** to the standard [bpmn-js-properties-panel](https://github.com/bpmn-io/bpmn-js-properties-panel).
4
+
5
+ It reads and writes ZenBPM extension elements (defined by [`@pbinitiative/zenbpm-bpmn-moddle`](https://github.com/pbinitiative/zenbpm-bpmn-moddle)) directly inside the BPMN XML, keeping diagrams portable and engine-ready.
6
+
7
+ ---
8
+
9
+ ## Properties added
10
+
11
+ | Element | Property group | Fields |
12
+ |---|---|---|
13
+ | Business Rule Task | **Implementation** | Implementation type (DMN decision / Job worker) |
14
+ | Business Rule Task — DMN decision | **Called decision** | Decision ID, Binding (latest/deployment/version tag), Version tag*, Result variable |
15
+ | Business Rule Task — Job worker | **Task definition** | Type, Retries |
16
+ | Service / Script / Send Task | **Task definition** | Type, Retries |
17
+ | Call Activity | **Called element** | Process ID, Binding (latest/deployment/version tag), Version tag*, Propagate all child variables, Propagate all parent variables |
18
+ | User Task | **Assignment** | Assignee (FEEL), Candidate groups (FEEL), Candidate users (FEEL), Due date (FEEL), Follow-up date (FEEL) |
19
+ | User Task | **Zen Form** | *Design Form* button (opens form designer) |
20
+ | All applicable tasks + Sub-process + Events | **Input mapping** | Source expression (FEEL), Target variable |
21
+ | All applicable tasks + Sub-process + Events | **Output mapping** | Source expression (FEEL), Target variable |
22
+ | Multi-instance elements | **Multi-instance** | Input collection, Element variable, Output collection, Output element, Completion condition |
23
+ | Sequence flows / boundary events | **Condition** | Condition expression (FEEL) |
24
+ | Process | **Version tag** | Tag value |
25
+
26
+ > \* The **Version tag** text field only appears when you select *Version tag* from the **Binding** dropdown. The Binding dropdown has three options: *Latest* (always use the newest deployed version), *Deployment* (use the version deployed together with this process), and *Version tag* (use a specific version identified by a tag string).
27
+
28
+ ---
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ npm install @pbinitiative/zenbpm-js-properties-panel
34
+ # or
35
+ pnpm add @pbinitiative/zenbpm-js-properties-panel
36
+ ```
37
+
38
+ ### Peer dependencies
39
+
40
+ The following packages must already be present in your project:
41
+
42
+ ```bash
43
+ npm install bpmn-js bpmn-js-properties-panel @bpmn-io/properties-panel
44
+ ```
45
+
46
+ ---
47
+
48
+ ## Usage
49
+
50
+ Import the provider module and add it to your `bpmn-js` / `bpmnlint` modeler alongside the standard properties panel.
51
+
52
+ ```js
53
+ import BpmnModeler from 'bpmn-js/lib/Modeler';
54
+ import { BpmnPropertiesPanelModule, BpmnPropertiesProviderModule } from 'bpmn-js-properties-panel';
55
+ import { ZenBpmPropertiesProviderModule } from '@pbinitiative/zenbpm-js-properties-panel';
56
+
57
+ // ZenBPM moddle descriptor — required so bpmnFactory knows the zenbpm:* types
58
+ import ZenbpmModdle from '@pbinitiative/zenbpm-bpmn-moddle';
59
+
60
+ const modeler = new BpmnModeler({
61
+ container: '#canvas',
62
+ propertiesPanel: { parent: '#properties' },
63
+ additionalModules: [
64
+ BpmnPropertiesPanelModule,
65
+ BpmnPropertiesProviderModule,
66
+ ZenBpmPropertiesProviderModule, // ← add this
67
+ ],
68
+ moddleExtensions: {
69
+ zenbpm: ZenbpmModdle, // ← and this
70
+ },
71
+ });
72
+ ```
73
+
74
+ > **Note:** The moddle extension (`moddleExtensions: { zenbpm: ZenbpmModdle }`) is required. Without it, `bpmnFactory` will not recognise the `zenbpm:*` types and extension elements will not be created or read correctly.
75
+
76
+ ---
77
+
78
+ ## Zen Form designer integration
79
+
80
+ The **Design Form** button in the *Zen Form* group dispatches a native DOM `CustomEvent` that your application can listen to:
81
+
82
+ ```js
83
+ document.addEventListener('bpmn-open-form-designer', (event) => {
84
+ const { elementId, value } = event.detail;
85
+ // elementId — the BPMN element id
86
+ // value — current form JSON (raw string), empty if not yet set
87
+ openMyFormDesigner(elementId, value);
88
+ });
89
+ ```
90
+
91
+ To write the result back, store the form JSON as a FEEL string literal in the `ZEN_FORM` input mapping parameter (`source: ="<json>"`).
92
+
93
+ ---
94
+
95
+ ## License
96
+
97
+ MIT