@bpmn-ld/bpmn-ld 0.0.0-stage → 0.2.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.
Files changed (339) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +125 -2
  3. package/contexts/combined.jsonld +3 -0
  4. package/contexts/core.jsonld +170 -0
  5. package/contexts/di.jsonld +37 -0
  6. package/dist/analyze/analyze.d.ts +3 -0
  7. package/dist/analyze/analyze.js +11 -0
  8. package/dist/analyze/findings.d.ts +8 -0
  9. package/dist/analyze/findings.js +1 -0
  10. package/dist/analyze/report.d.ts +3 -0
  11. package/dist/analyze/report.js +9 -0
  12. package/dist/analyze/rules/ad-hoc-completion-condition.d.ts +2 -0
  13. package/dist/analyze/rules/ad-hoc-completion-condition.js +7 -0
  14. package/dist/analyze/rules/cannot-reach-end.d.ts +2 -0
  15. package/dist/analyze/rules/cannot-reach-end.js +28 -0
  16. package/dist/analyze/rules/compensation-association.d.ts +2 -0
  17. package/dist/analyze/rules/compensation-association.js +13 -0
  18. package/dist/analyze/rules/dead-end.d.ts +2 -0
  19. package/dist/analyze/rules/dead-end.js +13 -0
  20. package/dist/analyze/rules/end-event.d.ts +2 -0
  21. package/dist/analyze/rules/end-event.js +8 -0
  22. package/dist/analyze/rules/error-catch.d.ts +2 -0
  23. package/dist/analyze/rules/error-catch.js +14 -0
  24. package/dist/analyze/rules/escalation-catch.d.ts +2 -0
  25. package/dist/analyze/rules/escalation-catch.js +14 -0
  26. package/dist/analyze/rules/gateway-cardinality.d.ts +3 -0
  27. package/dist/analyze/rules/gateway-cardinality.js +17 -0
  28. package/dist/analyze/rules/index.d.ts +4 -0
  29. package/dist/analyze/rules/index.js +21 -0
  30. package/dist/analyze/rules/instantiating-gateway.d.ts +2 -0
  31. package/dist/analyze/rules/instantiating-gateway.js +14 -0
  32. package/dist/analyze/rules/non-interrupting-start.d.ts +2 -0
  33. package/dist/analyze/rules/non-interrupting-start.js +14 -0
  34. package/dist/analyze/rules/reachability.d.ts +2 -0
  35. package/dist/analyze/rules/reachability.js +25 -0
  36. package/dist/analyze/rules/rule.d.ts +7 -0
  37. package/dist/analyze/rules/rule.js +1 -0
  38. package/dist/analyze/rules/signal-catch.d.ts +2 -0
  39. package/dist/analyze/rules/signal-catch.js +12 -0
  40. package/dist/analyze/rules/split-join-pairing.d.ts +3 -0
  41. package/dist/analyze/rules/split-join-pairing.js +50 -0
  42. package/dist/analyze/rules/start-event.d.ts +2 -0
  43. package/dist/analyze/rules/start-event.js +8 -0
  44. package/dist/analyze/rules/task-message-flow.d.ts +2 -0
  45. package/dist/analyze/rules/task-message-flow.js +19 -0
  46. package/dist/analyze/scope-graph.d.ts +56 -0
  47. package/dist/analyze/scope-graph.js +89 -0
  48. package/dist/analyze-cli.d.ts +1 -0
  49. package/dist/analyze-cli.js +5 -0
  50. package/dist/analyze-run.d.ts +12 -0
  51. package/dist/analyze-run.js +85 -0
  52. package/dist/bpmn-ld-cli.d.ts +2 -0
  53. package/dist/bpmn-ld-cli.js +97 -0
  54. package/dist/build-cli.d.ts +1 -0
  55. package/dist/build-cli.js +2 -0
  56. package/dist/build.d.ts +3 -0
  57. package/dist/build.js +38 -0
  58. package/dist/cheat-sheet-catalog.d.ts +10 -0
  59. package/dist/cheat-sheet-catalog.js +72 -0
  60. package/dist/cheat-sheet-cli.d.ts +1 -0
  61. package/dist/cheat-sheet-cli.js +7 -0
  62. package/dist/cheat-sheet-compose.d.ts +13 -0
  63. package/dist/cheat-sheet-compose.js +107 -0
  64. package/dist/cheat-sheet-run.d.ts +11 -0
  65. package/dist/cheat-sheet-run.js +65 -0
  66. package/dist/cheat-sheet-svg.d.ts +2 -0
  67. package/dist/cheat-sheet-svg.js +2 -0
  68. package/dist/cheat-sheet.d.ts +2 -0
  69. package/dist/cheat-sheet.js +2 -0
  70. package/dist/check-xml/check.d.ts +3 -0
  71. package/dist/check-xml/check.js +11 -0
  72. package/dist/check-xml/lint.d.ts +2 -0
  73. package/dist/check-xml/lint.js +47 -0
  74. package/dist/check-xml/moddle.d.ts +6 -0
  75. package/dist/check-xml/moddle.js +23 -0
  76. package/dist/check-xml/types.d.ts +20 -0
  77. package/dist/check-xml/types.js +1 -0
  78. package/dist/check-xml/xsd.d.ts +2 -0
  79. package/dist/check-xml/xsd.js +25 -0
  80. package/dist/check-xml-cli.d.ts +1 -0
  81. package/dist/check-xml-cli.js +5 -0
  82. package/dist/check-xml-run.d.ts +10 -0
  83. package/dist/check-xml-run.js +77 -0
  84. package/dist/convert/analyze-output.d.ts +3 -0
  85. package/dist/convert/analyze-output.js +8 -0
  86. package/dist/convert/convert.d.ts +19 -0
  87. package/dist/convert/convert.js +96 -0
  88. package/dist/convert/errors.d.ts +5 -0
  89. package/dist/convert/errors.js +8 -0
  90. package/dist/convert/extensions.d.ts +23 -0
  91. package/dist/convert/extensions.js +103 -0
  92. package/dist/convert/mapping-check.d.ts +15 -0
  93. package/dist/convert/mapping-check.js +66 -0
  94. package/dist/convert/mapping.d.ts +52 -0
  95. package/dist/convert/mapping.js +273 -0
  96. package/dist/convert/namespaces.d.ts +2 -0
  97. package/dist/convert/namespaces.js +19 -0
  98. package/dist/convert/validate-output.d.ts +2 -0
  99. package/dist/convert/validate-output.js +28 -0
  100. package/dist/convert/warnings.d.ts +9 -0
  101. package/dist/convert/warnings.js +67 -0
  102. package/dist/convert/xml-reader.d.ts +11 -0
  103. package/dist/convert/xml-reader.js +84 -0
  104. package/dist/convert-cli.d.ts +1 -0
  105. package/dist/convert-cli.js +5 -0
  106. package/dist/convert-run.d.ts +10 -0
  107. package/dist/convert-run.js +125 -0
  108. package/dist/coverage-cli.d.ts +1 -0
  109. package/dist/coverage-cli.js +8 -0
  110. package/dist/coverage-mappings.d.ts +3 -0
  111. package/dist/coverage-mappings.js +34 -0
  112. package/dist/coverage-scope.d.ts +11 -0
  113. package/dist/coverage-scope.js +187 -0
  114. package/dist/coverage-xsd.d.ts +15 -0
  115. package/dist/coverage-xsd.js +55 -0
  116. package/dist/coverage.d.ts +35 -0
  117. package/dist/coverage.js +152 -0
  118. package/dist/docs-cli.d.ts +1 -0
  119. package/dist/docs-cli.js +18 -0
  120. package/dist/docs.d.ts +8 -0
  121. package/dist/docs.js +136 -0
  122. package/dist/eval/checks.d.ts +19 -0
  123. package/dist/eval/checks.js +252 -0
  124. package/dist/eval/regenerate.d.ts +10 -0
  125. package/dist/eval/regenerate.js +48 -0
  126. package/dist/eval-regenerate-cli.d.ts +1 -0
  127. package/dist/eval-regenerate-cli.js +16 -0
  128. package/dist/export/data.d.ts +10 -0
  129. package/dist/export/data.js +127 -0
  130. package/dist/export/diagram.d.ts +8 -0
  131. package/dist/export/diagram.js +112 -0
  132. package/dist/export/element.d.ts +27 -0
  133. package/dist/export/element.js +175 -0
  134. package/dist/export/export.d.ts +22 -0
  135. package/dist/export/export.js +124 -0
  136. package/dist/export/extensions.d.ts +18 -0
  137. package/dist/export/extensions.js +122 -0
  138. package/dist/export/layout-export.d.ts +4 -0
  139. package/dist/export/layout-export.js +25 -0
  140. package/dist/export/mapping-check.d.ts +39 -0
  141. package/dist/export/mapping-check.js +175 -0
  142. package/dist/export/normalize.d.ts +3 -0
  143. package/dist/export/normalize.js +67 -0
  144. package/dist/export-cli.d.ts +1 -0
  145. package/dist/export-cli.js +5 -0
  146. package/dist/export-run.d.ts +10 -0
  147. package/dist/export-run.js +157 -0
  148. package/dist/index.d.ts +10 -0
  149. package/dist/index.js +10 -0
  150. package/dist/install-skill-run.d.ts +8 -0
  151. package/dist/install-skill-run.js +30 -0
  152. package/dist/install-skill.d.ts +23 -0
  153. package/dist/install-skill.js +76 -0
  154. package/dist/layout/collaboration.d.ts +36 -0
  155. package/dist/layout/collaboration.js +152 -0
  156. package/dist/layout/di.d.ts +15 -0
  157. package/dist/layout/di.js +52 -0
  158. package/dist/layout/extract.d.ts +2 -0
  159. package/dist/layout/extract.js +99 -0
  160. package/dist/layout/lanes.d.ts +30 -0
  161. package/dist/layout/lanes.js +112 -0
  162. package/dist/layout/layering.d.ts +7 -0
  163. package/dist/layout/layering.js +53 -0
  164. package/dist/layout/layout.d.ts +12 -0
  165. package/dist/layout/layout.js +299 -0
  166. package/dist/layout/model.d.ts +52 -0
  167. package/dist/layout/model.js +10 -0
  168. package/dist/layout/placement.d.ts +25 -0
  169. package/dist/layout/placement.js +256 -0
  170. package/dist/layout/standalone.d.ts +8 -0
  171. package/dist/layout/standalone.js +50 -0
  172. package/dist/layout-cli.d.ts +1 -0
  173. package/dist/layout-cli.js +5 -0
  174. package/dist/layout-run.d.ts +9 -0
  175. package/dist/layout-run.js +105 -0
  176. package/dist/loader.d.ts +5 -0
  177. package/dist/loader.js +7 -0
  178. package/dist/namespace.d.ts +5 -0
  179. package/dist/namespace.js +5 -0
  180. package/dist/ontology.d.ts +19 -0
  181. package/dist/ontology.js +94 -0
  182. package/dist/paths.d.ts +1 -0
  183. package/dist/paths.js +2 -0
  184. package/dist/render/geometry.d.ts +40 -0
  185. package/dist/render/geometry.js +81 -0
  186. package/dist/render/renderer.d.ts +31 -0
  187. package/dist/render/renderer.js +369 -0
  188. package/dist/render/symbols.d.ts +10 -0
  189. package/dist/render/symbols.js +26 -0
  190. package/dist/render/text.d.ts +20 -0
  191. package/dist/render/text.js +28 -0
  192. package/dist/render-cli.d.ts +1 -0
  193. package/dist/render-cli.js +7 -0
  194. package/dist/render-run.d.ts +9 -0
  195. package/dist/render-run.js +161 -0
  196. package/dist/render.d.ts +4 -0
  197. package/dist/render.js +4 -0
  198. package/dist/schema-overrides.d.ts +14 -0
  199. package/dist/schema-overrides.js +36 -0
  200. package/dist/schema-validate.d.ts +5 -0
  201. package/dist/schema-validate.js +8 -0
  202. package/dist/schema.d.ts +6 -0
  203. package/dist/schema.js +114 -0
  204. package/dist/shacl.d.ts +15 -0
  205. package/dist/shacl.js +37 -0
  206. package/dist/validate-cli.d.ts +1 -0
  207. package/dist/validate-cli.js +5 -0
  208. package/dist/validate-run.d.ts +8 -0
  209. package/dist/validate-run.js +58 -0
  210. package/dist/validate.d.ts +11 -0
  211. package/dist/validate.js +94 -0
  212. package/dist/versioning-cli.d.ts +1 -0
  213. package/dist/versioning-cli.js +18 -0
  214. package/dist/versioning.d.ts +17 -0
  215. package/dist/versioning.js +45 -0
  216. package/ontology/core.ttl +993 -0
  217. package/ontology/di.ttl +167 -0
  218. package/package.json +77 -4
  219. package/reference/bpmn-xsd/BPMN20.xsd +37 -0
  220. package/reference/bpmn-xsd/BPMNDI.xsd +100 -0
  221. package/reference/bpmn-xsd/DC.xsd +29 -0
  222. package/reference/bpmn-xsd/DI.xsd +100 -0
  223. package/reference/bpmn-xsd/Semantic.xsd +1562 -0
  224. package/reference/rospocher/ATTRIBUTION.md +22 -0
  225. package/reference/rospocher/BPMNOntology.owl +8937 -0
  226. package/reference/rospocher-verified.json +221 -0
  227. package/schema/bpmn-ld.schema.json +15230 -0
  228. package/shapes/core.shapes.ttl +398 -0
  229. package/skills/bpmn-ld/SKILL.md +154 -0
  230. package/skills/bpmn-ld/evals/models/order-approval-di.jsonld +296 -0
  231. package/skills/bpmn-ld/evals/models/refund-di.bpmn +82 -0
  232. package/skills/bpmn-ld/evals/models/refund.bpmn +18 -0
  233. package/skills/bpmn-ld/evals/outputs/explain-collaboration.md +22 -0
  234. package/skills/bpmn-ld/evals/outputs/explain-order-approval.md +24 -0
  235. package/skills/bpmn-ld/evals/outputs/explain-refund.md +17 -0
  236. package/skills/bpmn-ld/evals/outputs/generate-activity-compensation.jsonld +39 -0
  237. package/skills/bpmn-ld/evals/outputs/generate-ad-hoc-sub-process.jsonld +52 -0
  238. package/skills/bpmn-ld/evals/outputs/generate-boundary-event.jsonld +27 -0
  239. package/skills/bpmn-ld/evals/outputs/generate-collaboration.jsonld +49 -0
  240. package/skills/bpmn-ld/evals/outputs/generate-conditions.jsonld +93 -0
  241. package/skills/bpmn-ld/evals/outputs/generate-diagram-properties.jsonld +340 -0
  242. package/skills/bpmn-ld/evals/outputs/generate-error.jsonld +217 -0
  243. package/skills/bpmn-ld/evals/outputs/generate-escalation.jsonld +231 -0
  244. package/skills/bpmn-ld/evals/outputs/generate-event-definition-ref.jsonld +67 -0
  245. package/skills/bpmn-ld/evals/outputs/generate-event-sub-process.jsonld +54 -0
  246. package/skills/bpmn-ld/evals/outputs/generate-exclusive-choice.jsonld +32 -0
  247. package/skills/bpmn-ld/evals/outputs/generate-instantiating-gateway.jsonld +24 -0
  248. package/skills/bpmn-ld/evals/outputs/generate-lane-partition.jsonld +46 -0
  249. package/skills/bpmn-ld/evals/outputs/generate-link-event.expect.json +11 -0
  250. package/skills/bpmn-ld/evals/outputs/generate-link-event.jsonld +57 -0
  251. package/skills/bpmn-ld/evals/outputs/generate-loop.jsonld +30 -0
  252. package/skills/bpmn-ld/evals/outputs/generate-message.jsonld +61 -0
  253. package/skills/bpmn-ld/evals/outputs/generate-parallel-branches.jsonld +25 -0
  254. package/skills/bpmn-ld/evals/outputs/generate-process-attributes.jsonld +49 -0
  255. package/skills/bpmn-ld/evals/outputs/generate-script-task.jsonld +18 -0
  256. package/skills/bpmn-ld/evals/outputs/generate-signal.jsonld +178 -0
  257. package/skills/bpmn-ld/evals/outputs/generate-sub-process.jsonld +31 -0
  258. package/skills/bpmn-ld/evals/outputs/generate-targeted-compensation.jsonld +40 -0
  259. package/skills/bpmn-ld/evals/outputs/generate-task-implementation.jsonld +18 -0
  260. package/skills/bpmn-ld/evals/outputs/generate-task-message-references.jsonld +49 -0
  261. package/skills/bpmn-ld/evals/outputs/generate-transaction.jsonld +48 -0
  262. package/skills/bpmn-ld/evals/outputs/modify-order-approval.jsonld +376 -0
  263. package/skills/bpmn-ld/evals/outputs/modify-refund.jsonld +373 -0
  264. package/skills/bpmn-ld/evals/outputs/order-approval.jsonld +29 -0
  265. package/skills/bpmn-ld/evals/outputs/refine-order-approval.jsonld +377 -0
  266. package/skills/bpmn-ld/evals/prompts/explain-collaboration.md +3 -0
  267. package/skills/bpmn-ld/evals/prompts/explain-order-approval.md +3 -0
  268. package/skills/bpmn-ld/evals/prompts/explain-refund.md +3 -0
  269. package/skills/bpmn-ld/evals/prompts/generate-activity-compensation.md +1 -0
  270. package/skills/bpmn-ld/evals/prompts/generate-ad-hoc-sub-process.md +1 -0
  271. package/skills/bpmn-ld/evals/prompts/generate-boundary-event.md +1 -0
  272. package/skills/bpmn-ld/evals/prompts/generate-collaboration.md +1 -0
  273. package/skills/bpmn-ld/evals/prompts/generate-conditions.md +1 -0
  274. package/skills/bpmn-ld/evals/prompts/generate-diagram-properties.md +1 -0
  275. package/skills/bpmn-ld/evals/prompts/generate-error.md +1 -0
  276. package/skills/bpmn-ld/evals/prompts/generate-escalation.md +1 -0
  277. package/skills/bpmn-ld/evals/prompts/generate-event-definition-ref.md +1 -0
  278. package/skills/bpmn-ld/evals/prompts/generate-event-sub-process.md +1 -0
  279. package/skills/bpmn-ld/evals/prompts/generate-exclusive-choice.md +1 -0
  280. package/skills/bpmn-ld/evals/prompts/generate-instantiating-gateway.md +1 -0
  281. package/skills/bpmn-ld/evals/prompts/generate-lane-partition.md +1 -0
  282. package/skills/bpmn-ld/evals/prompts/generate-link-event.md +1 -0
  283. package/skills/bpmn-ld/evals/prompts/generate-loop.md +1 -0
  284. package/skills/bpmn-ld/evals/prompts/generate-message.md +1 -0
  285. package/skills/bpmn-ld/evals/prompts/generate-parallel-branches.md +1 -0
  286. package/skills/bpmn-ld/evals/prompts/generate-process-attributes.md +1 -0
  287. package/skills/bpmn-ld/evals/prompts/generate-script-task.md +1 -0
  288. package/skills/bpmn-ld/evals/prompts/generate-signal.md +1 -0
  289. package/skills/bpmn-ld/evals/prompts/generate-sub-process.md +1 -0
  290. package/skills/bpmn-ld/evals/prompts/generate-targeted-compensation.md +1 -0
  291. package/skills/bpmn-ld/evals/prompts/generate-task-implementation.md +1 -0
  292. package/skills/bpmn-ld/evals/prompts/generate-task-message-references.md +1 -0
  293. package/skills/bpmn-ld/evals/prompts/generate-transaction.md +1 -0
  294. package/skills/bpmn-ld/evals/prompts/modify-order-approval.md +4 -0
  295. package/skills/bpmn-ld/evals/prompts/modify-refund.md +4 -0
  296. package/skills/bpmn-ld/evals/prompts/order-approval.md +1 -0
  297. package/skills/bpmn-ld/evals/prompts/refine-order-approval.md +8 -0
  298. package/skills/bpmn-ld/examples/positive/activity-compensation.jsonld +39 -0
  299. package/skills/bpmn-ld/examples/positive/ad-hoc-sub-process.jsonld +52 -0
  300. package/skills/bpmn-ld/examples/positive/boundary-event.jsonld +27 -0
  301. package/skills/bpmn-ld/examples/positive/collaboration.jsonld +49 -0
  302. package/skills/bpmn-ld/examples/positive/conditions.jsonld +93 -0
  303. package/skills/bpmn-ld/examples/positive/diagram-properties.jsonld +340 -0
  304. package/skills/bpmn-ld/examples/positive/error.jsonld +208 -0
  305. package/skills/bpmn-ld/examples/positive/escalation.jsonld +231 -0
  306. package/skills/bpmn-ld/examples/positive/event-definition-ref.jsonld +142 -0
  307. package/skills/bpmn-ld/examples/positive/event-sub-process.jsonld +54 -0
  308. package/skills/bpmn-ld/examples/positive/exclusive-choice.jsonld +32 -0
  309. package/skills/bpmn-ld/examples/positive/instantiating-gateway.jsonld +24 -0
  310. package/skills/bpmn-ld/examples/positive/lane-partition.jsonld +46 -0
  311. package/skills/bpmn-ld/examples/positive/link-event.expect.json +10 -0
  312. package/skills/bpmn-ld/examples/positive/link-event.jsonld +138 -0
  313. package/skills/bpmn-ld/examples/positive/loop.jsonld +30 -0
  314. package/skills/bpmn-ld/examples/positive/message.jsonld +60 -0
  315. package/skills/bpmn-ld/examples/positive/order-approval.jsonld +29 -0
  316. package/skills/bpmn-ld/examples/positive/parallel-branches.jsonld +25 -0
  317. package/skills/bpmn-ld/examples/positive/process-attributes.jsonld +49 -0
  318. package/skills/bpmn-ld/examples/positive/script-task.jsonld +18 -0
  319. package/skills/bpmn-ld/examples/positive/signal.jsonld +150 -0
  320. package/skills/bpmn-ld/examples/positive/sub-process.jsonld +31 -0
  321. package/skills/bpmn-ld/examples/positive/targeted-compensation.jsonld +40 -0
  322. package/skills/bpmn-ld/examples/positive/task-implementation.jsonld +18 -0
  323. package/skills/bpmn-ld/examples/positive/task-message-references.jsonld +151 -0
  324. package/skills/bpmn-ld/examples/positive/transaction.jsonld +48 -0
  325. package/skills/bpmn-ld/references/clarification-and-refinement.md +60 -0
  326. package/skills/bpmn-ld/references/common-mistakes.md +110 -0
  327. package/skills/bpmn-ld/references/explain-and-document.md +36 -0
  328. package/skills/bpmn-ld/references/modify-existing-model.md +49 -0
  329. package/skills/bpmn-ld/references/patterns.md +292 -0
  330. package/skills/bpmn-ld/references/render-output.md +1 -0
  331. package/skills/bpmn-ld/references/rule-catalogue.md +183 -0
  332. package/skills/bpmn-ld/references/vocabulary-summary.md +65 -0
  333. package/skills/bpmn-ld/template.jsonld +14 -0
  334. package/templates/combined.jsonld +3 -0
  335. package/templates/core.jsonld +170 -0
  336. package/templates/core.shapes.ttl +398 -0
  337. package/templates/core.ttl +993 -0
  338. package/templates/di.jsonld +37 -0
  339. package/templates/di.ttl +167 -0
@@ -0,0 +1,377 @@
1
+ {
2
+ "@context": [
3
+ "../../../../contexts/core.jsonld",
4
+ "../../../../contexts/di.jsonld",
5
+ {
6
+ "@base": "https://example.org/models/order-approval/",
7
+ "acme": "https://vocab.example.com/acme#"
8
+ }
9
+ ],
10
+ "@graph": [
11
+ {
12
+ "id": "Process_OrderApproval",
13
+ "type": "Process",
14
+ "name": "Order approval",
15
+ "flowElements": [
16
+ {
17
+ "id": "StartEvent_OrderReceived",
18
+ "type": "StartEvent",
19
+ "name": "Order received"
20
+ },
21
+ {
22
+ "id": "UserTask_ReviewOrder",
23
+ "type": "UserTask",
24
+ "name": "Review order",
25
+ "acme:priority": 3
26
+ },
27
+ {
28
+ "id": "ExclusiveGateway_Approved",
29
+ "type": "ExclusiveGateway",
30
+ "name": "Order approved?",
31
+ "default": "Flow_Rejected"
32
+ },
33
+ {
34
+ "id": "ServiceTask_ShipOrder",
35
+ "type": "ServiceTask",
36
+ "name": "Ship order"
37
+ },
38
+ {
39
+ "id": "EndEvent_Shipped",
40
+ "type": "EndEvent",
41
+ "name": "Order shipped"
42
+ },
43
+ {
44
+ "id": "EndEvent_Rejected",
45
+ "type": "EndEvent",
46
+ "name": "Order rejected"
47
+ },
48
+ {
49
+ "id": "Flow_Received",
50
+ "type": "SequenceFlow",
51
+ "sourceRef": "StartEvent_OrderReceived",
52
+ "targetRef": "UserTask_ReviewOrder"
53
+ },
54
+ {
55
+ "id": "Flow_Reviewed",
56
+ "type": "SequenceFlow",
57
+ "sourceRef": "UserTask_ReviewOrder",
58
+ "targetRef": "ExclusiveGateway_Approved"
59
+ },
60
+ {
61
+ "id": "Flow_Approved",
62
+ "type": "SequenceFlow",
63
+ "name": "Yes",
64
+ "sourceRef": "ExclusiveGateway_Approved",
65
+ "targetRef": "ServiceTask_ShipOrder",
66
+ "conditionExpression": {
67
+ "type": "FormalExpression",
68
+ "language": "https://262.ecma-international.org/",
69
+ "body": "approved === true"
70
+ }
71
+ },
72
+ {
73
+ "id": "Flow_Rejected",
74
+ "type": "SequenceFlow",
75
+ "name": "No",
76
+ "sourceRef": "ExclusiveGateway_Approved",
77
+ "targetRef": "EndEvent_Rejected"
78
+ },
79
+ {
80
+ "id": "Flow_Shipped",
81
+ "type": "SequenceFlow",
82
+ "sourceRef": "ServiceTask_ShipOrder",
83
+ "targetRef": "EndEvent_Shipped"
84
+ },
85
+ {
86
+ "id": "BoundaryEvent_ReviewOverdue",
87
+ "type": "BoundaryEvent",
88
+ "name": "Review overdue",
89
+ "attachedToRef": "UserTask_ReviewOrder",
90
+ "cancelActivity": false,
91
+ "eventDefinitions": [
92
+ {
93
+ "type": "TimerEventDefinition"
94
+ }
95
+ ]
96
+ },
97
+ {
98
+ "id": "EndEvent_ReviewEscalated",
99
+ "type": "EndEvent",
100
+ "name": "Review escalated"
101
+ },
102
+ {
103
+ "id": "Flow_ReviewOverdue",
104
+ "type": "SequenceFlow",
105
+ "sourceRef": "BoundaryEvent_ReviewOverdue",
106
+ "targetRef": "EndEvent_ReviewEscalated"
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "id": "Diagram_Process_OrderApproval",
112
+ "type": "BPMNDiagram",
113
+ "plane": {
114
+ "id": "Plane_Process_OrderApproval",
115
+ "type": "BPMNPlane",
116
+ "bpmnElement": "Process_OrderApproval",
117
+ "planeElements": [
118
+ {
119
+ "id": "Shape_StartEvent_OrderReceived",
120
+ "type": "BPMNShape",
121
+ "bpmnElement": "StartEvent_OrderReceived",
122
+ "bounds": {
123
+ "type": "Bounds",
124
+ "x": 100,
125
+ "y": 160,
126
+ "width": 36,
127
+ "height": 36
128
+ }
129
+ },
130
+ {
131
+ "id": "Shape_UserTask_ReviewOrder",
132
+ "type": "BPMNShape",
133
+ "bpmnElement": "UserTask_ReviewOrder",
134
+ "bounds": {
135
+ "type": "Bounds",
136
+ "x": 196,
137
+ "y": 138,
138
+ "width": 100,
139
+ "height": 80
140
+ }
141
+ },
142
+ {
143
+ "id": "Shape_ExclusiveGateway_Approved",
144
+ "type": "BPMNShape",
145
+ "bpmnElement": "ExclusiveGateway_Approved",
146
+ "bounds": {
147
+ "type": "Bounds",
148
+ "x": 356,
149
+ "y": 153,
150
+ "width": 50,
151
+ "height": 50
152
+ }
153
+ },
154
+ {
155
+ "id": "Shape_ServiceTask_ShipOrder",
156
+ "type": "BPMNShape",
157
+ "bpmnElement": "ServiceTask_ShipOrder",
158
+ "bounds": {
159
+ "type": "Bounds",
160
+ "x": 466,
161
+ "y": 100,
162
+ "width": 100,
163
+ "height": 80
164
+ }
165
+ },
166
+ {
167
+ "id": "Shape_EndEvent_Shipped",
168
+ "type": "BPMNShape",
169
+ "bpmnElement": "EndEvent_Shipped",
170
+ "bounds": {
171
+ "type": "Bounds",
172
+ "x": 626,
173
+ "y": 160,
174
+ "width": 36,
175
+ "height": 36
176
+ }
177
+ },
178
+ {
179
+ "id": "Shape_EndEvent_Rejected",
180
+ "type": "BPMNShape",
181
+ "bpmnElement": "EndEvent_Rejected",
182
+ "bounds": {
183
+ "type": "Bounds",
184
+ "x": 498,
185
+ "y": 220,
186
+ "width": 36,
187
+ "height": 36
188
+ }
189
+ },
190
+ {
191
+ "id": "Edge_Flow_Received",
192
+ "type": "BPMNEdge",
193
+ "bpmnElement": "Flow_Received",
194
+ "sourceElement": "Shape_StartEvent_OrderReceived",
195
+ "targetElement": "Shape_UserTask_ReviewOrder",
196
+ "waypoints": [
197
+ {
198
+ "type": "Point",
199
+ "x": 136,
200
+ "y": 178
201
+ },
202
+ {
203
+ "type": "Point",
204
+ "x": 196,
205
+ "y": 178
206
+ }
207
+ ]
208
+ },
209
+ {
210
+ "id": "Edge_Flow_Reviewed",
211
+ "type": "BPMNEdge",
212
+ "bpmnElement": "Flow_Reviewed",
213
+ "sourceElement": "Shape_UserTask_ReviewOrder",
214
+ "targetElement": "Shape_ExclusiveGateway_Approved",
215
+ "waypoints": [
216
+ {
217
+ "type": "Point",
218
+ "x": 296,
219
+ "y": 178
220
+ },
221
+ {
222
+ "type": "Point",
223
+ "x": 356,
224
+ "y": 178
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "id": "Edge_Flow_Approved",
230
+ "type": "BPMNEdge",
231
+ "bpmnElement": "Flow_Approved",
232
+ "sourceElement": "Shape_ExclusiveGateway_Approved",
233
+ "targetElement": "Shape_ServiceTask_ShipOrder",
234
+ "waypoints": [
235
+ {
236
+ "type": "Point",
237
+ "x": 406,
238
+ "y": 178
239
+ },
240
+ {
241
+ "type": "Point",
242
+ "x": 436,
243
+ "y": 178
244
+ },
245
+ {
246
+ "type": "Point",
247
+ "x": 436,
248
+ "y": 140
249
+ },
250
+ {
251
+ "type": "Point",
252
+ "x": 466,
253
+ "y": 140
254
+ }
255
+ ]
256
+ },
257
+ {
258
+ "id": "Edge_Flow_Rejected",
259
+ "type": "BPMNEdge",
260
+ "bpmnElement": "Flow_Rejected",
261
+ "sourceElement": "Shape_ExclusiveGateway_Approved",
262
+ "targetElement": "Shape_EndEvent_Rejected",
263
+ "waypoints": [
264
+ {
265
+ "type": "Point",
266
+ "x": 406,
267
+ "y": 178
268
+ },
269
+ {
270
+ "type": "Point",
271
+ "x": 452,
272
+ "y": 178
273
+ },
274
+ {
275
+ "type": "Point",
276
+ "x": 452,
277
+ "y": 238
278
+ },
279
+ {
280
+ "type": "Point",
281
+ "x": 498,
282
+ "y": 238
283
+ }
284
+ ]
285
+ },
286
+ {
287
+ "id": "Edge_Flow_Shipped",
288
+ "type": "BPMNEdge",
289
+ "bpmnElement": "Flow_Shipped",
290
+ "sourceElement": "Shape_ServiceTask_ShipOrder",
291
+ "targetElement": "Shape_EndEvent_Shipped",
292
+ "waypoints": [
293
+ {
294
+ "type": "Point",
295
+ "x": 566,
296
+ "y": 140
297
+ },
298
+ {
299
+ "type": "Point",
300
+ "x": 596,
301
+ "y": 140
302
+ },
303
+ {
304
+ "type": "Point",
305
+ "x": 596,
306
+ "y": 178
307
+ },
308
+ {
309
+ "type": "Point",
310
+ "x": 626,
311
+ "y": 178
312
+ }
313
+ ]
314
+ },
315
+ {
316
+ "id": "Shape_BoundaryEvent_ReviewOverdue",
317
+ "type": "BPMNShape",
318
+ "bpmnElement": "BoundaryEvent_ReviewOverdue",
319
+ "bounds": {
320
+ "type": "Bounds",
321
+ "x": 228,
322
+ "y": 200,
323
+ "width": 36,
324
+ "height": 36
325
+ }
326
+ },
327
+ {
328
+ "id": "Shape_EndEvent_ReviewEscalated",
329
+ "type": "BPMNShape",
330
+ "bpmnElement": "EndEvent_ReviewEscalated",
331
+ "bounds": {
332
+ "type": "Bounds",
333
+ "x": 363,
334
+ "y": 205,
335
+ "width": 36,
336
+ "height": 36
337
+ }
338
+ },
339
+ {
340
+ "id": "Edge_Flow_ReviewOverdue",
341
+ "type": "BPMNEdge",
342
+ "bpmnElement": "Flow_ReviewOverdue",
343
+ "sourceElement": "Shape_BoundaryEvent_ReviewOverdue",
344
+ "targetElement": "Shape_EndEvent_ReviewEscalated",
345
+ "waypoints": [
346
+ {
347
+ "type": "Point",
348
+ "x": 246,
349
+ "y": 236
350
+ },
351
+ {
352
+ "type": "Point",
353
+ "x": 246,
354
+ "y": 244
355
+ },
356
+ {
357
+ "type": "Point",
358
+ "x": 330,
359
+ "y": 244
360
+ },
361
+ {
362
+ "type": "Point",
363
+ "x": 330,
364
+ "y": 223
365
+ },
366
+ {
367
+ "type": "Point",
368
+ "x": 363,
369
+ "y": 223
370
+ }
371
+ ]
372
+ }
373
+ ]
374
+ }
375
+ }
376
+ ]
377
+ }
@@ -0,0 +1,3 @@
1
+ Model: examples/positive/collaboration.jsonld
2
+
3
+ Use the bpmn-ld skill to explain the BPMN-LD model in the file named on the Model line above, in plain language for a business reader. Write Markdown documentation: a short summary, each participant and its steps in order, and the messages exchanged between them. Mention every named element of the model by its exact name.
@@ -0,0 +1,3 @@
1
+ Model: examples/positive/order-approval.jsonld
2
+
3
+ Use the bpmn-ld skill to explain the BPMN-LD model in the file named on the Model line above, in plain language for a business reader. Write Markdown documentation: a short summary, the steps in order, the decision and each of its outcomes. Mention every named element of the model by its exact name.
@@ -0,0 +1,3 @@
1
+ Model: evals/models/refund.bpmn
2
+
3
+ Use the bpmn-ld skill to explain the BPMN 2.0 XML model in the file named on the Model line above. Convert it to BPMN-LD first with the repository's convert command, then explain the converted model in plain language for a business reader. Write Markdown documentation: a short summary, the steps in order, the decision and each of its outcomes. Mention every named element of the model by its exact name.
@@ -0,0 +1 @@
1
+ Model this trip booking as BPMN-LD: a trip is requested, then a service task books the hotel, with its start and completion quantity stated explicitly as 1. If the booking has to be undone, a compensation boundary event named Booking undone on that task triggers a separate service task, Cancel hotel, which is a compensation activity linked to the boundary event by an association with an arrowhead at the task. Afterwards a sub-process arranges the transfers; it needs two tokens to start (start quantity 2) and produces none on completion (completion quantity 0), and inside it a user task books a shuttle between its own start and end event. When the sub-process is done the trip is booked.
@@ -0,0 +1 @@
1
+ Model this support process as BPMN-LD: a support case is opened, then an ad-hoc sub-process lets the agent call the customer, inspect the logs and apply a fix in any order, several at a time, until at least one fix is applied (the completion condition is that the fix count is above zero), and the remaining activities are left to finish rather than cancelled. Afterwards a second ad-hoc sub-process has the agent write notes and file a report one at a time, in sequence, until documented, and the case is closed.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: a support ticket is opened, an agent resolves the ticket, and the ticket is closed. If the ticket is still being resolved after two days, a timer event named "Two days passed" interrupts the work; an agent then escalates the ticket and the process ends with the ticket escalated. Keep the normal path and the escalation path as separate ends.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD with two participants, a Customer and a Shop, each with its own process. The customer needs a product, places an order and then waits for the confirmation. The shop starts when the order message arrives, prepares the order and sends a confirmation to the customer. Connect them with message flows.
@@ -0,0 +1 @@
1
+ Model this application intake as BPMN-LD: an application is submitted and a clerk checks the applicant's income. The income check can be interrupted by a boundary event that fires when the application is withdrawn, which is the condition that the application's withdrawn flag is true, and the application is then dropped. Otherwise the process waits at an intermediate catch event until the applicant's credit limit is above zero, written as an XPath condition, and then the application is accepted.
@@ -0,0 +1 @@
1
+ Model this exchange as BPMN-LD, with its diagram. A customer starts with a need, sends an order and ends once it is ordered; a shop starts when it is open, receives the order and ends once the order is accepted. The customer's send task sends the order message to the shop's receive task, and the shop sends a confirmation back, from its pool to the customer's pool. Include the diagram of the collaboration, named "Order exchange" and drawn at 96 dpi, and mark the edge of the order message as the message of the initiating participant and the edge of the confirmation as the message of the non-initiating participant.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD. Define two errors as separate elements: "Payment declined" with error code PAYMENT_DECLINED and "Card expired" with error code CARD_EXPIRED. A process starts when a payment is requested and runs a sub-process "Charge card": it starts, runs a task "Authorise card" and then an exclusive gateway; one branch ends with an end event that throws Payment declined, a second branch ends with an end event that throws Card expired, and the default branch ends normally. The main process has a boundary event on "Charge card" that catches Payment declined and leads to a task "Notify customer" and the end event "Payment refused", and an event sub-process whose start event catches Card expired, runs a task "Request new card" and ends. After "Charge card" completes normally the process ends with "Payment taken". Reference the error from every error event definition and put the error code on the error, not on the event definition.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD. Define two escalations as separate elements: "Manager review" with escalation code MANAGER_REVIEW and "Board approval" with escalation code BOARD_APPROVAL. A process starts when a request is received and runs a sub-process "Assess request": it starts, runs a task "Check amount" and then an exclusive gateway; for a large amount an intermediate throw event raises Manager review and the branch ends with "Forwarded to manager", for a very large amount an end event throws Board approval, and the default branch ends with "Assessed". The main process has a non-interrupting boundary event on "Assess request" that catches Manager review and leads to a task "Review by manager" and the end event "Manager reviewed", and an event sub-process whose start event catches Board approval, runs a task "Prepare board paper" and ends. After "Assess request" completes normally the process ends with "Request assessed". Reference the escalation from every escalation event definition and put the escalation code on the escalation, not on the event definition.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD with two participants, Sales and Stock, each with its own process. Both processes start every Monday morning. Define the weekly trigger once, as one shared timer event definition with the cycle R/P1W and the id "Definition_Weekly", and let the start event of each process refer to it instead of nesting its own timer. Sales: a user task "Compile sales report", then an end event "Sales report sent". Stock: a user task "Count stock", then an end event "Stock count recorded".
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: an order is received, a clerk handles the order and the order is handled. While the order is being handled, a timer event named "Every hour" starts an event sub-process "Send reminders" in which a clerk sends a reminder and the reminder is sent; it must not interrupt the order handling. Also, if the customer cancels the order, a message start event named "Customer cancels" starts an event sub-process "Cancel order" that interrupts the handling: a clerk refunds the customer and the order is cancelled.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: a refund is requested. If the amount is over 100 a manager approves the refund, otherwise it is approved automatically. Either way the refund is then paid out and the process ends.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: a request-handling process is started by whichever of two messages arrives first, with no start event. If an order is placed, a clerk handles the order and the order is handled. If a quote is requested, a clerk prepares the quote and the quote is sent. The first message to arrive decides the path.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD. A parcel is received, a courier is assigned and the parcel is delivered, and the process ends. The process has one lane named "Region", whose partition is defined by a participant with the id Partition_Region, and the lane contains the start event and the courier assignment. A nested lane named "North" inside it refines the same partition by referring to that participant and contains the delivery task. The flow from the start event to the courier assignment is immediate, which means that no other activity may happen between the two; the flow from the assignment to the delivery is explicitly not immediate; the last flow says nothing about it.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD. A support request arrives and a clerk classifies it. If it is urgent, an agent escalates it; otherwise an agent answers it in the normal queue. Both branches end with a link throw event named "Close case" so the diagram does not need flows to cross. A link catch event with the same name continues the process: the clerk archives the case and the process ends. Connect the link events explicitly: each throw event names the catch event as its target and the catch event lists both throw events as its sources.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: a document is assigned and then reviewed. If the review does not accept it, the document is revised and reviewed again, until it is accepted. When accepted, the document is published and the process ends.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD with two participants, a Customer and a Shop, each with its own process. Define two messages, an Order and an Order confirmation, as separate elements. The customer places an order with a send task, which is connected to the shop's message start event by a message flow carrying the Order message; the shop's start event waits for that same message. The shop then sends the confirmation, a message flow carrying the Order confirmation message, to an intermediate catch event of the customer that waits for it. Both processes end afterwards.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: when an order is paid, the items are picked and the invoice is printed at the same time. When both are done, the parcel is dispatched and the process ends.
@@ -0,0 +1 @@
1
+ Model this collaboration as BPMN-LD: a customer sends an order to a shop. The customer process is a public process that an engine does not run. The shop process is a private, executable process that starts when the order message arrives, and a clerk handles the order. The collaboration is closed, so only the modelled messages are exchanged, and so is the shop process.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: when an invoice is received, an automatic script computes the invoice total from the net amount by multiplying it by 1.2, written in JavaScript. Then a clerk approves the invoice and the invoice is approved.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD with two participants, a Supervisor and a Production line, each with its own process. Define one signal named "Emergency stop" as a separate element. The supervisor inspects a report and then announces the stop by an intermediate throw event that broadcasts the Emergency stop signal; the process ends afterwards. The production line starts when its start event receives the Emergency stop signal, shuts the line down with a task and ends. The line process also has a task "Run batch" with a boundary event that catches the same signal and leads to its own end event "Batch aborted". Reference the signal from every signal event definition.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: when an employee is hired, a sub-process provides the equipment (order the laptop, then configure it). After the equipment is provided the employee is welcomed and the process ends.
@@ -0,0 +1 @@
1
+ Model this trip cancellation as BPMN-LD. A trip is requested, then a service task books the hotel. If the booking has to be undone, a compensation boundary event named Booking undone on that task triggers a separate service task, Cancel hotel, which is a compensation activity linked to the boundary event by an association with an arrowhead at the task. After the booking a user task reviews the itinerary. Then an intermediate throw event named Undo hotel booking explicitly triggers the compensation of the Book hotel task, and the process waits until the compensation has completed. The process ends with the event Trip cancelled.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: when an order is received, a service task checks the stock through a web service. Then a clerk reviews the order using the form at http://example.org/forms/review, and the order is confirmed.
@@ -0,0 +1 @@
1
+ Model this as BPMN-LD with two participants, a Customer and a Shop, each with its own process. Define two messages, an Order and an Order confirmation, as separate elements. The customer places an order with a send task that names the Order message; a message flow carrying the Order message connects it to a receive task of the shop that names the same message and starts the shop's process. The shop then sends the confirmation with a send task that names the Order confirmation message, and a message flow carrying that message leads to a receive task of the customer that names it too. Both processes end afterwards.
@@ -0,0 +1 @@
1
+ Model this order process as BPMN-LD: an order is received, then a transaction charges the card and ships the goods, one after the other, between its own start and end event, with compensation as the way it is undone (the default method, stated explicitly). Afterwards a second transaction reserves the stock and keeps the changes in a store until it completes. When both transactions have finished the order is completed.
@@ -0,0 +1,4 @@
1
+ Model: evals/models/order-approval-di.jsonld
2
+ Allowed-changes: UserTask_ReviewOrder, BoundaryEvent_ShippingFailed, EndEvent_ShippingFailed, Flow_ShippingFailed
3
+
4
+ Use the bpmn-ld skill to modify the BPMN-LD model in the file named on the Model line above and output the complete modified BPMN-LD document. Make two changes: rename the task "Review order" to "Review and approve order", and attach an error boundary event named "Shipping failed" to the task "Ship order" that leads to a new end event named "Shipment failed". Edit the model in place: keep every identifier, extension property and existing diagram coordinate, and lay out only the new elements. Change nothing else; the elements listed on the Allowed-changes line are the only ones that may change or be added.
@@ -0,0 +1,4 @@
1
+ Model: evals/models/refund-di.bpmn
2
+ Allowed-changes: End_Declined, Boundary_CheckTimeout, End_TimedOut, Flow_TimedOut
3
+
4
+ Use the bpmn-ld skill to modify the BPMN 2.0 XML model in the file named on the Model line above and output the complete modified BPMN-LD document. Convert it to BPMN-LD first with the repository's convert command. Make two changes: rename the end event "Refund declined" to "Refund rejected", and attach a timer boundary event named "Check took too long" to the task "Check purchase" that leads to a new end event named "Refund timed out". Edit the converted model in place: keep every identifier, extension property and existing diagram coordinate, and lay out only the new elements. Change nothing else; the elements listed on the Allowed-changes line are the only ones that may change or be added.
@@ -0,0 +1 @@
1
+ Model this process as BPMN-LD: an order is received, a clerk reviews it, and if it is approved it is shipped, otherwise it is rejected. Both outcomes end the process.
@@ -0,0 +1,8 @@
1
+ Model: evals/models/order-approval-di.jsonld
2
+ Allowed-changes: ExclusiveGateway_Approved, BoundaryEvent_ReviewOverdue, EndEvent_ReviewEscalated, Flow_ReviewOverdue
3
+
4
+ Use the bpmn-ld skill to refine the BPMN-LD model in the file named on the Model line above according to the user feedback below, and output the complete refined BPMN-LD document.
5
+
6
+ User feedback: "The decision question is too terse, call it 'Order approved?'. Also, orders sometimes sit in review for too long: add a non-interrupting timer boundary event named 'Review overdue' on the review task that leads to a new end event named 'Review escalated'."
7
+
8
+ Edit the model in place: keep every identifier, extension property and existing diagram coordinate, and lay out only the new elements. Change nothing else; the elements listed on the Allowed-changes line are the only ones that may change or be added.
@@ -0,0 +1,39 @@
1
+ {
2
+ "@context": [
3
+ "../../../../contexts/core.jsonld",
4
+ { "@base": "https://example.org/models/activity-compensation/" }
5
+ ],
6
+ "@graph": [
7
+ {
8
+ "id": "Process_Trip",
9
+ "type": "Process",
10
+ "name": "Book a trip",
11
+ "flowElements": [
12
+ { "id": "TripRequested", "type": "StartEvent", "name": "Trip requested" },
13
+ { "id": "BookHotel", "type": "ServiceTask", "name": "Book hotel", "startQuantity": 1, "completionQuantity": 1 },
14
+ {
15
+ "id": "UndoBooking",
16
+ "type": "BoundaryEvent",
17
+ "name": "Booking undone",
18
+ "attachedToRef": "BookHotel",
19
+ "eventDefinitions": [{ "type": "CompensateEventDefinition" }]
20
+ },
21
+ { "id": "CancelHotel", "type": "ServiceTask", "name": "Cancel hotel", "isForCompensation": true },
22
+ { "id": "ArrangeTransfers", "type": "SubProcess", "name": "Arrange transfers", "startQuantity": 2, "completionQuantity": 0, "flowElements": [
23
+ { "id": "TransferStart", "type": "StartEvent", "name": "Begin" },
24
+ { "id": "BookShuttle", "type": "UserTask", "name": "Book shuttle" },
25
+ { "id": "TransferEnd", "type": "EndEvent", "name": "Done" },
26
+ { "id": "TransferFlow_1", "type": "SequenceFlow", "sourceRef": "TransferStart", "targetRef": "BookShuttle" },
27
+ { "id": "TransferFlow_2", "type": "SequenceFlow", "sourceRef": "BookShuttle", "targetRef": "TransferEnd" }
28
+ ] },
29
+ { "id": "TripBooked", "type": "EndEvent", "name": "Trip booked" },
30
+ { "id": "Flow_1", "type": "SequenceFlow", "sourceRef": "TripRequested", "targetRef": "BookHotel" },
31
+ { "id": "Flow_2", "type": "SequenceFlow", "sourceRef": "BookHotel", "targetRef": "ArrangeTransfers" },
32
+ { "id": "Flow_3", "type": "SequenceFlow", "sourceRef": "ArrangeTransfers", "targetRef": "TripBooked" }
33
+ ],
34
+ "artifacts": [
35
+ { "id": "Compensation_1", "type": "Association", "sourceRef": "UndoBooking", "targetRef": "CancelHotel", "associationDirection": "One" }
36
+ ]
37
+ }
38
+ ]
39
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "@context": [
3
+ "../../../../contexts/core.jsonld",
4
+ { "@base": "https://example.org/models/ad-hoc-sub-process/" }
5
+ ],
6
+ "@graph": [
7
+ {
8
+ "id": "Process_Support",
9
+ "type": "Process",
10
+ "name": "Support case",
11
+ "flowElements": [
12
+ { "id": "CaseOpened", "type": "StartEvent", "name": "Case opened" },
13
+ {
14
+ "id": "Investigate",
15
+ "type": "AdHocSubProcess",
16
+ "name": "Investigate case",
17
+ "ordering": "Parallel",
18
+ "cancelRemainingInstances": false,
19
+ "completionCondition": {
20
+ "type": "FormalExpression",
21
+ "language": "https://www.w3.org/TR/xpath20/",
22
+ "body": "count(fixes) > 0"
23
+ },
24
+ "flowElements": [
25
+ { "id": "CallCustomer", "type": "UserTask", "name": "Call customer" },
26
+ { "id": "InspectLogs", "type": "UserTask", "name": "Inspect logs" },
27
+ { "id": "ApplyFix", "type": "UserTask", "name": "Apply fix" }
28
+ ]
29
+ },
30
+ {
31
+ "id": "Document",
32
+ "type": "AdHocSubProcess",
33
+ "name": "Document findings",
34
+ "ordering": "Sequential",
35
+ "completionCondition": {
36
+ "type": "FormalExpression",
37
+ "body": "documented"
38
+ },
39
+ "flowElements": [
40
+ { "id": "WriteNotes", "type": "UserTask", "name": "Write notes" },
41
+ { "id": "FileReport", "type": "UserTask", "name": "File report" },
42
+ { "id": "NotesToReport", "type": "SequenceFlow", "sourceRef": "WriteNotes", "targetRef": "FileReport" }
43
+ ]
44
+ },
45
+ { "id": "CaseClosed", "type": "EndEvent", "name": "Case closed" },
46
+ { "id": "Flow_1", "type": "SequenceFlow", "sourceRef": "CaseOpened", "targetRef": "Investigate" },
47
+ { "id": "Flow_2", "type": "SequenceFlow", "sourceRef": "Investigate", "targetRef": "Document" },
48
+ { "id": "Flow_3", "type": "SequenceFlow", "sourceRef": "Document", "targetRef": "CaseClosed" }
49
+ ]
50
+ }
51
+ ]
52
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "@context": [
3
+ "../../../../contexts/core.jsonld",
4
+ { "@base": "https://example.org/models/boundary-event/" }
5
+ ],
6
+ "id": "Process_Ticket",
7
+ "type": "Process",
8
+ "name": "Support ticket",
9
+ "flowElements": [
10
+ { "id": "StartEvent_Opened", "type": "StartEvent", "name": "Ticket opened" },
11
+ { "id": "Task_Resolve", "type": "UserTask", "name": "Resolve ticket" },
12
+ { "id": "EndEvent_Closed", "type": "EndEvent", "name": "Ticket closed" },
13
+ {
14
+ "id": "BoundaryEvent_Overdue",
15
+ "type": "BoundaryEvent",
16
+ "name": "Two days passed",
17
+ "attachedToRef": "Task_Resolve",
18
+ "eventDefinitions": [{ "type": "TimerEventDefinition" }]
19
+ },
20
+ { "id": "Task_Escalate", "type": "UserTask", "name": "Escalate ticket" },
21
+ { "id": "EndEvent_Escalated", "type": "EndEvent", "name": "Ticket escalated" },
22
+ { "id": "Flow_Opened", "type": "SequenceFlow", "sourceRef": "StartEvent_Opened", "targetRef": "Task_Resolve" },
23
+ { "id": "Flow_Resolved", "type": "SequenceFlow", "sourceRef": "Task_Resolve", "targetRef": "EndEvent_Closed" },
24
+ { "id": "Flow_Overdue", "type": "SequenceFlow", "sourceRef": "BoundaryEvent_Overdue", "targetRef": "Task_Escalate" },
25
+ { "id": "Flow_Escalated", "type": "SequenceFlow", "sourceRef": "Task_Escalate", "targetRef": "EndEvent_Escalated" }
26
+ ]
27
+ }