@blackbelt-technology/pi-dashboard-forms-bpmn 0.7.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/.pi/skills/bpmn-package-explorer/SKILL.md +120 -0
- package/.pi/skills/bpmn-package-explorer/assets/LICENSE.bpmn-io.txt +23 -0
- package/.pi/skills/bpmn-package-explorer/assets/VENDORED.md +90 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/css/bpmn-codes.css +108 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/css/bpmn-embedded.css +166 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/css/bpmn.css +164 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.eot +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.svg +224 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.ttf +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.woff +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-font/font/bpmn.woff2 +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn-navigated-viewer.production.min.js +22 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/bpmn.css +145 -0
- package/.pi/skills/bpmn-package-explorer/assets/bpmn-js/diagram-js.css +1249 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/diagram-js.css +1133 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/css/dmn-codes.css +41 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/css/dmn-embedded.css +98 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/css/dmn.css +97 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.eot +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.svg +90 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.ttf +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.woff +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-font/font/dmn.woff2 +0 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-js-decision-table.css +580 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-js-drd.css +108 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-js-literal-expression.css +165 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-js-shared.css +221 -0
- package/.pi/skills/bpmn-package-explorer/assets/dmn-js/dmn-viewer.production.min.js +16 -0
- package/.pi/skills/bpmn-package-explorer/assets/lib/bpmn-pipeline.mjs +6981 -0
- package/.pi/skills/bpmn-package-explorer/assets/lib/yaml.mjs +7372 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g1-identical-bounds.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g2-zero-size.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g3-child-outside.bpmn +16 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g4-negative-coord.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/geometry/g5-overlap.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/1-linear.bpmn +12 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/2-gateway.bpmn +19 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/3-boundary.bpmn +13 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/4-subprocess.bpmn +17 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/5-pools.bpmn +21 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/6-lanes-only.bpmn +16 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/7-loop.bpmn +13 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/measured/8-long-chain.bpmn +32 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/nesting/expanded-subprocess-ok.bpmn +25 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/call-activity.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/intermediate-catch.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/intermediate-throw.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/manual-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/multi-boundary.bpmn +16 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/parallel-gateway.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/receive-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/rule-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/script-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/fixtures/provisional/send-task.bpmn +10 -0
- package/.pi/skills/bpmn-package-explorer/references/authoring-envelope.md +52 -0
- package/.pi/skills/bpmn-package-explorer/references/identifiers.md +102 -0
- package/.pi/skills/bpmn-package-explorer/references/layout-envelope.md +105 -0
- package/.pi/skills/bpmn-package-explorer/references/licensing.md +48 -0
- package/.pi/skills/bpmn-package-explorer/references/package-manifest.md +104 -0
- package/.pi/skills/bpmn-package-explorer/scripts/build-fixtures.mjs +299 -0
- package/.pi/skills/bpmn-package-explorer/scripts/demo.mjs +128 -0
- package/.pi/skills/bpmn-package-explorer/scripts/diagnostics.mjs +37 -0
- package/.pi/skills/bpmn-package-explorer/scripts/envelope.mjs +160 -0
- package/.pi/skills/bpmn-package-explorer/scripts/fixtures.mjs +140 -0
- package/.pi/skills/bpmn-package-explorer/scripts/generate-cli.mjs +31 -0
- package/.pi/skills/bpmn-package-explorer/scripts/generate.mjs +103 -0
- package/.pi/skills/bpmn-package-explorer/scripts/guard.mjs +335 -0
- package/.pi/skills/bpmn-package-explorer/scripts/harness.mjs +12 -0
- package/.pi/skills/bpmn-package-explorer/scripts/identifiers.mjs +117 -0
- package/.pi/skills/bpmn-package-explorer/scripts/ingest.mjs +95 -0
- package/.pi/skills/bpmn-package-explorer/scripts/manifest.mjs +374 -0
- package/.pi/skills/bpmn-package-explorer/scripts/pipeline.mjs +49 -0
- package/.pi/skills/bpmn-package-explorer/scripts/render.mjs +130 -0
- package/.pi/skills/bpmn-package-explorer/scripts/runguard.mjs +38 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-e2e.mjs +87 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-guard.mjs +99 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-manifest.mjs +170 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-more.mjs +87 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest-workflow.mjs +73 -0
- package/.pi/skills/bpmn-package-explorer/scripts/selftest.mjs +57 -0
- package/.pi/skills/bpmn-package-explorer/scripts/vendor.mjs +141 -0
- package/.pi/skills/bpmn-package-explorer/scripts/view-cli.mjs +19 -0
- package/.pi/skills/bpmn-package-explorer/templates/shell.html +141 -0
- package/.pi/skills/bpmn-package-explorer/templates/viewer.js +301 -0
- package/.pi/skills/canvas-webapp/SKILL.md +104 -0
- package/.pi/skills/openforms-mui/SKILL.md +187 -0
- package/.pi/skills/openforms-mui/references/a11y.md +68 -0
- package/.pi/skills/openforms-mui/references/field-widget-map.md +64 -0
- package/.pi/skills/openforms-mui/references/hu-locale.md +45 -0
- package/.pi/skills/openforms-mui/references/logic.md +94 -0
- package/.pi/skills/openforms-mui/references/schema.md +94 -0
- package/.pi/skills/openforms-mui/references/theme-bridge.md +65 -0
- package/.pi/skills/openforms-mui/tools/canvas-serve.mjs +51 -0
- package/.pi/skills/openforms-mui/tools/demo-schema.json +80 -0
- package/.pi/skills/openforms-mui/tools/mockups/tokens.css +27 -0
- package/.pi/skills/openforms-mui/tools/mockups/ui-contract.tokens.json +16 -0
- package/.pi/skills/openforms-mui/tools/package-lock.json +5919 -0
- package/.pi/skills/openforms-mui/tools/package.json +61 -0
- package/.pi/skills/openforms-mui/tools/preview/RenderPanel.tsx +105 -0
- package/.pi/skills/openforms-mui/tools/preview/canvas-app.tsx +66 -0
- package/.pi/skills/openforms-mui/tools/preview/canvas-index.html +16 -0
- package/.pi/skills/openforms-mui/tools/preview/cli.ts +99 -0
- package/.pi/skills/openforms-mui/tools/preview/index.html +17 -0
- package/.pi/skills/openforms-mui/tools/preview/main.tsx +228 -0
- package/.pi/skills/openforms-mui/tools/preview/vite-plugin.ts +41 -0
- package/.pi/skills/openforms-mui/tools/scripts/assert-peer-deps.mjs +39 -0
- package/.pi/skills/openforms-mui/tools/src/OpenFormsMui.tsx +391 -0
- package/.pi/skills/openforms-mui/tools/src/css.d.ts +2 -0
- package/.pi/skills/openforms-mui/tools/src/fields/ErrorSummary.tsx +72 -0
- package/.pi/skills/openforms-mui/tools/src/fields/FieldRenderer.tsx +328 -0
- package/.pi/skills/openforms-mui/tools/src/fields/FieldShell.tsx +50 -0
- package/.pi/skills/openforms-mui/tools/src/fields/FileField.tsx +91 -0
- package/.pi/skills/openforms-mui/tools/src/fields/MatrixField.tsx +146 -0
- package/.pi/skills/openforms-mui/tools/src/fields/RepeaterField.tsx +82 -0
- package/.pi/skills/openforms-mui/tools/src/fields/SignatureCanvas.tsx +121 -0
- package/.pi/skills/openforms-mui/tools/src/fields/context.tsx +34 -0
- package/.pi/skills/openforms-mui/tools/src/fields/index.ts +7 -0
- package/.pi/skills/openforms-mui/tools/src/fields/label.ts +42 -0
- package/.pi/skills/openforms-mui/tools/src/fonts.ts +8 -0
- package/.pi/skills/openforms-mui/tools/src/i18n/dictionary.ts +58 -0
- package/.pi/skills/openforms-mui/tools/src/i18n/hu.ts +56 -0
- package/.pi/skills/openforms-mui/tools/src/i18n/index.ts +43 -0
- package/.pi/skills/openforms-mui/tools/src/index.ts +27 -0
- package/.pi/skills/openforms-mui/tools/src/logic/cnf.ts +206 -0
- package/.pi/skills/openforms-mui/tools/src/logic/formula.ts +285 -0
- package/.pi/skills/openforms-mui/tools/src/logic/index.ts +4 -0
- package/.pi/skills/openforms-mui/tools/src/logic/operators.ts +43 -0
- package/.pi/skills/openforms-mui/tools/src/logic/state.ts +183 -0
- package/.pi/skills/openforms-mui/tools/src/payload.ts +83 -0
- package/.pi/skills/openforms-mui/tools/src/provenance.ts +21 -0
- package/.pi/skills/openforms-mui/tools/src/schema/diagnose.ts +256 -0
- package/.pi/skills/openforms-mui/tools/src/schema/index.ts +4 -0
- package/.pi/skills/openforms-mui/tools/src/schema/normalize.ts +163 -0
- package/.pi/skills/openforms-mui/tools/src/schema/types.ts +299 -0
- package/.pi/skills/openforms-mui/tools/src/schema/walk.ts +68 -0
- package/.pi/skills/openforms-mui/tools/src/theme/from-tokens.ts +102 -0
- package/.pi/skills/openforms-mui/tools/src/theme/index.ts +1 -0
- package/.pi/skills/openforms-mui/tools/src/validation/constrain.ts +83 -0
- package/.pi/skills/openforms-mui/tools/src/validation/diagnostics.ts +62 -0
- package/.pi/skills/openforms-mui/tools/src/validation/empty.ts +53 -0
- package/.pi/skills/openforms-mui/tools/src/validation/index.ts +5 -0
- package/.pi/skills/openforms-mui/tools/src/validation/resolver.ts +14 -0
- package/.pi/skills/openforms-mui/tools/src/validation/zod-from-schema.ts +169 -0
- package/.pi/skills/openforms-mui/tools/tests/a11y.test.tsx +82 -0
- package/.pi/skills/openforms-mui/tools/tests/cli.test.ts +74 -0
- package/.pi/skills/openforms-mui/tools/tests/component.test.tsx +295 -0
- package/.pi/skills/openforms-mui/tools/tests/diagnose.test.ts +163 -0
- package/.pi/skills/openforms-mui/tools/tests/fixtures/all-field-types.json +45 -0
- package/.pi/skills/openforms-mui/tools/tests/logic.test.ts +175 -0
- package/.pi/skills/openforms-mui/tools/tests/normalize.test.ts +105 -0
- package/.pi/skills/openforms-mui/tools/tests/reference-semantics.test.ts +131 -0
- package/.pi/skills/openforms-mui/tools/tests/responsive.test.tsx +158 -0
- package/.pi/skills/openforms-mui/tools/tests/setup.ts +16 -0
- package/.pi/skills/openforms-mui/tools/tests/singleton.test.tsx +31 -0
- package/.pi/skills/openforms-mui/tools/tests/theme.test.ts +65 -0
- package/.pi/skills/openforms-mui/tools/tests/toolchain.test.ts +33 -0
- package/.pi/skills/openforms-mui/tools/tests/validation.test.ts +222 -0
- package/.pi/skills/openforms-mui/tools/tsconfig.json +21 -0
- package/.pi/skills/openforms-mui/tools/vite.canvas.config.ts +21 -0
- package/.pi/skills/openforms-mui/tools/vitest.config.ts +17 -0
- package/NOTICE +46 -0
- package/README.md +62 -0
- package/package.json +46 -0
- package/scripts/ensure-openforms-deps.mjs +38 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Measured layout envelope
|
|
2
|
+
|
|
3
|
+
`bpmn-auto-layout@1.3.0` is the only tool that turns semantics-only BPMN into a
|
|
4
|
+
readable coordinate set, but it **fails silently** on three constructs — every
|
|
5
|
+
output parses cleanly through `bpmn-moddle`, so a corrupt diagram looks
|
|
6
|
+
plausible. This envelope is *measured*, not assumed: every supported construct
|
|
7
|
+
has a passing fixture, and the layout guard (`scripts/guard.mjs`) is the
|
|
8
|
+
regression detector for upstream drift.
|
|
9
|
+
|
|
10
|
+
Run the evidence yourself, headless, from any directory (no `node_modules`, no
|
|
11
|
+
network):
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
node scripts/fixtures.mjs
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## The eight measured fixtures
|
|
18
|
+
|
|
19
|
+
| fixture | outcome | evidence |
|
|
20
|
+
|---|---|---|
|
|
21
|
+
| `measured/1-linear` | **pass** | start → userTask → serviceTask → end; 4 shapes / 3 edges, no overlap |
|
|
22
|
+
| `measured/2-gateway` | **pass** | exclusive split + join; 7 shapes / 7 edges, no overlap |
|
|
23
|
+
| `measured/3-boundary` | **pass** | single timer `boundaryEvent` placed on the host border (`y=92` against host bottom `y=110`) |
|
|
24
|
+
| `measured/7-loop` | **pass** | gateway routes a `sequenceFlow` back to an earlier task; no tangle |
|
|
25
|
+
| `measured/8-long-chain` | **pass** | 12-task chain; 14 shapes / 13 edges, single row ≈2043 px wide (fit-to-viewport on load) |
|
|
26
|
+
| `measured/4-subprocess` | **fail (G1+G3)** | inline `subProcess` corruption — see below |
|
|
27
|
+
| `measured/5-pools` | **fail (P1)** | `collaboration`: only the first `<process>` gets a plane; the second participant, its flow nodes and the message flow receive no DI |
|
|
28
|
+
| `measured/6-lanes-only` | **fail (P1)** | `laneSet`: flow nodes lay out, lane shapes are never emitted |
|
|
29
|
+
|
|
30
|
+
### The inline sub-process signature (why P1 alone is not enough)
|
|
31
|
+
|
|
32
|
+
The corruption is **not** a missing shape — the correct *number* of shapes is
|
|
33
|
+
emitted, so a presence check (P1) passes. The failure is geometric:
|
|
34
|
+
|
|
35
|
+
- the sub-process keeps its collapsed `100×80` bounds while its children are
|
|
36
|
+
laid out across `x=57` to `x=393` — children land **outside** the container
|
|
37
|
+
(**G3**);
|
|
38
|
+
- child shapes receive coordinates **exactly equal** to unrelated parent-level
|
|
39
|
+
shapes (e.g. an inner start event at the same bounds as the outer start
|
|
40
|
+
event) (**G1**).
|
|
41
|
+
|
|
42
|
+
G1 (identical bounds) and G3 (child containment) together are what catch it.
|
|
43
|
+
An earlier "no shape may appear outside its container's plane" rule would have
|
|
44
|
+
been **wrong** — the children of an *expanded* sub-process legitimately occupy
|
|
45
|
+
the parent plane — and would have false-fired on correct input while missing
|
|
46
|
+
this corruption, which places children in the correct plane.
|
|
47
|
+
|
|
48
|
+
## Provisional constructs — each confirmed by its own fixture
|
|
49
|
+
|
|
50
|
+
Confirmed **pass** (`provisional/*.bpmn`): `businessRuleTask`, `manualTask`,
|
|
51
|
+
`scriptTask`, `sendTask`, `receiveTask`, `callActivity`, `parallelGateway`,
|
|
52
|
+
`intermediateCatchEvent`, `intermediateThrowEvent`.
|
|
53
|
+
|
|
54
|
+
Confirmed **fail → rejected**: **multiple boundary events on one activity**.
|
|
55
|
+
The layout step places two boundary events on one activity at overlapping
|
|
56
|
+
positions (`Boundary_timer` x 190.33–226.33 vs `Boundary_error` x 223.66–259.66,
|
|
57
|
+
both y=92 — a ~2.7 px collision failing **G5**). A **single** boundary event per
|
|
58
|
+
activity is supported; a second on the same host is rejected at authoring time.
|
|
59
|
+
|
|
60
|
+
## Supported vs rejected
|
|
61
|
+
|
|
62
|
+
**Supported (generated):** start / end / intermediate catch & throw events;
|
|
63
|
+
`task`, `userTask`, `serviceTask`, `businessRuleTask`, `manualTask`,
|
|
64
|
+
`scriptTask`, `sendTask`, `receiveTask`, `callActivity`; `exclusiveGateway`,
|
|
65
|
+
`parallelGateway`; a single `boundaryEvent` per activity; `sequenceFlow`
|
|
66
|
+
including loops. Chain length is unrestricted.
|
|
67
|
+
|
|
68
|
+
**Rejected (with a manifest substitution):**
|
|
69
|
+
|
|
70
|
+
| rejected | substitution |
|
|
71
|
+
|---|---|
|
|
72
|
+
| inline `subProcess` | `callActivity` + separate `.bpmn` + `kind: process` binding (click-to-drill-down) |
|
|
73
|
+
| `collaboration` / `participant` | one `.bpmn` per participant + `kind: participant` bindings (pool switcher) |
|
|
74
|
+
| `laneSet` / `lane` | manifest `roles` entries (CSS markers + legend) |
|
|
75
|
+
| `messageFlow` | unrepresentable after pool decomposition — rejected with a diagnostic |
|
|
76
|
+
| ≥2 boundary events on one activity | split interruptions across separate activities |
|
|
77
|
+
|
|
78
|
+
## The guard invariants
|
|
79
|
+
|
|
80
|
+
**Presence** — P1: every flow node / participant / lane owns exactly one
|
|
81
|
+
`BPMNShape`. P2: every sequence/message flow owns one `BPMNEdge` with ≥2
|
|
82
|
+
waypoints. P3: no shape/edge references an element absent from the semantics.
|
|
83
|
+
|
|
84
|
+
**Geometry** — G1: no two shapes in a plane share identical bounds. G2: every
|
|
85
|
+
shape has non-zero size. G3: a child of an *expanded* container lies within its
|
|
86
|
+
bounds. G4: no negative coordinate (**strict mode only**). G5: no overlap
|
|
87
|
+
between *flow-node* shapes not in a host/boundary or container/child
|
|
88
|
+
relationship (artifacts excluded).
|
|
89
|
+
|
|
90
|
+
**Correct nesting is never a failure:** expanded sub-process children in the
|
|
91
|
+
parent plane, a collapsed sub-process owning a separate plane, a boundary event
|
|
92
|
+
straddling its host border, and artifact shapes (`textAnnotation`, `group`,
|
|
93
|
+
`dataObjectReference`, `dataStoreReference`) overlapping flow nodes.
|
|
94
|
+
|
|
95
|
+
## Two modes
|
|
96
|
+
|
|
97
|
+
- **strict** — geometry produced by *this* layout run. Any violation aborts;
|
|
98
|
+
no file is written. This is where "no corrupt diagram is ever written" holds.
|
|
99
|
+
- **advisory** — geometry already on disk when read. Every violation is a
|
|
100
|
+
warning and the document still renders (a conformant modeller legitimately
|
|
101
|
+
emits negative coordinates and overlapping annotations). G4 is not evaluated.
|
|
102
|
+
|
|
103
|
+
A DI-less file read from disk is laid out and then verified **strict**, because
|
|
104
|
+
the geometry about to exist is this run's own; if it contains a rejected
|
|
105
|
+
construct it is refused rather than laid out.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Licensing obligations
|
|
2
|
+
|
|
3
|
+
Two licences apply to a rendered package. Both are satisfiable simultaneously.
|
|
4
|
+
|
|
5
|
+
## bpmn.io License — `bpmn-js` and `dmn-js`
|
|
6
|
+
|
|
7
|
+
The vendored viewers are distributed under the **bpmn.io License** (full text in
|
|
8
|
+
`assets/LICENSE.bpmn-io.txt`). It grants free use with one condition beyond plain
|
|
9
|
+
MIT:
|
|
10
|
+
|
|
11
|
+
> The source code responsible for displaying the bpmn.io project watermark that
|
|
12
|
+
> links back to https://bpmn.io as part of rendered diagrams MUST NOT be removed
|
|
13
|
+
> or changed. When this software is being used in a website or application, the
|
|
14
|
+
> watermark must stay fully visible and not visually overlapped by other
|
|
15
|
+
> elements.
|
|
16
|
+
|
|
17
|
+
This is an **acceptance criterion**, not a note:
|
|
18
|
+
|
|
19
|
+
- The watermark renders at `position:absolute; bottom:15px; right:15px` inside
|
|
20
|
+
**every** mount that draws one — the `bpmn-js` canvas **and** the `dmn-js`
|
|
21
|
+
decision-table view (which injects the logo at `table.before`).
|
|
22
|
+
- The viewer shell reserves the **lower-right** region of the main canvas and of
|
|
23
|
+
the side panel, so no toolbar, switcher, legend, diagnostics region, panel
|
|
24
|
+
chrome or form content overlaps a watermark. Overlays are `pointer-events`
|
|
25
|
+
transparent and positioned top / bottom-left, never bottom-right.
|
|
26
|
+
- At narrow viewports the panel **replaces** the canvas rather than overlaying
|
|
27
|
+
it, so only one watermark-bearing mount is shown at a time — a permitted swap,
|
|
28
|
+
not a prohibited hiding.
|
|
29
|
+
- The vendored `*.production.min.js` bundles are byte-identical to the published
|
|
30
|
+
artifacts (whole-file hash in `assets/VENDORED.md`), so the watermark-rendering
|
|
31
|
+
source is unmodified.
|
|
32
|
+
|
|
33
|
+
Attribution ("Diagrams by bpmn.io", linking to https://bpmn.io) is rendered in
|
|
34
|
+
the shell footer, clear of every watermark region.
|
|
35
|
+
|
|
36
|
+
## Apache 2.0 — OpenForms schema contract
|
|
37
|
+
|
|
38
|
+
The optional form renderer (OpenForms) is Apache 2.0. When a form actually
|
|
39
|
+
renders, the shell shows an OpenForms attribution alongside the bpmn.io footer.
|
|
40
|
+
Until the standalone renderer is vendored (`assets/openforms/`), `kind: form`
|
|
41
|
+
bindings render a placeholder and no OpenForms attribution is shown.
|
|
42
|
+
|
|
43
|
+
## MIT / ISC — the Node pipeline
|
|
44
|
+
|
|
45
|
+
`bpmn-auto-layout`, `bpmn-moddle`, `moddle`, `moddle-xml`, `min-dash` and `saxen`
|
|
46
|
+
are MIT; the `yaml` parser is ISC. These run only at generation/validation time
|
|
47
|
+
and render no watermark. Versions, hashes and licences are in
|
|
48
|
+
`assets/VENDORED.md`.
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# The `package.yaml` manifest
|
|
2
|
+
|
|
3
|
+
A **package** is a process plus the decisions its rule tasks evaluate, the forms
|
|
4
|
+
its user tasks present, and other processes it calls — bound together by a single
|
|
5
|
+
`package.yaml` in the package root. The `.bpmn`, `.dmn` and `.form` files stay
|
|
6
|
+
plain and vendor-neutral; **all** links live in the manifest, so validation is a
|
|
7
|
+
manifest-to-artifact join independent of any BPMN dialect.
|
|
8
|
+
|
|
9
|
+
## Contract
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
name: Order handling
|
|
13
|
+
entry: main.bpmn # top-level .bpmn, relative to the package root
|
|
14
|
+
|
|
15
|
+
bindings:
|
|
16
|
+
- kind: decision # ref is a .dmn; element MUST be a businessRuleTask
|
|
17
|
+
ref: decisions/pricing.dmn
|
|
18
|
+
element: Rule_pricing
|
|
19
|
+
in: main.bpmn # optional; the .bpmn that owns `element`; defaults to entry
|
|
20
|
+
name: Pricing # recorded target name (auto-managed, see reconciliation)
|
|
21
|
+
|
|
22
|
+
- kind: form # ref is a .form (JSON); element MUST be a userTask
|
|
23
|
+
ref: forms/details.form
|
|
24
|
+
element: Task_capture_details
|
|
25
|
+
|
|
26
|
+
- kind: process # ref is a .bpmn; element MUST be a callActivity → drill-down
|
|
27
|
+
ref: subprocesses/refund.bpmn
|
|
28
|
+
element: Call_refund
|
|
29
|
+
|
|
30
|
+
- kind: participant # ref is a .bpmn pool; NO element, NO in; name is the switcher label
|
|
31
|
+
ref: pools/shop.bpmn
|
|
32
|
+
name: Shop
|
|
33
|
+
|
|
34
|
+
roles:
|
|
35
|
+
- element: Task_quote # replaces laneSet; may declare `in`; defaults to entry
|
|
36
|
+
role: Sales
|
|
37
|
+
name: Quote # recorded target name (auto-managed)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Rules
|
|
41
|
+
|
|
42
|
+
- **Every path is relative to the package root.** Absolute paths are rejected.
|
|
43
|
+
Containment is enforced **after** physical resolution: a symlink whose target
|
|
44
|
+
escapes the root is rejected (a lexical check alone is insufficient).
|
|
45
|
+
- **Duplicate keys are an error**, not last-value-wins (parsed with
|
|
46
|
+
`uniqueKeys`).
|
|
47
|
+
- **Four binding kinds**, each with its required element type:
|
|
48
|
+
`decision`→`businessRuleTask`, `form`→`userTask`, `process`→`callActivity`,
|
|
49
|
+
`participant`→file-scoped (no `element`/`in`, requires `name`). An unrecognised
|
|
50
|
+
kind is rejected, listing the four.
|
|
51
|
+
- **`ref` is checked for kind-appropriate content before serving**, not merely
|
|
52
|
+
for existence:
|
|
53
|
+
- a `decision` ref must parse as XML in a DMN namespace; a **multi-decision**
|
|
54
|
+
DRD must carry DRD DI, or it fails **at validation** (there is no
|
|
55
|
+
`dmn-auto-layout`);
|
|
56
|
+
- a `process`/`participant` ref must parse as BPMN;
|
|
57
|
+
- a `form` ref must parse as a JSON object. Only **structural** validity is
|
|
58
|
+
checked while the OpenForms schema contract is unavailable; a diagnostic
|
|
59
|
+
records that.
|
|
60
|
+
- `decisions.xlsx` bound as `kind: decision` fails before the package is served.
|
|
61
|
+
- **Vendor attributes** (`camunda:decisionRef`, `zeebe:formDefinition`, …): in a
|
|
62
|
+
**generated** file that duplicates a binding they are rejected; in an
|
|
63
|
+
**ingested** file they are tolerated with a warning.
|
|
64
|
+
- **Roles:** at most one role per element; multiple elements may share a role.
|
|
65
|
+
- **Dangling** `element` or missing `ref` file → **error**. **Orphan** artifact
|
|
66
|
+
files and **unbound** `userTask`/`businessRuleTask`/`callActivity` → **warning**
|
|
67
|
+
(the package stays renderable).
|
|
68
|
+
- **Nested packages are rejected:** a `package.yaml` beside a referenced `.bpmn`
|
|
69
|
+
is not loaded. A **binding-graph cycle** (recursive `callActivity`) is a
|
|
70
|
+
**warning**, not an error — the package is still served and the viewer bounds
|
|
71
|
+
navigation.
|
|
72
|
+
|
|
73
|
+
## Reconciliation — bindings survive editing
|
|
74
|
+
|
|
75
|
+
Each binding and each role records its target element's **`name`**, refreshed on
|
|
76
|
+
**every** successful validation. Reconciliation joins on names, not identifiers:
|
|
77
|
+
|
|
78
|
+
- **Modeller rename** (id unchanged): the binding keeps resolving; the recorded
|
|
79
|
+
name is reported **stale** and refreshed.
|
|
80
|
+
- **Delete-and-re-add** (new tool id such as `Activity_1a2b3c`, same name): the
|
|
81
|
+
element resolves as *dangling by id* but is **matched by name** and offered as
|
|
82
|
+
an interactive suggestion (normalised Levenshtein over deburred names,
|
|
83
|
+
threshold 0.6; ties reported as ambiguous).
|
|
84
|
+
- Reconciliation **never** re-points, drops or rewrites a binding without
|
|
85
|
+
confirmation, and **never writes in a non-interactive context** — except the
|
|
86
|
+
recorded-name refresh on a *still-resolving* binding, which is mechanical
|
|
87
|
+
bookkeeping and is exempt (without it, rename-then-recreate would compare
|
|
88
|
+
survivors against a stale name and match nothing).
|
|
89
|
+
|
|
90
|
+
## Worked multi-file example
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
order-handling/
|
|
94
|
+
package.yaml
|
|
95
|
+
main.bpmn # entry: userTask Task_capture, businessRuleTask Rule_pricing, callActivity Call_refund
|
|
96
|
+
decisions/pricing.dmn
|
|
97
|
+
forms/details.form
|
|
98
|
+
subprocesses/refund.bpmn
|
|
99
|
+
pools/shop.bpmn # a second participant; the switcher lists "Order handling" (entry) + "Shop"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
`in: pools/shop.bpmn` on a binding addresses an element **inside the shop pool**,
|
|
103
|
+
which the pool decomposition requires — without `in`, only entry-process elements
|
|
104
|
+
are addressable.
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Emits the fixture .bpmn files into fixtures/. Run once; the emitted files are
|
|
3
|
+
// committed as the readable evidence. Re-run only to regenerate them.
|
|
4
|
+
//
|
|
5
|
+
// node scripts/build-fixtures.mjs
|
|
6
|
+
|
|
7
|
+
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
8
|
+
import { fileURLToPath } from 'node:url';
|
|
9
|
+
import { dirname, join } from 'node:path';
|
|
10
|
+
|
|
11
|
+
const SKILL = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
12
|
+
const F = join(SKILL, 'fixtures');
|
|
13
|
+
|
|
14
|
+
const NS = `xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI"`;
|
|
15
|
+
|
|
16
|
+
function defs(inner) {
|
|
17
|
+
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
18
|
+
<bpmn:definitions ${NS} id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">
|
|
19
|
+
${inner}
|
|
20
|
+
</bpmn:definitions>\n`;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Build a semantics-only process from a compact node + flow spec.
|
|
24
|
+
// nodes: [ [type, id, name?] ] flows: [ [id, src, tgt] ]
|
|
25
|
+
function process(id, nodes, flows, { boundary = [], extra = '' } = {}) {
|
|
26
|
+
const incoming = {}, outgoing = {};
|
|
27
|
+
for (const [fid, s, t] of flows) {
|
|
28
|
+
(outgoing[s] ||= []).push(fid);
|
|
29
|
+
(incoming[t] ||= []).push(fid);
|
|
30
|
+
}
|
|
31
|
+
const body = nodes.map(([type, nid, name]) => {
|
|
32
|
+
const io = `${(incoming[nid] || []).map((f) => `<bpmn:incoming>${f}</bpmn:incoming>`).join('')}${(outgoing[nid] || []).map((f) => `<bpmn:outgoing>${f}</bpmn:outgoing>`).join('')}`;
|
|
33
|
+
const nm = name ? ` name="${name}"` : '';
|
|
34
|
+
return ` <bpmn:${type} id="${nid}"${nm}>${io}</bpmn:${type}>`;
|
|
35
|
+
}).join('\n');
|
|
36
|
+
const bnd = boundary.map(([bid, host, name]) =>
|
|
37
|
+
` <bpmn:boundaryEvent id="${bid}"${name ? ` name="${name}"` : ''} attachedToRef="${host}">${(outgoing[bid] || []).map((f) => `<bpmn:outgoing>${f}</bpmn:outgoing>`).join('')}</bpmn:boundaryEvent>`).join('\n');
|
|
38
|
+
const seq = flows.map(([fid, s, t]) => ` <bpmn:sequenceFlow id="${fid}" sourceRef="${s}" targetRef="${t}"/>`).join('\n');
|
|
39
|
+
return ` <bpmn:process id="${id}" isExecutable="false">
|
|
40
|
+
${body}
|
|
41
|
+
${bnd ? bnd + '\n' : ''}${seq}
|
|
42
|
+
${extra} </bpmn:process>`;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const out = {};
|
|
46
|
+
|
|
47
|
+
// ── 8 measured fixtures (semantics-only) ────────────────────────────────
|
|
48
|
+
out['measured/1-linear.bpmn'] = defs(process('Process_linear', [
|
|
49
|
+
['startEvent', 'Start_begin', 'Begin'],
|
|
50
|
+
['userTask', 'Task_capture', 'Capture'],
|
|
51
|
+
['serviceTask', 'Service_store', 'Store'],
|
|
52
|
+
['endEvent', 'End_done', 'Done'],
|
|
53
|
+
], [
|
|
54
|
+
['Flow_1', 'Start_begin', 'Task_capture'],
|
|
55
|
+
['Flow_2', 'Task_capture', 'Service_store'],
|
|
56
|
+
['Flow_3', 'Service_store', 'End_done'],
|
|
57
|
+
]));
|
|
58
|
+
|
|
59
|
+
out['measured/2-gateway.bpmn'] = defs(process('Process_gateway', [
|
|
60
|
+
['startEvent', 'Start_in', 'In'],
|
|
61
|
+
['task', 'Activity_check', 'Check'],
|
|
62
|
+
['exclusiveGateway', 'Gateway_split', 'OK?'],
|
|
63
|
+
['task', 'Activity_accept', 'Accept'],
|
|
64
|
+
['task', 'Activity_reject', 'Reject'],
|
|
65
|
+
['exclusiveGateway', 'Gateway_join'],
|
|
66
|
+
['endEvent', 'End_out', 'Out'],
|
|
67
|
+
], [
|
|
68
|
+
['Flow_1', 'Start_in', 'Activity_check'],
|
|
69
|
+
['Flow_2', 'Activity_check', 'Gateway_split'],
|
|
70
|
+
['Flow_3', 'Gateway_split', 'Activity_accept'],
|
|
71
|
+
['Flow_4', 'Gateway_split', 'Activity_reject'],
|
|
72
|
+
['Flow_5', 'Activity_accept', 'Gateway_join'],
|
|
73
|
+
['Flow_6', 'Activity_reject', 'Gateway_join'],
|
|
74
|
+
['Flow_7', 'Gateway_join', 'End_out'],
|
|
75
|
+
]));
|
|
76
|
+
|
|
77
|
+
out['measured/3-boundary.bpmn'] = defs(process('Process_boundary', [
|
|
78
|
+
['startEvent', 'Start_go', 'Go'],
|
|
79
|
+
['userTask', 'Task_wait', 'Wait'],
|
|
80
|
+
['endEvent', 'End_ok', 'OK'],
|
|
81
|
+
['endEvent', 'End_timeout', 'Timeout'],
|
|
82
|
+
], [
|
|
83
|
+
['Flow_1', 'Start_go', 'Task_wait'],
|
|
84
|
+
['Flow_2', 'Task_wait', 'End_ok'],
|
|
85
|
+
['Flow_3', 'Boundary_timer', 'End_timeout'],
|
|
86
|
+
], { boundary: [['Boundary_timer', 'Task_wait', 'Timer']] }));
|
|
87
|
+
|
|
88
|
+
out['measured/7-loop.bpmn'] = defs(process('Process_loop', [
|
|
89
|
+
['startEvent', 'Start_s', 'Start'],
|
|
90
|
+
['userTask', 'Task_attempt', 'Attempt'],
|
|
91
|
+
['exclusiveGateway', 'Gateway_ok', 'Passed?'],
|
|
92
|
+
['endEvent', 'End_e', 'End'],
|
|
93
|
+
], [
|
|
94
|
+
['Flow_1', 'Start_s', 'Task_attempt'],
|
|
95
|
+
['Flow_2', 'Task_attempt', 'Gateway_ok'],
|
|
96
|
+
['Flow_3', 'Gateway_ok', 'End_e'],
|
|
97
|
+
['Flow_4', 'Gateway_ok', 'Task_attempt'], // loop-back
|
|
98
|
+
]));
|
|
99
|
+
|
|
100
|
+
{
|
|
101
|
+
const nodes = [['startEvent', 'Start_c', 'Start']];
|
|
102
|
+
const flows = [];
|
|
103
|
+
let prev = 'Start_c';
|
|
104
|
+
for (let i = 1; i <= 12; i++) {
|
|
105
|
+
const id = `Task_step_${i}`;
|
|
106
|
+
nodes.push(['task', id, `Step ${i}`]);
|
|
107
|
+
flows.push([`Flow_${i}`, prev, id]);
|
|
108
|
+
prev = id;
|
|
109
|
+
}
|
|
110
|
+
nodes.push(['endEvent', 'End_c', 'End']);
|
|
111
|
+
flows.push(['Flow_end', prev, 'End_c']);
|
|
112
|
+
out['measured/8-long-chain.bpmn'] = defs(process('Process_chain', nodes, flows));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// 4-subprocess — inline sub-process (measured CORRUPT: G1 + G3).
|
|
116
|
+
out['measured/4-subprocess.bpmn'] = defs(` <bpmn:process id="Process_sub" isExecutable="false">
|
|
117
|
+
<bpmn:startEvent id="Start_outer"><bpmn:outgoing>Flow_1</bpmn:outgoing></bpmn:startEvent>
|
|
118
|
+
<bpmn:subProcess id="Activity_sub" name="Sub">
|
|
119
|
+
<bpmn:incoming>Flow_1</bpmn:incoming><bpmn:outgoing>Flow_2</bpmn:outgoing>
|
|
120
|
+
<bpmn:startEvent id="Start_inner"><bpmn:outgoing>Flow_i1</bpmn:outgoing></bpmn:startEvent>
|
|
121
|
+
<bpmn:task id="Activity_charge" name="Charge"><bpmn:incoming>Flow_i1</bpmn:incoming><bpmn:outgoing>Flow_i2</bpmn:outgoing></bpmn:task>
|
|
122
|
+
<bpmn:endEvent id="End_inner"><bpmn:incoming>Flow_i2</bpmn:incoming></bpmn:endEvent>
|
|
123
|
+
<bpmn:sequenceFlow id="Flow_i1" sourceRef="Start_inner" targetRef="Activity_charge"/>
|
|
124
|
+
<bpmn:sequenceFlow id="Flow_i2" sourceRef="Activity_charge" targetRef="End_inner"/>
|
|
125
|
+
</bpmn:subProcess>
|
|
126
|
+
<bpmn:endEvent id="End_outer"><bpmn:incoming>Flow_2</bpmn:incoming></bpmn:endEvent>
|
|
127
|
+
<bpmn:sequenceFlow id="Flow_1" sourceRef="Start_outer" targetRef="Activity_sub"/>
|
|
128
|
+
<bpmn:sequenceFlow id="Flow_2" sourceRef="Activity_sub" targetRef="End_outer"/>
|
|
129
|
+
</bpmn:process>`);
|
|
130
|
+
|
|
131
|
+
// 5-pools — collaboration with two participants (measured DATA LOSS).
|
|
132
|
+
out['measured/5-pools.bpmn'] = defs(` <bpmn:collaboration id="Collaboration_1">
|
|
133
|
+
<bpmn:participant id="Participant_customer" name="Customer" processRef="Process_customer"/>
|
|
134
|
+
<bpmn:participant id="Participant_shop" name="Shop" processRef="Process_shop"/>
|
|
135
|
+
</bpmn:collaboration>
|
|
136
|
+
<bpmn:process id="Process_customer" isExecutable="false">
|
|
137
|
+
<bpmn:startEvent id="Start_order"><bpmn:outgoing>Flow_c1</bpmn:outgoing></bpmn:startEvent>
|
|
138
|
+
<bpmn:userTask id="Task_place" name="Place order"><bpmn:incoming>Flow_c1</bpmn:incoming><bpmn:outgoing>Flow_c2</bpmn:outgoing></bpmn:userTask>
|
|
139
|
+
<bpmn:endEvent id="End_c"><bpmn:incoming>Flow_c2</bpmn:incoming></bpmn:endEvent>
|
|
140
|
+
<bpmn:sequenceFlow id="Flow_c1" sourceRef="Start_order" targetRef="Task_place"/>
|
|
141
|
+
<bpmn:sequenceFlow id="Flow_c2" sourceRef="Task_place" targetRef="End_c"/>
|
|
142
|
+
</bpmn:process>
|
|
143
|
+
<bpmn:process id="Process_shop" isExecutable="false">
|
|
144
|
+
<bpmn:startEvent id="Start_recv"><bpmn:outgoing>Flow_s1</bpmn:outgoing></bpmn:startEvent>
|
|
145
|
+
<bpmn:serviceTask id="Service_fulfil" name="Fulfil"><bpmn:incoming>Flow_s1</bpmn:incoming><bpmn:outgoing>Flow_s2</bpmn:outgoing></bpmn:serviceTask>
|
|
146
|
+
<bpmn:endEvent id="End_s"><bpmn:incoming>Flow_s2</bpmn:incoming></bpmn:endEvent>
|
|
147
|
+
<bpmn:sequenceFlow id="Flow_s1" sourceRef="Start_recv" targetRef="Service_fulfil"/>
|
|
148
|
+
<bpmn:sequenceFlow id="Flow_s2" sourceRef="Service_fulfil" targetRef="End_s"/>
|
|
149
|
+
</bpmn:process>`);
|
|
150
|
+
|
|
151
|
+
// 6-lanes-only — laneSet without pools (measured DEGRADED: lane shapes absent).
|
|
152
|
+
out['measured/6-lanes-only.bpmn'] = defs(` <bpmn:process id="Process_lanes" isExecutable="false">
|
|
153
|
+
<bpmn:laneSet id="LaneSet_1">
|
|
154
|
+
<bpmn:lane id="Lane_sales" name="Sales"><bpmn:flowNodeRef>Task_quote</bpmn:flowNodeRef></bpmn:lane>
|
|
155
|
+
<bpmn:lane id="Lane_finance" name="Finance"><bpmn:flowNodeRef>Task_invoice</bpmn:flowNodeRef></bpmn:lane>
|
|
156
|
+
</bpmn:laneSet>
|
|
157
|
+
<bpmn:startEvent id="Start_l"><bpmn:outgoing>Flow_l1</bpmn:outgoing></bpmn:startEvent>
|
|
158
|
+
<bpmn:userTask id="Task_quote" name="Quote"><bpmn:incoming>Flow_l1</bpmn:incoming><bpmn:outgoing>Flow_l2</bpmn:outgoing></bpmn:userTask>
|
|
159
|
+
<bpmn:userTask id="Task_invoice" name="Invoice"><bpmn:incoming>Flow_l2</bpmn:incoming><bpmn:outgoing>Flow_l3</bpmn:outgoing></bpmn:userTask>
|
|
160
|
+
<bpmn:endEvent id="End_l"><bpmn:incoming>Flow_l3</bpmn:incoming></bpmn:endEvent>
|
|
161
|
+
<bpmn:sequenceFlow id="Flow_l1" sourceRef="Start_l" targetRef="Task_quote"/>
|
|
162
|
+
<bpmn:sequenceFlow id="Flow_l2" sourceRef="Task_quote" targetRef="Task_invoice"/>
|
|
163
|
+
<bpmn:sequenceFlow id="Flow_l3" sourceRef="Task_invoice" targetRef="End_l"/>
|
|
164
|
+
</bpmn:process>`);
|
|
165
|
+
|
|
166
|
+
// ── Provisional-construct fixtures (semantics-only, expected pass) ───────
|
|
167
|
+
const prov = (file, type, prefix) => {
|
|
168
|
+
out[`provisional/${file}.bpmn`] = defs(process(`Process_${file.replace(/-/g, '_')}`, [
|
|
169
|
+
['startEvent', 'Start_p', 'Start'],
|
|
170
|
+
[type, `${prefix}_x`, 'X'],
|
|
171
|
+
['endEvent', 'End_p', 'End'],
|
|
172
|
+
], [
|
|
173
|
+
['Flow_1', 'Start_p', `${prefix}_x`],
|
|
174
|
+
['Flow_2', `${prefix}_x`, 'End_p'],
|
|
175
|
+
]));
|
|
176
|
+
};
|
|
177
|
+
prov('manual-task', 'manualTask', 'Manual');
|
|
178
|
+
prov('script-task', 'scriptTask', 'Script');
|
|
179
|
+
prov('send-task', 'sendTask', 'Send');
|
|
180
|
+
prov('receive-task', 'receiveTask', 'Receive');
|
|
181
|
+
prov('call-activity', 'callActivity', 'Call');
|
|
182
|
+
prov('parallel-gateway', 'parallelGateway', 'Fork');
|
|
183
|
+
prov('rule-task', 'businessRuleTask', 'Rule');
|
|
184
|
+
|
|
185
|
+
// intermediate catch + throw
|
|
186
|
+
out['provisional/intermediate-catch.bpmn'] = defs(process('Process_icatch', [
|
|
187
|
+
['startEvent', 'Start_ic', 'Start'],
|
|
188
|
+
['intermediateCatchEvent', 'CatchEvent_wait', 'Wait'],
|
|
189
|
+
['endEvent', 'End_ic', 'End'],
|
|
190
|
+
], [['Flow_1', 'Start_ic', 'CatchEvent_wait'], ['Flow_2', 'CatchEvent_wait', 'End_ic']]));
|
|
191
|
+
|
|
192
|
+
out['provisional/intermediate-throw.bpmn'] = defs(process('Process_ithrow', [
|
|
193
|
+
['startEvent', 'Start_it', 'Start'],
|
|
194
|
+
['intermediateThrowEvent', 'ThrowEvent_signal', 'Signal'],
|
|
195
|
+
['endEvent', 'End_it', 'End'],
|
|
196
|
+
], [['Flow_1', 'Start_it', 'ThrowEvent_signal'], ['Flow_2', 'ThrowEvent_signal', 'End_it']]));
|
|
197
|
+
|
|
198
|
+
// 2.3a — two boundary events on one activity
|
|
199
|
+
out['provisional/multi-boundary.bpmn'] = defs(process('Process_multibound', [
|
|
200
|
+
['startEvent', 'Start_mb', 'Start'],
|
|
201
|
+
['userTask', 'Task_run', 'Run'],
|
|
202
|
+
['endEvent', 'End_ok', 'OK'],
|
|
203
|
+
['endEvent', 'End_timer', 'Timeout'],
|
|
204
|
+
['endEvent', 'End_error', 'Error'],
|
|
205
|
+
], [
|
|
206
|
+
['Flow_1', 'Start_mb', 'Task_run'],
|
|
207
|
+
['Flow_2', 'Task_run', 'End_ok'],
|
|
208
|
+
['Flow_3', 'Boundary_timer', 'End_timer'],
|
|
209
|
+
['Flow_4', 'Boundary_error', 'End_error'],
|
|
210
|
+
], { boundary: [['Boundary_timer', 'Task_run', 'Timer'], ['Boundary_error', 'Task_run', 'Error']] }));
|
|
211
|
+
|
|
212
|
+
// ── Geometric-violation synthetic fixtures (WITH DI, strict-guarded) ─────
|
|
213
|
+
// Each carries DI violating exactly one invariant.
|
|
214
|
+
function withDI(procInner, planeId, shapes, edges = '') {
|
|
215
|
+
return defs(` <bpmn:process id="${planeId}" isExecutable="false">
|
|
216
|
+
${procInner}
|
|
217
|
+
</bpmn:process>
|
|
218
|
+
<bpmndi:BPMNDiagram id="Dia_1"><bpmndi:BPMNPlane id="Plane_1" bpmnElement="${planeId}">
|
|
219
|
+
${shapes}
|
|
220
|
+
${edges}
|
|
221
|
+
</bpmndi:BPMNPlane></bpmndi:BPMNDiagram>`);
|
|
222
|
+
}
|
|
223
|
+
const shape = (el, x, y, w, h, extra = '') =>
|
|
224
|
+
` <bpmndi:BPMNShape id="${el}_di" bpmnElement="${el}"${extra}><dc:Bounds x="${x}" y="${y}" width="${w}" height="${h}"/></bpmndi:BPMNShape>`;
|
|
225
|
+
const edge = (el, pts) =>
|
|
226
|
+
` <bpmndi:BPMNEdge id="${el}_di" bpmnElement="${el}">${pts.map(([x, y]) => `<di:waypoint x="${x}" y="${y}"/>`).join('')}</bpmndi:BPMNEdge>`;
|
|
227
|
+
|
|
228
|
+
const twoTasks = ` <bpmn:startEvent id="Start_g"><bpmn:outgoing>Flow_g1</bpmn:outgoing></bpmn:startEvent>
|
|
229
|
+
<bpmn:task id="Activity_a" name="A"><bpmn:incoming>Flow_g1</bpmn:incoming><bpmn:outgoing>Flow_g2</bpmn:outgoing></bpmn:task>
|
|
230
|
+
<bpmn:task id="Activity_b" name="B"><bpmn:incoming>Flow_g2</bpmn:incoming></bpmn:task>
|
|
231
|
+
<bpmn:sequenceFlow id="Flow_g1" sourceRef="Start_g" targetRef="Activity_a"/>
|
|
232
|
+
<bpmn:sequenceFlow id="Flow_g2" sourceRef="Activity_a" targetRef="Activity_b"/>`;
|
|
233
|
+
|
|
234
|
+
// G1: identical bounds
|
|
235
|
+
out['geometry/g1-identical-bounds.bpmn'] = withDI(twoTasks, 'Process_g1',
|
|
236
|
+
[shape('Start_g', 100, 100, 36, 36), shape('Activity_a', 200, 80, 100, 80), shape('Activity_b', 200, 80, 100, 80)].join('\n'),
|
|
237
|
+
[edge('Flow_g1', [[136, 118], [200, 120]]), edge('Flow_g2', [[300, 120], [200, 120]])].join('\n'));
|
|
238
|
+
|
|
239
|
+
// G2: zero-size shape
|
|
240
|
+
out['geometry/g2-zero-size.bpmn'] = withDI(twoTasks, 'Process_g2',
|
|
241
|
+
[shape('Start_g', 100, 100, 36, 36), shape('Activity_a', 200, 80, 0, 80), shape('Activity_b', 360, 80, 100, 80)].join('\n'),
|
|
242
|
+
[edge('Flow_g1', [[136, 118], [200, 120]]), edge('Flow_g2', [[300, 120], [360, 120]])].join('\n'));
|
|
243
|
+
|
|
244
|
+
// G3: child outside expanded container
|
|
245
|
+
{
|
|
246
|
+
const subInner = ` <bpmn:startEvent id="Start_g3"><bpmn:outgoing>Flow_x</bpmn:outgoing></bpmn:startEvent>
|
|
247
|
+
<bpmn:subProcess id="Activity_container" name="Container">
|
|
248
|
+
<bpmn:task id="Activity_child" name="Child"/>
|
|
249
|
+
</bpmn:subProcess>
|
|
250
|
+
<bpmn:sequenceFlow id="Flow_x" sourceRef="Start_g3" targetRef="Activity_container"/>`;
|
|
251
|
+
out['geometry/g3-child-outside.bpmn'] = withDI(subInner, 'Process_g3',
|
|
252
|
+
[shape('Start_g3', 100, 300, 36, 36),
|
|
253
|
+
shape('Activity_container', 200, 200, 100, 80, ' isExpanded="true"'),
|
|
254
|
+
shape('Activity_child', 500, 500, 100, 80)].join('\n'),
|
|
255
|
+
edge('Flow_x', [[136, 318], [200, 240]]));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// G4: negative coordinate (strict only)
|
|
259
|
+
out['geometry/g4-negative-coord.bpmn'] = withDI(twoTasks, 'Process_g4',
|
|
260
|
+
[shape('Start_g', -50, 100, 36, 36), shape('Activity_a', 200, 80, 100, 80), shape('Activity_b', 360, 80, 100, 80)].join('\n'),
|
|
261
|
+
[edge('Flow_g1', [[-14, 118], [200, 120]]), edge('Flow_g2', [[300, 120], [360, 120]])].join('\n'));
|
|
262
|
+
|
|
263
|
+
// G5: unrelated flow-node overlap
|
|
264
|
+
out['geometry/g5-overlap.bpmn'] = withDI(twoTasks, 'Process_g5',
|
|
265
|
+
[shape('Start_g', 100, 100, 36, 36), shape('Activity_a', 200, 80, 100, 80), shape('Activity_b', 250, 100, 100, 80)].join('\n'),
|
|
266
|
+
[edge('Flow_g1', [[136, 118], [200, 120]]), edge('Flow_g2', [[300, 120], [250, 140]])].join('\n'));
|
|
267
|
+
|
|
268
|
+
// ── Correct expanded sub-process WITH DI (guard must NOT fire) ───────────
|
|
269
|
+
{
|
|
270
|
+
const subInner = ` <bpmn:startEvent id="Start_ok"><bpmn:outgoing>Flow_o1</bpmn:outgoing></bpmn:startEvent>
|
|
271
|
+
<bpmn:subProcess id="Activity_expanded" name="Expanded">
|
|
272
|
+
<bpmn:incoming>Flow_o1</bpmn:incoming><bpmn:outgoing>Flow_o2</bpmn:outgoing>
|
|
273
|
+
<bpmn:startEvent id="Start_inner_ok"><bpmn:outgoing>Flow_in</bpmn:outgoing></bpmn:startEvent>
|
|
274
|
+
<bpmn:task id="Activity_inner" name="Inner"><bpmn:incoming>Flow_in</bpmn:incoming></bpmn:task>
|
|
275
|
+
<bpmn:sequenceFlow id="Flow_in" sourceRef="Start_inner_ok" targetRef="Activity_inner"/>
|
|
276
|
+
</bpmn:subProcess>
|
|
277
|
+
<bpmn:endEvent id="End_ok"><bpmn:incoming>Flow_o2</bpmn:incoming></bpmn:endEvent>
|
|
278
|
+
<bpmn:sequenceFlow id="Flow_o1" sourceRef="Start_ok" targetRef="Activity_expanded"/>
|
|
279
|
+
<bpmn:sequenceFlow id="Flow_o2" sourceRef="Activity_expanded" targetRef="End_ok"/>`;
|
|
280
|
+
out['nesting/expanded-subprocess-ok.bpmn'] = withDI(subInner, 'Process_ok',
|
|
281
|
+
[shape('Start_ok', 100, 200, 36, 36),
|
|
282
|
+
shape('Activity_expanded', 200, 120, 300, 200, ' isExpanded="true"'),
|
|
283
|
+
shape('Start_inner_ok', 240, 200, 36, 36),
|
|
284
|
+
shape('Activity_inner', 320, 180, 100, 80),
|
|
285
|
+
shape('End_ok', 560, 200, 36, 36)].join('\n'),
|
|
286
|
+
[edge('Flow_o1', [[136, 218], [200, 220]]),
|
|
287
|
+
edge('Flow_o2', [[500, 220], [560, 218]]),
|
|
288
|
+
edge('Flow_in', [[276, 218], [320, 220]])].join('\n'));
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// ── write files ─────────────────────────────────────────────────────────
|
|
292
|
+
let n = 0;
|
|
293
|
+
for (const [rel, xml] of Object.entries(out)) {
|
|
294
|
+
const p = join(F, rel);
|
|
295
|
+
mkdirSync(dirname(p), { recursive: true });
|
|
296
|
+
writeFileSync(p, xml);
|
|
297
|
+
n++;
|
|
298
|
+
}
|
|
299
|
+
console.log(`wrote ${n} fixture files under ${F}`);
|