@bpmn-ld/bpmn-ld 0.0.0-stage → 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 +201 -0
- package/README.md +125 -2
- package/contexts/combined.jsonld +3 -0
- package/contexts/core.jsonld +170 -0
- package/contexts/di.jsonld +37 -0
- package/dist/analyze/analyze.d.ts +3 -0
- package/dist/analyze/analyze.js +11 -0
- package/dist/analyze/findings.d.ts +8 -0
- package/dist/analyze/findings.js +1 -0
- package/dist/analyze/report.d.ts +3 -0
- package/dist/analyze/report.js +9 -0
- package/dist/analyze/rules/ad-hoc-completion-condition.d.ts +2 -0
- package/dist/analyze/rules/ad-hoc-completion-condition.js +7 -0
- package/dist/analyze/rules/cannot-reach-end.d.ts +2 -0
- package/dist/analyze/rules/cannot-reach-end.js +28 -0
- package/dist/analyze/rules/compensation-association.d.ts +2 -0
- package/dist/analyze/rules/compensation-association.js +13 -0
- package/dist/analyze/rules/dead-end.d.ts +2 -0
- package/dist/analyze/rules/dead-end.js +13 -0
- package/dist/analyze/rules/end-event.d.ts +2 -0
- package/dist/analyze/rules/end-event.js +8 -0
- package/dist/analyze/rules/error-catch.d.ts +2 -0
- package/dist/analyze/rules/error-catch.js +14 -0
- package/dist/analyze/rules/escalation-catch.d.ts +2 -0
- package/dist/analyze/rules/escalation-catch.js +14 -0
- package/dist/analyze/rules/gateway-cardinality.d.ts +3 -0
- package/dist/analyze/rules/gateway-cardinality.js +17 -0
- package/dist/analyze/rules/index.d.ts +4 -0
- package/dist/analyze/rules/index.js +21 -0
- package/dist/analyze/rules/instantiating-gateway.d.ts +2 -0
- package/dist/analyze/rules/instantiating-gateway.js +14 -0
- package/dist/analyze/rules/non-interrupting-start.d.ts +2 -0
- package/dist/analyze/rules/non-interrupting-start.js +14 -0
- package/dist/analyze/rules/reachability.d.ts +2 -0
- package/dist/analyze/rules/reachability.js +25 -0
- package/dist/analyze/rules/rule.d.ts +7 -0
- package/dist/analyze/rules/rule.js +1 -0
- package/dist/analyze/rules/signal-catch.d.ts +2 -0
- package/dist/analyze/rules/signal-catch.js +12 -0
- package/dist/analyze/rules/split-join-pairing.d.ts +3 -0
- package/dist/analyze/rules/split-join-pairing.js +50 -0
- package/dist/analyze/rules/start-event.d.ts +2 -0
- package/dist/analyze/rules/start-event.js +8 -0
- package/dist/analyze/rules/task-message-flow.d.ts +2 -0
- package/dist/analyze/rules/task-message-flow.js +19 -0
- package/dist/analyze/scope-graph.d.ts +56 -0
- package/dist/analyze/scope-graph.js +89 -0
- package/dist/analyze-cli.d.ts +1 -0
- package/dist/analyze-cli.js +5 -0
- package/dist/analyze-run.d.ts +12 -0
- package/dist/analyze-run.js +85 -0
- package/dist/bpmn-ld-cli.d.ts +1 -0
- package/dist/bpmn-ld-cli.js +90 -0
- package/dist/build-cli.d.ts +1 -0
- package/dist/build-cli.js +2 -0
- package/dist/build.d.ts +3 -0
- package/dist/build.js +38 -0
- package/dist/check-xml/check.d.ts +3 -0
- package/dist/check-xml/check.js +11 -0
- package/dist/check-xml/lint.d.ts +2 -0
- package/dist/check-xml/lint.js +47 -0
- package/dist/check-xml/moddle.d.ts +6 -0
- package/dist/check-xml/moddle.js +23 -0
- package/dist/check-xml/types.d.ts +20 -0
- package/dist/check-xml/types.js +1 -0
- package/dist/check-xml/xsd.d.ts +2 -0
- package/dist/check-xml/xsd.js +25 -0
- package/dist/check-xml-cli.d.ts +1 -0
- package/dist/check-xml-cli.js +5 -0
- package/dist/check-xml-run.d.ts +10 -0
- package/dist/check-xml-run.js +77 -0
- package/dist/convert/analyze-output.d.ts +3 -0
- package/dist/convert/analyze-output.js +8 -0
- package/dist/convert/convert.d.ts +19 -0
- package/dist/convert/convert.js +96 -0
- package/dist/convert/errors.d.ts +5 -0
- package/dist/convert/errors.js +8 -0
- package/dist/convert/extensions.d.ts +23 -0
- package/dist/convert/extensions.js +103 -0
- package/dist/convert/mapping-check.d.ts +15 -0
- package/dist/convert/mapping-check.js +66 -0
- package/dist/convert/mapping.d.ts +52 -0
- package/dist/convert/mapping.js +273 -0
- package/dist/convert/namespaces.d.ts +2 -0
- package/dist/convert/namespaces.js +19 -0
- package/dist/convert/validate-output.d.ts +2 -0
- package/dist/convert/validate-output.js +28 -0
- package/dist/convert/warnings.d.ts +9 -0
- package/dist/convert/warnings.js +67 -0
- package/dist/convert/xml-reader.d.ts +11 -0
- package/dist/convert/xml-reader.js +84 -0
- package/dist/convert-cli.d.ts +1 -0
- package/dist/convert-cli.js +5 -0
- package/dist/convert-run.d.ts +10 -0
- package/dist/convert-run.js +125 -0
- package/dist/coverage-cli.d.ts +1 -0
- package/dist/coverage-cli.js +8 -0
- package/dist/coverage-mappings.d.ts +3 -0
- package/dist/coverage-mappings.js +34 -0
- package/dist/coverage-scope.d.ts +11 -0
- package/dist/coverage-scope.js +187 -0
- package/dist/coverage-xsd.d.ts +15 -0
- package/dist/coverage-xsd.js +55 -0
- package/dist/coverage.d.ts +35 -0
- package/dist/coverage.js +152 -0
- package/dist/docs-cli.d.ts +1 -0
- package/dist/docs-cli.js +18 -0
- package/dist/docs.d.ts +8 -0
- package/dist/docs.js +136 -0
- package/dist/eval/checks.d.ts +19 -0
- package/dist/eval/checks.js +252 -0
- package/dist/eval/regenerate.d.ts +10 -0
- package/dist/eval/regenerate.js +48 -0
- package/dist/eval-regenerate-cli.d.ts +1 -0
- package/dist/eval-regenerate-cli.js +16 -0
- package/dist/export/data.d.ts +10 -0
- package/dist/export/data.js +127 -0
- package/dist/export/diagram.d.ts +8 -0
- package/dist/export/diagram.js +112 -0
- package/dist/export/element.d.ts +27 -0
- package/dist/export/element.js +175 -0
- package/dist/export/export.d.ts +22 -0
- package/dist/export/export.js +124 -0
- package/dist/export/extensions.d.ts +18 -0
- package/dist/export/extensions.js +122 -0
- package/dist/export/layout-export.d.ts +4 -0
- package/dist/export/layout-export.js +25 -0
- package/dist/export/mapping-check.d.ts +39 -0
- package/dist/export/mapping-check.js +175 -0
- package/dist/export/normalize.d.ts +3 -0
- package/dist/export/normalize.js +67 -0
- package/dist/export-cli.d.ts +1 -0
- package/dist/export-cli.js +5 -0
- package/dist/export-run.d.ts +10 -0
- package/dist/export-run.js +157 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +10 -0
- package/dist/install-skill-run.d.ts +8 -0
- package/dist/install-skill-run.js +30 -0
- package/dist/install-skill.d.ts +23 -0
- package/dist/install-skill.js +76 -0
- package/dist/layout/collaboration.d.ts +36 -0
- package/dist/layout/collaboration.js +152 -0
- package/dist/layout/di.d.ts +15 -0
- package/dist/layout/di.js +52 -0
- package/dist/layout/extract.d.ts +2 -0
- package/dist/layout/extract.js +99 -0
- package/dist/layout/lanes.d.ts +30 -0
- package/dist/layout/lanes.js +112 -0
- package/dist/layout/layering.d.ts +7 -0
- package/dist/layout/layering.js +53 -0
- package/dist/layout/layout.d.ts +12 -0
- package/dist/layout/layout.js +299 -0
- package/dist/layout/model.d.ts +52 -0
- package/dist/layout/model.js +10 -0
- package/dist/layout/placement.d.ts +25 -0
- package/dist/layout/placement.js +256 -0
- package/dist/layout/standalone.d.ts +8 -0
- package/dist/layout/standalone.js +50 -0
- package/dist/layout-cli.d.ts +1 -0
- package/dist/layout-cli.js +5 -0
- package/dist/layout-run.d.ts +9 -0
- package/dist/layout-run.js +105 -0
- package/dist/loader.d.ts +5 -0
- package/dist/loader.js +7 -0
- package/dist/namespace.d.ts +5 -0
- package/dist/namespace.js +5 -0
- package/dist/ontology.d.ts +19 -0
- package/dist/ontology.js +94 -0
- package/dist/paths.d.ts +1 -0
- package/dist/paths.js +2 -0
- package/dist/render/geometry.d.ts +40 -0
- package/dist/render/geometry.js +81 -0
- package/dist/render/renderer.d.ts +31 -0
- package/dist/render/renderer.js +369 -0
- package/dist/render/symbols.d.ts +10 -0
- package/dist/render/symbols.js +26 -0
- package/dist/render/text.d.ts +20 -0
- package/dist/render/text.js +28 -0
- package/dist/render-cli.d.ts +1 -0
- package/dist/render-cli.js +7 -0
- package/dist/render-run.d.ts +9 -0
- package/dist/render-run.js +161 -0
- package/dist/render.d.ts +4 -0
- package/dist/render.js +4 -0
- package/dist/schema-overrides.d.ts +14 -0
- package/dist/schema-overrides.js +36 -0
- package/dist/schema-validate.d.ts +5 -0
- package/dist/schema-validate.js +8 -0
- package/dist/schema.d.ts +6 -0
- package/dist/schema.js +114 -0
- package/dist/shacl.d.ts +15 -0
- package/dist/shacl.js +37 -0
- package/dist/validate-cli.d.ts +1 -0
- package/dist/validate-cli.js +5 -0
- package/dist/validate-run.d.ts +8 -0
- package/dist/validate-run.js +58 -0
- package/dist/validate.d.ts +11 -0
- package/dist/validate.js +94 -0
- package/dist/versioning-cli.d.ts +1 -0
- package/dist/versioning-cli.js +18 -0
- package/dist/versioning.d.ts +17 -0
- package/dist/versioning.js +45 -0
- package/ontology/core.ttl +993 -0
- package/ontology/di.ttl +167 -0
- package/package.json +76 -4
- package/schema/bpmn-ld.schema.json +15230 -0
- package/shapes/core.shapes.ttl +398 -0
- package/skills/bpmn-ld/SKILL.md +154 -0
- package/skills/bpmn-ld/evals/models/order-approval-di.jsonld +296 -0
- package/skills/bpmn-ld/evals/models/refund-di.bpmn +82 -0
- package/skills/bpmn-ld/evals/models/refund.bpmn +18 -0
- package/skills/bpmn-ld/evals/outputs/explain-collaboration.md +22 -0
- package/skills/bpmn-ld/evals/outputs/explain-order-approval.md +24 -0
- package/skills/bpmn-ld/evals/outputs/explain-refund.md +17 -0
- package/skills/bpmn-ld/evals/outputs/generate-activity-compensation.jsonld +39 -0
- package/skills/bpmn-ld/evals/outputs/generate-ad-hoc-sub-process.jsonld +52 -0
- package/skills/bpmn-ld/evals/outputs/generate-boundary-event.jsonld +27 -0
- package/skills/bpmn-ld/evals/outputs/generate-collaboration.jsonld +49 -0
- package/skills/bpmn-ld/evals/outputs/generate-conditions.jsonld +93 -0
- package/skills/bpmn-ld/evals/outputs/generate-diagram-properties.jsonld +340 -0
- package/skills/bpmn-ld/evals/outputs/generate-error.jsonld +217 -0
- package/skills/bpmn-ld/evals/outputs/generate-escalation.jsonld +231 -0
- package/skills/bpmn-ld/evals/outputs/generate-event-definition-ref.jsonld +67 -0
- package/skills/bpmn-ld/evals/outputs/generate-event-sub-process.jsonld +54 -0
- package/skills/bpmn-ld/evals/outputs/generate-exclusive-choice.jsonld +32 -0
- package/skills/bpmn-ld/evals/outputs/generate-instantiating-gateway.jsonld +24 -0
- package/skills/bpmn-ld/evals/outputs/generate-lane-partition.jsonld +46 -0
- package/skills/bpmn-ld/evals/outputs/generate-link-event.expect.json +11 -0
- package/skills/bpmn-ld/evals/outputs/generate-link-event.jsonld +57 -0
- package/skills/bpmn-ld/evals/outputs/generate-loop.jsonld +30 -0
- package/skills/bpmn-ld/evals/outputs/generate-message.jsonld +61 -0
- package/skills/bpmn-ld/evals/outputs/generate-parallel-branches.jsonld +25 -0
- package/skills/bpmn-ld/evals/outputs/generate-process-attributes.jsonld +49 -0
- package/skills/bpmn-ld/evals/outputs/generate-script-task.jsonld +18 -0
- package/skills/bpmn-ld/evals/outputs/generate-signal.jsonld +178 -0
- package/skills/bpmn-ld/evals/outputs/generate-sub-process.jsonld +31 -0
- package/skills/bpmn-ld/evals/outputs/generate-targeted-compensation.jsonld +40 -0
- package/skills/bpmn-ld/evals/outputs/generate-task-implementation.jsonld +18 -0
- package/skills/bpmn-ld/evals/outputs/generate-task-message-references.jsonld +49 -0
- package/skills/bpmn-ld/evals/outputs/generate-transaction.jsonld +48 -0
- package/skills/bpmn-ld/evals/outputs/modify-order-approval.jsonld +376 -0
- package/skills/bpmn-ld/evals/outputs/modify-refund.jsonld +373 -0
- package/skills/bpmn-ld/evals/outputs/order-approval.jsonld +29 -0
- package/skills/bpmn-ld/evals/outputs/refine-order-approval.jsonld +377 -0
- package/skills/bpmn-ld/evals/prompts/explain-collaboration.md +3 -0
- package/skills/bpmn-ld/evals/prompts/explain-order-approval.md +3 -0
- package/skills/bpmn-ld/evals/prompts/explain-refund.md +3 -0
- package/skills/bpmn-ld/evals/prompts/generate-activity-compensation.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-ad-hoc-sub-process.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-boundary-event.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-collaboration.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-conditions.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-diagram-properties.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-error.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-escalation.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-event-definition-ref.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-event-sub-process.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-exclusive-choice.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-instantiating-gateway.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-lane-partition.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-link-event.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-loop.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-message.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-parallel-branches.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-process-attributes.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-script-task.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-signal.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-sub-process.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-targeted-compensation.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-task-implementation.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-task-message-references.md +1 -0
- package/skills/bpmn-ld/evals/prompts/generate-transaction.md +1 -0
- package/skills/bpmn-ld/evals/prompts/modify-order-approval.md +4 -0
- package/skills/bpmn-ld/evals/prompts/modify-refund.md +4 -0
- package/skills/bpmn-ld/evals/prompts/order-approval.md +1 -0
- package/skills/bpmn-ld/evals/prompts/refine-order-approval.md +8 -0
- package/skills/bpmn-ld/examples/positive/activity-compensation.jsonld +39 -0
- package/skills/bpmn-ld/examples/positive/ad-hoc-sub-process.jsonld +52 -0
- package/skills/bpmn-ld/examples/positive/boundary-event.jsonld +27 -0
- package/skills/bpmn-ld/examples/positive/collaboration.jsonld +49 -0
- package/skills/bpmn-ld/examples/positive/conditions.jsonld +93 -0
- package/skills/bpmn-ld/examples/positive/diagram-properties.jsonld +340 -0
- package/skills/bpmn-ld/examples/positive/error.jsonld +208 -0
- package/skills/bpmn-ld/examples/positive/escalation.jsonld +231 -0
- package/skills/bpmn-ld/examples/positive/event-definition-ref.jsonld +142 -0
- package/skills/bpmn-ld/examples/positive/event-sub-process.jsonld +54 -0
- package/skills/bpmn-ld/examples/positive/exclusive-choice.jsonld +32 -0
- package/skills/bpmn-ld/examples/positive/instantiating-gateway.jsonld +24 -0
- package/skills/bpmn-ld/examples/positive/lane-partition.jsonld +46 -0
- package/skills/bpmn-ld/examples/positive/link-event.expect.json +10 -0
- package/skills/bpmn-ld/examples/positive/link-event.jsonld +138 -0
- package/skills/bpmn-ld/examples/positive/loop.jsonld +30 -0
- package/skills/bpmn-ld/examples/positive/message.jsonld +60 -0
- package/skills/bpmn-ld/examples/positive/order-approval.jsonld +29 -0
- package/skills/bpmn-ld/examples/positive/parallel-branches.jsonld +25 -0
- package/skills/bpmn-ld/examples/positive/process-attributes.jsonld +49 -0
- package/skills/bpmn-ld/examples/positive/script-task.jsonld +18 -0
- package/skills/bpmn-ld/examples/positive/signal.jsonld +150 -0
- package/skills/bpmn-ld/examples/positive/sub-process.jsonld +31 -0
- package/skills/bpmn-ld/examples/positive/targeted-compensation.jsonld +40 -0
- package/skills/bpmn-ld/examples/positive/task-implementation.jsonld +18 -0
- package/skills/bpmn-ld/examples/positive/task-message-references.jsonld +151 -0
- package/skills/bpmn-ld/examples/positive/transaction.jsonld +48 -0
- package/skills/bpmn-ld/references/clarification-and-refinement.md +60 -0
- package/skills/bpmn-ld/references/common-mistakes.md +110 -0
- package/skills/bpmn-ld/references/explain-and-document.md +36 -0
- package/skills/bpmn-ld/references/modify-existing-model.md +49 -0
- package/skills/bpmn-ld/references/patterns.md +292 -0
- package/skills/bpmn-ld/references/render-output.md +1 -0
- package/skills/bpmn-ld/references/rule-catalogue.md +183 -0
- package/skills/bpmn-ld/references/vocabulary-summary.md +65 -0
- package/skills/bpmn-ld/template.jsonld +14 -0
- package/templates/combined.jsonld +3 -0
- package/templates/core.jsonld +170 -0
- package/templates/core.shapes.ttl +398 -0
- package/templates/core.ttl +993 -0
- package/templates/di.jsonld +37 -0
- package/templates/di.ttl +167 -0
|
@@ -0,0 +1,398 @@
|
|
|
1
|
+
@prefix bpmn: <https://bpmn-ld.example.org/ns#> .
|
|
2
|
+
@prefix bpmndi: <https://bpmn-ld.example.org/di#> .
|
|
3
|
+
@prefix shapes: <https://bpmn-ld.example.org/ns/shapes#> .
|
|
4
|
+
@prefix sh: <http://www.w3.org/ns/shacl#> .
|
|
5
|
+
|
|
6
|
+
shapes:StartEventShape a sh:NodeShape ;
|
|
7
|
+
sh:targetClass bpmn:StartEvent ;
|
|
8
|
+
sh:property shapes:StartEventNoIncomingSequenceFlow .
|
|
9
|
+
|
|
10
|
+
shapes:StartEventNoIncomingSequenceFlow a sh:PropertyShape ;
|
|
11
|
+
sh:path [ sh:inversePath bpmn:targetRef ] ;
|
|
12
|
+
sh:node [ sh:not [ sh:class bpmn:SequenceFlow ] ] ;
|
|
13
|
+
sh:message "A start event must not have an incoming sequence flow." .
|
|
14
|
+
|
|
15
|
+
shapes:EndEventShape a sh:NodeShape ;
|
|
16
|
+
sh:targetClass bpmn:EndEvent ;
|
|
17
|
+
sh:property shapes:EndEventNoOutgoingSequenceFlow .
|
|
18
|
+
|
|
19
|
+
shapes:EndEventNoOutgoingSequenceFlow a sh:PropertyShape ;
|
|
20
|
+
sh:path [ sh:inversePath bpmn:sourceRef ] ;
|
|
21
|
+
sh:node [ sh:not [ sh:class bpmn:SequenceFlow ] ] ;
|
|
22
|
+
sh:message "An end event must not have an outgoing sequence flow." .
|
|
23
|
+
|
|
24
|
+
shapes:SequenceFlowEndpointsShape a sh:NodeShape ;
|
|
25
|
+
sh:targetClass bpmn:SequenceFlow ;
|
|
26
|
+
sh:property shapes:SequenceFlowExactlyOneSourceRef, shapes:SequenceFlowExactlyOneTargetRef .
|
|
27
|
+
|
|
28
|
+
shapes:SequenceFlowExactlyOneSourceRef a sh:PropertyShape ;
|
|
29
|
+
sh:path bpmn:sourceRef ;
|
|
30
|
+
sh:minCount 1 ;
|
|
31
|
+
sh:maxCount 1 ;
|
|
32
|
+
sh:message "A sequence flow must have exactly one sourceRef." .
|
|
33
|
+
|
|
34
|
+
shapes:SequenceFlowExactlyOneTargetRef a sh:PropertyShape ;
|
|
35
|
+
sh:path bpmn:targetRef ;
|
|
36
|
+
sh:minCount 1 ;
|
|
37
|
+
sh:maxCount 1 ;
|
|
38
|
+
sh:message "A sequence flow must have exactly one targetRef." .
|
|
39
|
+
|
|
40
|
+
shapes:SequenceFlowNodesShape a sh:NodeShape ;
|
|
41
|
+
sh:targetClass bpmn:SequenceFlow ;
|
|
42
|
+
sh:property shapes:SequenceFlowSourceIsFlowNode, shapes:SequenceFlowTargetIsFlowNode .
|
|
43
|
+
|
|
44
|
+
shapes:SequenceFlowSourceIsFlowNode a sh:PropertyShape ;
|
|
45
|
+
sh:path bpmn:sourceRef ;
|
|
46
|
+
sh:class bpmn:FlowNode ;
|
|
47
|
+
sh:message "The source of a sequence flow must be a flow node." .
|
|
48
|
+
|
|
49
|
+
shapes:SequenceFlowTargetIsFlowNode a sh:PropertyShape ;
|
|
50
|
+
sh:path bpmn:targetRef ;
|
|
51
|
+
sh:class bpmn:FlowNode ;
|
|
52
|
+
sh:message "The target of a sequence flow must be a flow node." .
|
|
53
|
+
|
|
54
|
+
shapes:MessageFlowEndpointsShape a sh:NodeShape ;
|
|
55
|
+
sh:targetClass bpmn:MessageFlow ;
|
|
56
|
+
sh:property shapes:MessageFlowExactlyOneSourceRef, shapes:MessageFlowExactlyOneTargetRef .
|
|
57
|
+
|
|
58
|
+
shapes:MessageFlowExactlyOneSourceRef a sh:PropertyShape ;
|
|
59
|
+
sh:path bpmn:sourceRef ;
|
|
60
|
+
sh:minCount 1 ;
|
|
61
|
+
sh:maxCount 1 ;
|
|
62
|
+
sh:message "A message flow must have exactly one sourceRef." .
|
|
63
|
+
|
|
64
|
+
shapes:MessageFlowExactlyOneTargetRef a sh:PropertyShape ;
|
|
65
|
+
sh:path bpmn:targetRef ;
|
|
66
|
+
sh:minCount 1 ;
|
|
67
|
+
sh:maxCount 1 ;
|
|
68
|
+
sh:message "A message flow must have exactly one targetRef." .
|
|
69
|
+
|
|
70
|
+
shapes:MessageRefShape a sh:NodeShape ;
|
|
71
|
+
sh:targetClass bpmn:MessageFlow, bpmn:MessageEventDefinition, bpmn:SendTask, bpmn:ReceiveTask ;
|
|
72
|
+
sh:property shapes:MessageRefIsMessage, shapes:MessageRefAtMostOne .
|
|
73
|
+
|
|
74
|
+
shapes:MessageRefIsMessage a sh:PropertyShape ;
|
|
75
|
+
sh:path bpmn:messageRef ;
|
|
76
|
+
sh:class bpmn:Message ;
|
|
77
|
+
sh:message "A message reference must name a message defined in the document." .
|
|
78
|
+
|
|
79
|
+
shapes:MessageRefAtMostOne a sh:PropertyShape ;
|
|
80
|
+
sh:path bpmn:messageRef ;
|
|
81
|
+
sh:maxCount 1 ;
|
|
82
|
+
sh:message "A message flow, message event definition, send task or receive task must reference at most one message." .
|
|
83
|
+
|
|
84
|
+
shapes:SignalRefShape a sh:NodeShape ;
|
|
85
|
+
sh:targetClass bpmn:SignalEventDefinition ;
|
|
86
|
+
sh:property shapes:SignalRefIsSignal, shapes:SignalRefAtMostOne .
|
|
87
|
+
|
|
88
|
+
shapes:SignalRefIsSignal a sh:PropertyShape ;
|
|
89
|
+
sh:path bpmn:signalRef ;
|
|
90
|
+
sh:class bpmn:Signal ;
|
|
91
|
+
sh:message "A signal reference must name a signal defined in the document." .
|
|
92
|
+
|
|
93
|
+
shapes:SignalRefAtMostOne a sh:PropertyShape ;
|
|
94
|
+
sh:path bpmn:signalRef ;
|
|
95
|
+
sh:maxCount 1 ;
|
|
96
|
+
sh:message "A signal event definition must reference at most one signal." .
|
|
97
|
+
|
|
98
|
+
shapes:ErrorRefShape a sh:NodeShape ;
|
|
99
|
+
sh:targetClass bpmn:ErrorEventDefinition ;
|
|
100
|
+
sh:property shapes:ErrorRefIsError, shapes:ErrorRefAtMostOne .
|
|
101
|
+
|
|
102
|
+
shapes:ErrorRefIsError a sh:PropertyShape ;
|
|
103
|
+
sh:path bpmn:errorRef ;
|
|
104
|
+
sh:class bpmn:Error ;
|
|
105
|
+
sh:message "An error reference must name an error defined in the document." .
|
|
106
|
+
|
|
107
|
+
shapes:ErrorRefAtMostOne a sh:PropertyShape ;
|
|
108
|
+
sh:path bpmn:errorRef ;
|
|
109
|
+
sh:maxCount 1 ;
|
|
110
|
+
sh:message "An error event definition must reference at most one error." .
|
|
111
|
+
|
|
112
|
+
shapes:EscalationRefShape a sh:NodeShape ;
|
|
113
|
+
sh:targetClass bpmn:EscalationEventDefinition ;
|
|
114
|
+
sh:property shapes:EscalationRefIsEscalation, shapes:EscalationRefAtMostOne .
|
|
115
|
+
|
|
116
|
+
shapes:EscalationRefIsEscalation a sh:PropertyShape ;
|
|
117
|
+
sh:path bpmn:escalationRef ;
|
|
118
|
+
sh:class bpmn:Escalation ;
|
|
119
|
+
sh:message "An escalation reference must name an escalation defined in the document." .
|
|
120
|
+
|
|
121
|
+
shapes:EscalationRefAtMostOne a sh:PropertyShape ;
|
|
122
|
+
sh:path bpmn:escalationRef ;
|
|
123
|
+
sh:maxCount 1 ;
|
|
124
|
+
sh:message "An escalation event definition must reference at most one escalation." .
|
|
125
|
+
|
|
126
|
+
shapes:ActivityRefShape a sh:NodeShape ;
|
|
127
|
+
sh:targetClass bpmn:CompensateEventDefinition ;
|
|
128
|
+
sh:property shapes:ActivityRefIsActivity, shapes:ActivityRefAtMostOne .
|
|
129
|
+
|
|
130
|
+
shapes:ActivityRefIsActivity a sh:PropertyShape ;
|
|
131
|
+
sh:path bpmn:activityRef ;
|
|
132
|
+
sh:class bpmn:Activity ;
|
|
133
|
+
sh:message "An activity reference must name an activity defined in the document." .
|
|
134
|
+
|
|
135
|
+
shapes:ActivityRefAtMostOne a sh:PropertyShape ;
|
|
136
|
+
sh:path bpmn:activityRef ;
|
|
137
|
+
sh:maxCount 1 ;
|
|
138
|
+
sh:message "A compensate event definition must reference at most one activity." .
|
|
139
|
+
|
|
140
|
+
shapes:DefaultFlowShape a sh:NodeShape ;
|
|
141
|
+
sh:targetObjectsOf bpmn:default ;
|
|
142
|
+
sh:property shapes:DefaultFlowSourcedFromOwner, shapes:DefaultFlowHasNoCondition .
|
|
143
|
+
|
|
144
|
+
shapes:DefaultFlowSourcedFromOwner a sh:PropertyShape ;
|
|
145
|
+
sh:path [ sh:inversePath bpmn:default ] ;
|
|
146
|
+
sh:equals bpmn:sourceRef ;
|
|
147
|
+
sh:message "A default flow must be an outgoing sequence flow of the node that declares it." .
|
|
148
|
+
|
|
149
|
+
shapes:DefaultFlowHasNoCondition a sh:PropertyShape ;
|
|
150
|
+
sh:path bpmn:conditionExpression ;
|
|
151
|
+
sh:maxCount 0 ;
|
|
152
|
+
sh:message "A default flow must not have a condition expression." .
|
|
153
|
+
|
|
154
|
+
shapes:NoDefaultFlowGatewayShape a sh:NodeShape ;
|
|
155
|
+
sh:targetClass bpmn:ParallelGateway, bpmn:EventBasedGateway ;
|
|
156
|
+
sh:property shapes:NoDefaultFlowOnGateway .
|
|
157
|
+
|
|
158
|
+
shapes:NoDefaultFlowOnGateway a sh:PropertyShape ;
|
|
159
|
+
sh:path bpmn:default ;
|
|
160
|
+
sh:maxCount 0 ;
|
|
161
|
+
sh:message "A parallel or event-based gateway must not have a default flow." .
|
|
162
|
+
|
|
163
|
+
shapes:BoundaryEventShape a sh:NodeShape ;
|
|
164
|
+
sh:targetClass bpmn:BoundaryEvent ;
|
|
165
|
+
sh:property shapes:BoundaryEventExactlyOneAttachedToRef .
|
|
166
|
+
|
|
167
|
+
shapes:BoundaryEventExactlyOneAttachedToRef a sh:PropertyShape ;
|
|
168
|
+
sh:path bpmn:attachedToRef ;
|
|
169
|
+
sh:minCount 1 ;
|
|
170
|
+
sh:maxCount 1 ;
|
|
171
|
+
sh:message "A boundary event must be attached to exactly one activity." .
|
|
172
|
+
|
|
173
|
+
shapes:SequenceFlowEventSubProcessShape a sh:NodeShape ;
|
|
174
|
+
sh:targetClass bpmn:SequenceFlow ;
|
|
175
|
+
sh:property shapes:SequenceFlowSourceNotEventSubProcess, shapes:SequenceFlowTargetNotEventSubProcess .
|
|
176
|
+
|
|
177
|
+
shapes:SequenceFlowSourceNotEventSubProcess a sh:PropertyShape ;
|
|
178
|
+
sh:path bpmn:sourceRef ;
|
|
179
|
+
sh:node shapes:NotEventSubProcess ;
|
|
180
|
+
sh:message "An event sub-process must not have an outgoing sequence flow." .
|
|
181
|
+
|
|
182
|
+
shapes:SequenceFlowTargetNotEventSubProcess a sh:PropertyShape ;
|
|
183
|
+
sh:path bpmn:targetRef ;
|
|
184
|
+
sh:node shapes:NotEventSubProcess ;
|
|
185
|
+
sh:message "An event sub-process must not have an incoming sequence flow." .
|
|
186
|
+
|
|
187
|
+
shapes:NotEventSubProcess a sh:NodeShape ;
|
|
188
|
+
sh:not [ sh:property [ sh:path bpmn:triggeredByEvent ; sh:hasValue true ] ] .
|
|
189
|
+
|
|
190
|
+
shapes:ConditionalEventDefinitionShape a sh:NodeShape ;
|
|
191
|
+
sh:targetClass bpmn:ConditionalEventDefinition ;
|
|
192
|
+
sh:property shapes:ConditionalEventDefinitionAtMostOneCondition .
|
|
193
|
+
|
|
194
|
+
shapes:ConditionalEventDefinitionAtMostOneCondition a sh:PropertyShape ;
|
|
195
|
+
sh:path bpmn:condition ;
|
|
196
|
+
sh:maxCount 1 ;
|
|
197
|
+
sh:message "A conditional event definition must have at most one condition." .
|
|
198
|
+
|
|
199
|
+
shapes:ComplexGatewayShape a sh:NodeShape ;
|
|
200
|
+
sh:targetClass bpmn:ComplexGateway ;
|
|
201
|
+
sh:property shapes:ComplexGatewayAtMostOneActivationCondition .
|
|
202
|
+
|
|
203
|
+
shapes:ComplexGatewayAtMostOneActivationCondition a sh:PropertyShape ;
|
|
204
|
+
sh:path bpmn:activationCondition ;
|
|
205
|
+
sh:maxCount 1 ;
|
|
206
|
+
sh:message "A complex gateway must have at most one activation condition." .
|
|
207
|
+
|
|
208
|
+
shapes:FormalExpressionShape a sh:NodeShape ;
|
|
209
|
+
sh:targetClass bpmn:FormalExpression ;
|
|
210
|
+
sh:property shapes:FormalExpressionAtMostOneEvaluatesToTypeRef .
|
|
211
|
+
|
|
212
|
+
shapes:FormalExpressionAtMostOneEvaluatesToTypeRef a sh:PropertyShape ;
|
|
213
|
+
sh:path bpmn:evaluatesToTypeRef ;
|
|
214
|
+
sh:maxCount 1 ;
|
|
215
|
+
sh:message "A formal expression must have at most one evaluatesToTypeRef." .
|
|
216
|
+
|
|
217
|
+
shapes:ExpressionShape a sh:NodeShape ;
|
|
218
|
+
sh:targetClass bpmn:Expression ;
|
|
219
|
+
sh:property shapes:ExpressionHasBody .
|
|
220
|
+
|
|
221
|
+
shapes:ExpressionHasBody a sh:PropertyShape ;
|
|
222
|
+
sh:path bpmn:body ;
|
|
223
|
+
sh:minCount 1 ;
|
|
224
|
+
sh:message "An expression must have a body." .
|
|
225
|
+
|
|
226
|
+
shapes:DataAssociationTargetShape a sh:NodeShape ;
|
|
227
|
+
sh:targetClass bpmn:DataInputAssociation, bpmn:DataOutputAssociation ;
|
|
228
|
+
sh:property shapes:DataAssociationExactlyOneTargetRef, shapes:DataAssociationTargetIsItemAware, shapes:DataAssociationSourceIsItemAware .
|
|
229
|
+
|
|
230
|
+
shapes:DataAssociationExactlyOneTargetRef a sh:PropertyShape ;
|
|
231
|
+
sh:path bpmn:targetRef ;
|
|
232
|
+
sh:minCount 1 ;
|
|
233
|
+
sh:maxCount 1 ;
|
|
234
|
+
sh:message "A data association must have exactly one targetRef." .
|
|
235
|
+
|
|
236
|
+
shapes:DataAssociationTargetIsItemAware a sh:PropertyShape ;
|
|
237
|
+
sh:path bpmn:targetRef ;
|
|
238
|
+
sh:class bpmn:ItemAwareElement ;
|
|
239
|
+
sh:message "The target of a data association must be an item-aware element." .
|
|
240
|
+
|
|
241
|
+
shapes:DataAssociationSourceIsItemAware a sh:PropertyShape ;
|
|
242
|
+
sh:path bpmn:sourceRef ;
|
|
243
|
+
sh:class bpmn:ItemAwareElement ;
|
|
244
|
+
sh:message "The sources of a data association must be item-aware elements." .
|
|
245
|
+
|
|
246
|
+
shapes:AssignmentShape a sh:NodeShape ;
|
|
247
|
+
sh:targetClass bpmn:Assignment ;
|
|
248
|
+
sh:property shapes:AssignmentExactlyOneFrom, shapes:AssignmentExactlyOneTo .
|
|
249
|
+
|
|
250
|
+
shapes:AssignmentExactlyOneFrom a sh:PropertyShape ;
|
|
251
|
+
sh:path bpmn:from ;
|
|
252
|
+
sh:minCount 1 ;
|
|
253
|
+
sh:maxCount 1 ;
|
|
254
|
+
sh:message "An assignment must have exactly one from expression." .
|
|
255
|
+
|
|
256
|
+
shapes:AssignmentExactlyOneTo a sh:PropertyShape ;
|
|
257
|
+
sh:path bpmn:to ;
|
|
258
|
+
sh:minCount 1 ;
|
|
259
|
+
sh:maxCount 1 ;
|
|
260
|
+
sh:message "An assignment must have exactly one to expression." .
|
|
261
|
+
|
|
262
|
+
shapes:IoSpecificationShape a sh:NodeShape ;
|
|
263
|
+
sh:targetClass bpmn:InputOutputSpecification ;
|
|
264
|
+
sh:property shapes:IoSpecificationHasInputSet, shapes:IoSpecificationHasOutputSet .
|
|
265
|
+
|
|
266
|
+
shapes:IoSpecificationHasInputSet a sh:PropertyShape ;
|
|
267
|
+
sh:path bpmn:inputSets ;
|
|
268
|
+
sh:minCount 1 ;
|
|
269
|
+
sh:message "An input output specification must have at least one input set." .
|
|
270
|
+
|
|
271
|
+
shapes:IoSpecificationHasOutputSet a sh:PropertyShape ;
|
|
272
|
+
sh:path bpmn:outputSets ;
|
|
273
|
+
sh:minCount 1 ;
|
|
274
|
+
sh:message "An input output specification must have at least one output set." .
|
|
275
|
+
|
|
276
|
+
shapes:DataObjectReferenceShape a sh:NodeShape ;
|
|
277
|
+
sh:targetClass bpmn:DataObjectReference ;
|
|
278
|
+
sh:property shapes:DataObjectReferenceAtMostOneDataObjectRef .
|
|
279
|
+
|
|
280
|
+
shapes:DataObjectReferenceAtMostOneDataObjectRef a sh:PropertyShape ;
|
|
281
|
+
sh:path bpmn:dataObjectRef ;
|
|
282
|
+
sh:maxCount 1 ;
|
|
283
|
+
sh:message "A data object reference must refer to at most one data object." .
|
|
284
|
+
|
|
285
|
+
shapes:DataStoreReferenceShape a sh:NodeShape ;
|
|
286
|
+
sh:targetClass bpmn:DataStoreReference ;
|
|
287
|
+
sh:property shapes:DataStoreReferenceAtMostOneDataStoreRef .
|
|
288
|
+
|
|
289
|
+
shapes:DataStoreReferenceAtMostOneDataStoreRef a sh:PropertyShape ;
|
|
290
|
+
sh:path bpmn:dataStoreRef ;
|
|
291
|
+
sh:maxCount 1 ;
|
|
292
|
+
sh:message "A data store reference must refer to at most one data store." .
|
|
293
|
+
|
|
294
|
+
shapes:AssociationEndpointsShape a sh:NodeShape ;
|
|
295
|
+
sh:targetClass bpmn:Association ;
|
|
296
|
+
sh:property shapes:AssociationExactlyOneSourceRef, shapes:AssociationExactlyOneTargetRef .
|
|
297
|
+
|
|
298
|
+
shapes:AssociationExactlyOneSourceRef a sh:PropertyShape ;
|
|
299
|
+
sh:path bpmn:sourceRef ;
|
|
300
|
+
sh:minCount 1 ;
|
|
301
|
+
sh:maxCount 1 ;
|
|
302
|
+
sh:message "An association must have exactly one sourceRef." .
|
|
303
|
+
|
|
304
|
+
shapes:AssociationExactlyOneTargetRef a sh:PropertyShape ;
|
|
305
|
+
sh:path bpmn:targetRef ;
|
|
306
|
+
sh:minCount 1 ;
|
|
307
|
+
sh:maxCount 1 ;
|
|
308
|
+
sh:message "An association must have exactly one targetRef." .
|
|
309
|
+
|
|
310
|
+
shapes:ActivityQuantitiesShape a sh:NodeShape ;
|
|
311
|
+
sh:targetClass bpmn:Activity ;
|
|
312
|
+
sh:property shapes:ActivityStartQuantity, shapes:ActivityCompletionQuantity .
|
|
313
|
+
|
|
314
|
+
shapes:ActivityStartQuantity a sh:PropertyShape ;
|
|
315
|
+
sh:path bpmn:startQuantity ;
|
|
316
|
+
sh:maxCount 1 ;
|
|
317
|
+
sh:minInclusive 0 ;
|
|
318
|
+
sh:message "The start quantity of an activity must be a single non-negative integer." .
|
|
319
|
+
|
|
320
|
+
shapes:ActivityCompletionQuantity a sh:PropertyShape ;
|
|
321
|
+
sh:path bpmn:completionQuantity ;
|
|
322
|
+
sh:maxCount 1 ;
|
|
323
|
+
sh:minInclusive 0 ;
|
|
324
|
+
sh:message "The completion quantity of an activity must be a single non-negative integer." .
|
|
325
|
+
|
|
326
|
+
shapes:LinkEventDefinitionReferenceShape a sh:NodeShape ;
|
|
327
|
+
sh:targetClass bpmn:LinkEventDefinition ;
|
|
328
|
+
sh:property shapes:LinkEventDefinitionSourceIsLinkEventDefinition, shapes:LinkEventDefinitionTargetIsLinkEventDefinition, shapes:LinkEventDefinitionAtMostOneTarget .
|
|
329
|
+
|
|
330
|
+
shapes:LinkEventDefinitionSourceIsLinkEventDefinition a sh:PropertyShape ;
|
|
331
|
+
sh:path bpmn:source ;
|
|
332
|
+
sh:class bpmn:LinkEventDefinition ;
|
|
333
|
+
sh:message "A link source must be a link event definition defined in the document." .
|
|
334
|
+
|
|
335
|
+
shapes:LinkEventDefinitionTargetIsLinkEventDefinition a sh:PropertyShape ;
|
|
336
|
+
sh:path bpmn:target ;
|
|
337
|
+
sh:class bpmn:LinkEventDefinition ;
|
|
338
|
+
sh:message "A link target must be a link event definition defined in the document." .
|
|
339
|
+
|
|
340
|
+
shapes:LinkEventDefinitionAtMostOneTarget a sh:PropertyShape ;
|
|
341
|
+
sh:path bpmn:target ;
|
|
342
|
+
sh:maxCount 1 ;
|
|
343
|
+
sh:message "A link event definition must have at most one target." .
|
|
344
|
+
|
|
345
|
+
shapes:LaneSingleValuesShape a sh:NodeShape ;
|
|
346
|
+
sh:targetClass bpmn:Lane ;
|
|
347
|
+
sh:property shapes:LaneAtMostOnePartitionElement, shapes:LaneAtMostOnePartitionElementRef .
|
|
348
|
+
|
|
349
|
+
shapes:LaneAtMostOnePartitionElement a sh:PropertyShape ;
|
|
350
|
+
sh:path bpmn:partitionElement ;
|
|
351
|
+
sh:maxCount 1 ;
|
|
352
|
+
sh:message "A lane must have at most one partitionElement." .
|
|
353
|
+
|
|
354
|
+
shapes:LaneAtMostOnePartitionElementRef a sh:PropertyShape ;
|
|
355
|
+
sh:path bpmn:partitionElementRef ;
|
|
356
|
+
sh:maxCount 1 ;
|
|
357
|
+
sh:message "A lane must have at most one partitionElementRef." .
|
|
358
|
+
|
|
359
|
+
shapes:SequenceFlowAtMostOneIsImmediateShape a sh:NodeShape ;
|
|
360
|
+
sh:targetClass bpmn:SequenceFlow ;
|
|
361
|
+
sh:property shapes:SequenceFlowAtMostOneIsImmediate .
|
|
362
|
+
|
|
363
|
+
shapes:SequenceFlowAtMostOneIsImmediate a sh:PropertyShape ;
|
|
364
|
+
sh:path bpmn:isImmediate ;
|
|
365
|
+
sh:maxCount 1 ;
|
|
366
|
+
sh:message "A sequence flow must have at most one isImmediate value." .
|
|
367
|
+
|
|
368
|
+
shapes:DiagramSingleValuesShape a sh:NodeShape ;
|
|
369
|
+
sh:targetClass bpmndi:BPMNDiagram ;
|
|
370
|
+
sh:property shapes:DiagramAtMostOneName, shapes:DiagramAtMostOneResolution .
|
|
371
|
+
|
|
372
|
+
shapes:DiagramAtMostOneName a sh:PropertyShape ;
|
|
373
|
+
sh:path bpmn:name ;
|
|
374
|
+
sh:maxCount 1 ;
|
|
375
|
+
sh:message "A diagram must have at most one name." .
|
|
376
|
+
|
|
377
|
+
shapes:DiagramAtMostOneResolution a sh:PropertyShape ;
|
|
378
|
+
sh:path bpmndi:resolution ;
|
|
379
|
+
sh:maxCount 1 ;
|
|
380
|
+
sh:message "A diagram must have at most one resolution." .
|
|
381
|
+
|
|
382
|
+
shapes:EdgeAtMostOneMessageVisibleKindShape a sh:NodeShape ;
|
|
383
|
+
sh:targetClass bpmndi:BPMNEdge ;
|
|
384
|
+
sh:property shapes:EdgeAtMostOneMessageVisibleKind .
|
|
385
|
+
|
|
386
|
+
shapes:EdgeAtMostOneMessageVisibleKind a sh:PropertyShape ;
|
|
387
|
+
sh:path bpmndi:messageVisibleKind ;
|
|
388
|
+
sh:maxCount 1 ;
|
|
389
|
+
sh:message "An edge must have at most one messageVisibleKind." .
|
|
390
|
+
|
|
391
|
+
shapes:EventDefinitionRefShape a sh:NodeShape ;
|
|
392
|
+
sh:targetClass bpmn:CatchEvent, bpmn:ThrowEvent ;
|
|
393
|
+
sh:property shapes:EventDefinitionRefIsEventDefinition .
|
|
394
|
+
|
|
395
|
+
shapes:EventDefinitionRefIsEventDefinition a sh:PropertyShape ;
|
|
396
|
+
sh:path bpmn:eventDefinitionRef ;
|
|
397
|
+
sh:class bpmn:EventDefinition ;
|
|
398
|
+
sh:message "An event definition reference must name an event definition defined in the document." .
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bpmn-ld
|
|
3
|
+
description: Write a BPMN 2.0 process model directly as BPMN-LD JSON-LD, then check it with the repository's validation and analyzer commands and fix it for at most three rounds. Use when asked to model, draw or generate a business process as BPMN-LD.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# BPMN-LD authoring
|
|
7
|
+
|
|
8
|
+
Write the model as a BPMN-LD JSON-LD document, check it with the commands below, fix it, and report what remains. Run every command from the repository root. Use only the commands in this file.
|
|
9
|
+
|
|
10
|
+
## Files
|
|
11
|
+
|
|
12
|
+
- `template.jsonld`: minimal valid document to start from.
|
|
13
|
+
- `examples/positive/order-approval.jsonld`: worked example with a user task, an exclusive gateway with a default flow and a condition, a service task and two end events.
|
|
14
|
+
- `references/patterns.md`: guidance for parallel branches, exclusive choices, loops, sub-processes, boundary events and multiple participants, each with a worked example in `examples/positive/` and the analyzer rules that catch common mistakes.
|
|
15
|
+
- `references/rule-catalogue.md`: every analyzer rule identifier with its severity, a plain explanation, typical causes and the typical fix. Use it to explain findings.
|
|
16
|
+
- `references/common-mistakes.md`: common modelling mistakes, each with why it matters, the fix in BPMN-LD and the analyzer rule that catches it. Use it to avoid or repair mistakes.
|
|
17
|
+
- `references/clarification-and-refinement.md`: when to ask the user and when to state an assumption, how to report assumptions, how to apply feedback to an existing model in place, and what to report when errors remain after the cap.
|
|
18
|
+
- `references/explain-and-document.md`: how to explain an existing model in plain language, produce Markdown or prose documentation from it, and convert BPMN XML first.
|
|
19
|
+
- `references/modify-existing-model.md`: how to modify an existing model from BPMN-LD or BPMN XML while preserving identifiers, extensions and existing diagram data, laying out only what is missing.
|
|
20
|
+
- `references/vocabulary-summary.md`: the terms you need most. The full list is `docs/reference/vocabulary.md`; conventions are in `docs/conventions/` (start with `naming-and-identifiers.md` and `nested-and-flat.md`).
|
|
21
|
+
|
|
22
|
+
## Workflow: generate, check, fix
|
|
23
|
+
|
|
24
|
+
1. Generate. Copy `template.jsonld` to `<work>/positive/<name>.jsonld`, where `<work>` is a scratch directory and the `positive` subfolder name is required by the validate command. Replace `/ABSOLUTE/PATH/TO/REPO` (or the output of `bpmn-ld root` in an installed package) in the first `@context` entry with the absolute path of the package or repository root, and change the `@base` IRI. Then write the process: nest every flow node and sequence flow in `flowElements`, give each element a unique `id`, and connect flows by `sourceRef` and `targetRef`.
|
|
25
|
+
2. Self-review. Compare the draft against `references/common-mistakes.md` and fix what you find. The analyzer cannot detect the review-only mistakes, so a clean analyzer run is not enough.
|
|
26
|
+
3. Check. Run both commands:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
npm run validate -- <work>
|
|
30
|
+
npm run analyze -- <work>/positive/<name>.jsonld --format json
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
4. Fix. Read the output, correct the document, and check again. This is one fix round.
|
|
34
|
+
5. Stop when done, or after the cap (see below), and report.
|
|
35
|
+
|
|
36
|
+
## Workflow: lay out, export, check externally
|
|
37
|
+
|
|
38
|
+
After the model has zero errors, add the missing diagram, export BPMN 2.0 XML and run the external checks. One command lays out and exports; it never changes the JSON-LD file:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
npm run export -- --layout <work>/positive/<name>.jsonld -o <work>/<name>.bpmn --json
|
|
42
|
+
npm run check-xml -- <work>/<name>.bpmn --json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
`npm run layout -- <file> -o <out.jsonld>` only writes the laid-out JSON-LD; use it only when the user wants the model with a diagram. Existing diagram content is kept; add `--force` to `export --layout` to replace it by a fresh layout.
|
|
46
|
+
|
|
47
|
+
Reading export output: with `--json` and `-o`, standard output is one object `{ "warnings": [], "errors": [] }`. Exit 0 means the XML was written. Exit 2 means unusable input (see `errors`); go back to the fix step. `warnings` list constructs the XML cannot express; report them and do not block on them.
|
|
48
|
+
|
|
49
|
+
Reading check-xml output: it checks the XML with three independent tools and prints one object:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{ "ok": true, "checks": { "xsd": { "status": "pass", "issues": [] }, "moddle": { "status": "pass", "issues": [] }, "lint": { "status": "pass", "issues": [] } } }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- `xsd` is validation against the BPMN 2.0 XSD, `moddle` is import with bpmn-moddle, `lint` is bpmnlint.
|
|
56
|
+
- `status` is `pass`, `fail` or `skipped` (lint is skipped when moddle cannot import). Each issue has `severity` (`error` or `warning`), `message`, optional `rule` and `location`.
|
|
57
|
+
- Exit 0 means no check reported an error. Exit 1 means at least one did (`ok` is false). Exit 2 means the file could not be read.
|
|
58
|
+
- bpmnlint warnings do not block: exit stays 0. Report each with its `rule` and `message`, and fix only when obviously correct.
|
|
59
|
+
|
|
60
|
+
When an external check reports an error:
|
|
61
|
+
|
|
62
|
+
1. Read the failing check and issue. A `lint` error such as `start-event-required` or `no-implicit-start` usually means a modelling gap; fix the JSON-LD model.
|
|
63
|
+
2. An `xsd` or `moddle` error on a model that passed validate and analyze is an exporter problem, not a modelling one; report it with the issue text and the model path, and do not edit the XML by hand.
|
|
64
|
+
3. After fixing the model, run validate, analyze, export and check-xml again. This counts as a fix round and the cap below applies.
|
|
65
|
+
4. Never report the XML as valid while any external check has an error.
|
|
66
|
+
|
|
67
|
+
Optional render step (only when the user asks for an image, SVG or picture): after `check-xml` exits 0, run `npm run render -- <work>/<name>.bpmn -o <work>/<name>.svg --json`. A render failure does not change the done criterion: the model is still valid. Report the SVG path. The final report lists the SVG path.
|
|
68
|
+
|
|
69
|
+
## Reading validate output
|
|
70
|
+
|
|
71
|
+
`npm run validate -- <work>` checks every file in `<work>/positive/` with structural validation, the JSON Schema and SHACL. It prints one line per file and exits 0 only if all files pass:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
ok positive/<name>.jsonld
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
FAIL positive/<name>.jsonld
|
|
79
|
+
<error message>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Each indented line under a `FAIL` is an error to fix. Messages are:
|
|
83
|
+
|
|
84
|
+
- `Safe mode validation error.`: the document uses a term or value the context does not define, for example a misspelled property or type. Compare names with the vocabulary summary.
|
|
85
|
+
- `schema: ...`: the JSON Schema rejected the document shape. The message names the failing location.
|
|
86
|
+
- `<node IRI> violates <shape IRI>`: a SHACL shape failed for that node. The shape name says which rule.
|
|
87
|
+
- other structural messages: a reference that does not resolve, or a value of the wrong type.
|
|
88
|
+
|
|
89
|
+
Every validate failure is an error. There are no warnings.
|
|
90
|
+
|
|
91
|
+
## Reading analyzer output
|
|
92
|
+
|
|
93
|
+
`npm run analyze -- <file> --format json` prints one JSON object and exits 0 when there are zero errors, 1 when there is at least one error, and 2 for unusable input (missing file, invalid JSON, bad arguments; the message is on stderr).
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{
|
|
97
|
+
"findings": [
|
|
98
|
+
{ "rule": "node-dead-end", "severity": "warning", "node": "https://example.org/models/x/Task_2", "message": "flow node has no outgoing sequence flow and is not an end event" }
|
|
99
|
+
],
|
|
100
|
+
"summary": { "errors": 0, "warnings": 1 }
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
- `findings[].rule` is the rule identifier, `severity` is `error` or `warning`, `node` is the full IRI of the offending element (`@base` plus its `id`, or `null`) and `message` explains it.
|
|
105
|
+
- `summary.errors` and `summary.warnings` are the counts. `summary.errors` decides whether the model is done.
|
|
106
|
+
- A `structural-validity` error means the document is structurally broken; fix it with the validate output first, because the graph rules are skipped until then.
|
|
107
|
+
- Explanations, causes and fixes for each rule are in `references/rule-catalogue.md`; examples are in `docs/conventions/process-analysis.md`.
|
|
108
|
+
|
|
109
|
+
## Done criterion and cap
|
|
110
|
+
|
|
111
|
+
- Done means zero errors: `npm run validate` prints `ok` for the file and `summary.errors` is 0.
|
|
112
|
+
- Warnings do not block. Report each warning with its rule, the element and a plain explanation of why it was left, or fix it if the fix is obviously correct and does not change the intended process.
|
|
113
|
+
- With zero errors, lay out and export, then run the external checks. The work is only fully done when `check-xml` exits 0.
|
|
114
|
+
- Fix at most three rounds. After the third fix round, run all commands one last time and stop, even if errors remain.
|
|
115
|
+
- Final report: the path of the model, the result of validate, analyze and check-xml, the path of the exported `.bpmn` file, the optional SVG path when rendered, the number of fix rounds used, every warning with its explanation, and any remaining errors with their rule or message and what you think causes them. Do not claim the model is valid while errors remain.
|
|
116
|
+
|
|
117
|
+
## Clarification and refinement
|
|
118
|
+
|
|
119
|
+
Details and examples are in `references/clarification-and-refinement.md`.
|
|
120
|
+
|
|
121
|
+
- Ask the user only when the answer changes the shape of the process and cannot be inferred; otherwise state an assumption and continue.
|
|
122
|
+
- Report every assumption in the final report, naming elements by `id`.
|
|
123
|
+
- Apply user feedback by editing the existing model in place and keeping its `id` values; do not regenerate it. Re-run both commands afterwards.
|
|
124
|
+
- Never present a model with errors as finished. After the third fix round, report what remains.
|
|
125
|
+
|
|
126
|
+
## Explain and document an existing model
|
|
127
|
+
|
|
128
|
+
Details are in `references/explain-and-document.md`.
|
|
129
|
+
|
|
130
|
+
- Given BPMN XML, convert it first: `npm run convert -- <work>/<name>.bpmn -o <work>/positive/<name>.jsonld`, then explain the converted file.
|
|
131
|
+
- Explain in plain language, walking the steps in order and covering every gateway and end event.
|
|
132
|
+
- Mention every named element by its exact name.
|
|
133
|
+
- For documentation, write Markdown with a summary, steps, decisions, outcomes and notes. Do not change the model.
|
|
134
|
+
- If the model shows the mistakes in `references/common-mistakes.md`, mention them to the user; do not silently restructure it.
|
|
135
|
+
|
|
136
|
+
## Modify an existing model
|
|
137
|
+
|
|
138
|
+
Details are in `references/modify-existing-model.md`.
|
|
139
|
+
|
|
140
|
+
- Given BPMN XML, convert it first: `npm run convert -- <work>/<name>.bpmn -o <work>/positive/<name>.jsonld`, then edit the converted file in place.
|
|
141
|
+
- Make only the requested change. Preserve identifiers, extensions and existing diagram data (shape bounds and edge waypoints); do not regenerate the model.
|
|
142
|
+
- Lay out only what is missing with `npm run export -- --layout` or `npm run layout`; never use `--force` unless the user asks for the layout to be redone.
|
|
143
|
+
- Re-run validate, analyze, export and check-xml as in the generate workflow, and report which elements changed.
|
|
144
|
+
- If the model shows the mistakes in `references/common-mistakes.md`, mention them to the user and change only what was asked; do not silently restructure it.
|
|
145
|
+
|
|
146
|
+
## Presenting remaining warnings
|
|
147
|
+
|
|
148
|
+
For each warning left after the last round, look up its rule in `references/rule-catalogue.md` and tell the user:
|
|
149
|
+
|
|
150
|
+
- what it means, in plain language, naming the element by its `id`;
|
|
151
|
+
- why it may be acceptable here, for example a deliberately terminal branch, implicit completion or an endless process, or say that it is not acceptable when nothing justifies it;
|
|
152
|
+
- the suggested fix, so the user can ask for it to be applied.
|
|
153
|
+
|
|
154
|
+
Group warnings by rule when several elements share one. Never present a warning as an error or hide it, and explain remaining errors the same way, with the cause and the fix.
|