@bpmnkit/docspack 0.0.1
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/.llms/chunks/cli.casen.aikit-skills.md +19 -0
- package/.llms/chunks/cli.casen.bpmn-generation-pipeline.md +32 -0
- package/.llms/chunks/cli.casen.connection-profiles.md +62 -0
- package/.llms/chunks/cli.casen.generate-bpmn-files.md +28 -0
- package/.llms/chunks/cli.casen.md +80 -0
- package/.llms/chunks/cli.casen.plugins.md +56 -0
- package/.llms/chunks/cli.casen.worker-commands.md +45 -0
- package/.llms/chunks/cli.connector.all-flags.md +29 -0
- package/.llms/chunks/cli.connector.browse-the-bundled-ootb-catalog.md +32 -0
- package/.llms/chunks/cli.connector.built-in-catalog.md +41 -0
- package/.llms/chunks/cli.connector.common-workflows.md +50 -0
- package/.llms/chunks/cli.connector.generate-from-the-openapi-catalog.md +30 -0
- package/.llms/chunks/cli.connector.md +20 -0
- package/.llms/chunks/cli.connector.programmatic-usage.md +7 -0
- package/.llms/chunks/cli.connector.what-gets-generated.md +20 -0
- package/.llms/chunks/cli.generate.definition-mode-ai-scripting-path.md +89 -0
- package/.llms/chunks/cli.generate.md +52 -0
- package/.llms/chunks/cli.generate.modify-existing-mode-input.md +59 -0
- package/.llms/chunks/cli.generate.typical-ai-workflow.md +18 -0
- package/.llms/chunks/cli.plugin-authoring.md +59 -0
- package/.llms/chunks/cli.plugin-authoring.plugin-naming-conventions.md +11 -0
- package/.llms/chunks/cli.plugin-authoring.test-locally.md +41 -0
- package/.llms/chunks/cli.plugin-authoring.the-bpmnkit-cli-sdk-sdk.md +82 -0
- package/.llms/chunks/cli.plugin-authoring.what-gets-generated.md +69 -0
- package/.llms/chunks/cli.plugin-authoring.writing-commands.md +84 -0
- package/.llms/chunks/cli.plugins.bpmnkit-casen-report.md +39 -0
- package/.llms/chunks/cli.plugins.bpmnkit-casen-worker-http.md +23 -0
- package/.llms/chunks/cli.plugins.md +25 -0
- package/.llms/chunks/cli.skills.deploy.md +24 -0
- package/.llms/chunks/cli.skills.implement.md +36 -0
- package/.llms/chunks/cli.skills.md +29 -0
- package/.llms/chunks/cli.skills.no-mcp-server-required.md +6 -0
- package/.llms/chunks/cli.skills.review.md +33 -0
- package/.llms/chunks/cli.skills.test.md +33 -0
- package/.llms/chunks/cli.view.folder-support.md +31 -0
- package/.llms/chunks/cli.view.md +70 -0
- package/.llms/chunks/cli.view.tabbed-navigation.md +28 -0
- package/.llms/chunks/getting-started.concepts.ai-compact-format.md +23 -0
- package/.llms/chunks/getting-started.concepts.auto-layout.md +24 -0
- package/.llms/chunks/getting-started.concepts.parsing-and-serializing.md +26 -0
- package/.llms/chunks/getting-started.concepts.the-fluent-builder.md +41 -0
- package/.llms/chunks/getting-started.concepts.zeebe-extensions.md +25 -0
- package/.llms/chunks/getting-started.installation.md +38 -0
- package/.llms/chunks/getting-started.installation.runtime-requirements.md +13 -0
- package/.llms/chunks/getting-started.installation.svg-canvas-viewer.md +41 -0
- package/.llms/chunks/getting-started.installation.worker-client.md +40 -0
- package/.llms/chunks/getting-started.quick-start.md +31 -0
- package/.llms/chunks/getting-started.quick-start.step-2-simulate-locally.md +28 -0
- package/.llms/chunks/getting-started.quick-start.step-3-deploy-to-camunda-8.md +33 -0
- package/.llms/chunks/getting-started.quick-start.what-s-next.md +14 -0
- package/.llms/chunks/guides.ai-agents.deploy-grade-validation.md +19 -0
- package/.llms/chunks/guides.ai-agents.how-it-s-modeled.md +11 -0
- package/.llms/chunks/guides.ai-agents.md +18 -0
- package/.llms/chunks/guides.ai-agents.see-also.md +7 -0
- package/.llms/chunks/guides.ai-agents.testing-without-a-real-llm-call.md +26 -0
- package/.llms/chunks/guides.ai-agents.the-aiagent-plan-step.md +62 -0
- package/.llms/chunks/guides.ai-implement.deploying.md +49 -0
- package/.llms/chunks/guides.ai-implement.extending-an-existing-process.md +10 -0
- package/.llms/chunks/guides.ai-implement.lightweight-alternative-casen-skills-install.md +28 -0
- package/.llms/chunks/guides.ai-implement.md +32 -0
- package/.llms/chunks/guides.ai-implement.the-claude-code-plugin.md +21 -0
- package/.llms/chunks/guides.ai.claude-api-example.md +41 -0
- package/.llms/chunks/guides.ai.mcp-server.md +20 -0
- package/.llms/chunks/guides.ai.md +32 -0
- package/.llms/chunks/guides.ai.minimal-empty-diagram.md +32 -0
- package/.llms/chunks/guides.ai.openai-function-calling.md +40 -0
- package/.llms/chunks/guides.building-processes.boundary-events.md +47 -0
- package/.llms/chunks/guides.building-processes.call-activities.md +47 -0
- package/.llms/chunks/guides.building-processes.events.md +57 -0
- package/.llms/chunks/guides.building-processes.multi-instance.md +20 -0
- package/.llms/chunks/guides.building-processes.service-tasks.md +39 -0
- package/.llms/chunks/guides.building-processes.sub-processes.md +40 -0
- package/.llms/chunks/guides.building-processes.task-defaults.md +18 -0
- package/.llms/chunks/guides.claude-code-plugin.ambient-hooks.md +24 -0
- package/.llms/chunks/guides.claude-code-plugin.configuration.md +126 -0
- package/.llms/chunks/guides.claude-code-plugin.md +47 -0
- package/.llms/chunks/guides.claude-code-plugin.reference-docs.md +61 -0
- package/.llms/chunks/guides.deployment.ci-cd-deploy-on-push.md +47 -0
- package/.llms/chunks/guides.deployment.deploying-a-process.md +52 -0
- package/.llms/chunks/guides.deployment.handling-jobs.md +50 -0
- package/.llms/chunks/guides.deployment.managing-incidents.md +33 -0
- package/.llms/chunks/guides.deployment.md +49 -0
- package/.llms/chunks/guides.gateways.branching-inside-sub-processes.md +27 -0
- package/.llms/chunks/guides.gateways.exclusive-gateway-xor.md +41 -0
- package/.llms/chunks/guides.gateways.inclusive-gateway-or.md +43 -0
- package/.llms/chunks/guides.gateways.nested-branching.md +27 -0
- package/.llms/chunks/guides.gateways.parallel-gateway-and.md +26 -0
- package/.llms/chunks/guides.patterns.how-matching-works.md +17 -0
- package/.llms/chunks/guides.patterns.md +26 -0
- package/.llms/chunks/guides.patterns.pattern-schema.md +38 -0
- package/.llms/chunks/guides.patterns.see-also.md +7 -0
- package/.llms/chunks/guides.patterns.using-patterns-from-the-cli.md +30 -0
- package/.llms/chunks/guides.patterns.what-a-pattern-contains.md +18 -0
- package/.llms/chunks/guides.simulation.dmn-decision-evaluation.md +51 -0
- package/.llms/chunks/guides.simulation.instance-state.md +29 -0
- package/.llms/chunks/guides.simulation.md +51 -0
- package/.llms/chunks/guides.simulation.message-correlation.md +30 -0
- package/.llms/chunks/guides.simulation.multiple-deployments.md +14 -0
- package/.llms/chunks/guides.workers-standalone.anatomy-of-a-worker.md +42 -0
- package/.llms/chunks/guides.workers-standalone.camunda-saas.md +43 -0
- package/.llms/chunks/guides.workers-standalone.environment-variables.md +14 -0
- package/.llms/chunks/guides.workers-standalone.md +35 -0
- package/.llms/chunks/guides.workers-standalone.running-workers.md +61 -0
- package/.llms/chunks/guides.workers-standalone.see-also.md +7 -0
- package/.llms/chunks/packages.api.incident-resolution.md +31 -0
- package/.llms/chunks/packages.api.observability-events.md +13 -0
- package/.llms/chunks/packages.api.overview.md +49 -0
- package/.llms/chunks/packages.api.process-operations.md +60 -0
- package/.llms/chunks/packages.api.resource-namespaces.md +20 -0
- package/.llms/chunks/packages.canvas.events.md +56 -0
- package/.llms/chunks/packages.canvas.options.md +24 -0
- package/.llms/chunks/packages.canvas.overview.md +35 -0
- package/.llms/chunks/packages.connector-gen.body-expansion.md +18 -0
- package/.llms/chunks/packages.connector-gen.catalog-reference.md +54 -0
- package/.llms/chunks/packages.connector-gen.catalogentry-type.md +21 -0
- package/.llms/chunks/packages.connector-gen.generating-from-the-catalog.md +44 -0
- package/.llms/chunks/packages.connector-gen.installation.md +42 -0
- package/.llms/chunks/packages.connector-gen.lower-level-api.md +31 -0
- package/.llms/chunks/packages.connector-gen.overview.md +16 -0
- package/.llms/chunks/packages.connector-gen.writeoptions.md +26 -0
- package/.llms/chunks/packages.core.dmn-support.md +36 -0
- package/.llms/chunks/packages.core.installation-bpmn.creatediagram-id.md +18 -0
- package/.llms/chunks/packages.core.installation-bpmn.createprocess-id-name.md +10 -0
- package/.llms/chunks/packages.core.installation-bpmn.export-definitions.md +10 -0
- package/.llms/chunks/packages.core.installation-bpmn.makeempty-processid-processname.md +11 -0
- package/.llms/chunks/packages.core.installation-bpmn.parse-xml.md +10 -0
- package/.llms/chunks/packages.core.installation-bpmn.sample_xml.md +7 -0
- package/.llms/chunks/packages.core.installation-compactify-definitions.md +13 -0
- package/.llms/chunks/packages.core.installation-expand-compact.md +13 -0
- package/.llms/chunks/packages.core.installation-layoutprocess-process.md +15 -0
- package/.llms/chunks/packages.core.installation-processbuilder-methods.md +29 -0
- package/.llms/chunks/packages.core.installation.md +11 -0
- package/.llms/chunks/packages.core.overview.md +15 -0
- package/.llms/chunks/packages.docspack.installation.md +45 -0
- package/.llms/chunks/packages.docspack.overview.md +23 -0
- package/.llms/chunks/packages.docspack.reading-it-yourself.md +34 -0
- package/.llms/chunks/packages.docspack.trust.md +13 -0
- package/.llms/chunks/packages.docspack.using-the-index-directly.md +52 -0
- package/.llms/chunks/packages.editor.basic-setup.md +41 -0
- package/.llms/chunks/packages.editor.full-editor-with-all-plugins.md +30 -0
- package/.llms/chunks/packages.editor.hud-options.md +41 -0
- package/.llms/chunks/packages.editor.overview.md +21 -0
- package/.llms/chunks/packages.engine.installation.md +77 -0
- package/.llms/chunks/packages.engine.overview.md +19 -0
- package/.llms/chunks/packages.engine.processinstance.md +17 -0
- package/.llms/chunks/packages.engine.variable-scoping.md +27 -0
- package/.llms/chunks/packages.worker-client.client.poll-jobtype-options.md +40 -0
- package/.llms/chunks/packages.worker-client.createworkerclient-options.md +32 -0
- package/.llms/chunks/packages.worker-client.job.complete-variables.md +29 -0
- package/.llms/chunks/packages.worker-client.md +33 -0
- package/.llms/chunks/packages.worker-client.oauth2-camunda-saas.md +26 -0
- package/.llms/chunks/packages.worker-client.see-also.md +7 -0
- package/.llms/manifest.json +2083 -0
- package/LICENSE +21 -0
- package/README.md +150 -0
- package/dist/build.d.ts +29 -0
- package/dist/build.js +89 -0
- package/dist/chunk.d.ts +41 -0
- package/dist/chunk.js +242 -0
- package/dist/cli.d.ts +9 -0
- package/dist/cli.js +160 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +12 -0
- package/dist/load.d.ts +27 -0
- package/dist/load.js +144 -0
- package/dist/search.d.ts +53 -0
- package/dist/search.js +104 -0
- package/dist/text.d.ts +22 -0
- package/dist/text.js +204 -0
- package/dist/types.d.ts +48 -0
- package/dist/types.js +3 -0
- package/llms.txt +174 -0
- package/package.json +76 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Claude Code Plugin — Configuration
|
|
2
|
+
|
|
3
|
+
When the plugin is enabled, Claude Code prompts for two optional values:
|
|
4
|
+
|
|
5
|
+
| Config key | Description |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `camunda_endpoint` | Camunda 8 REST API endpoint (leave blank for local Reebe) |
|
|
8
|
+
| `camunda_token` | Camunda 8 OAuth2 token (leave blank for local Reebe) |
|
|
9
|
+
|
|
10
|
+
Leave both blank to use the local [Reebe engine](/cli/reebe).
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## Skills
|
|
16
|
+
|
|
17
|
+
### `/bpmnkit:implement <description>`
|
|
18
|
+
|
|
19
|
+
The main entry point — natural language to a compiled, tested BPMN process.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
/bpmnkit:implement order fulfillment with payment and inventory check
|
|
23
|
+
/bpmnkit:implement employee onboarding process with HR approval
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Resolves connectors, writes a `ProcessPlan`, compiles it with `casen synth`, tests it,
|
|
27
|
+
scaffolds any missing workers, and asks where to deploy.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
### `/bpmnkit:extend <file> <change request>`
|
|
32
|
+
|
|
33
|
+
Extend an existing process from a natural-language change.
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
/bpmnkit:extend order-fulfillment.bpmn add a timeout boundary on the payment step
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Lifts the process to plan form (`casen plan extract`), writes a small delta plan, and
|
|
40
|
+
merges it in (`casen synth --merge`) — the summary is at the element level, not an XML diff.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### `/bpmnkit:agent [file] <description>`
|
|
45
|
+
|
|
46
|
+
Design and add a Camunda AI Agent Sub-process.
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
/bpmnkit:agent add a support-triage agent with tools: search KB (http), escalate to human (user task)
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Works out the provider/model, prompts, and tools (each mapped via connector search or an
|
|
53
|
+
existing worker job type), then compiles and mock-tests the agent step. See
|
|
54
|
+
[AI Agents](/guides/ai-agents/) for the full pattern.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### `/bpmnkit:connect <file> <step> <service>`
|
|
59
|
+
|
|
60
|
+
Wire an existing plan step to an external system via a Camunda connector template.
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
/bpmnkit:connect order-fulfillment.bpmn notify_ops slack
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### `/bpmnkit:review [file.bpmn]`
|
|
69
|
+
|
|
70
|
+
Run the full static analyzer and report deploy-readiness.
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
/bpmnkit:review
|
|
74
|
+
/bpmnkit:review order-fulfillment.bpmn
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Reports findings grouped by severity and ends with an explicit "Deploy-ready: yes/no" verdict.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
### `/bpmnkit:test [file.bpmn]`
|
|
82
|
+
|
|
83
|
+
Run scenario tests and report path/branch coverage.
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
/bpmnkit:test
|
|
87
|
+
/bpmnkit:test order-fulfillment.bpmn
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
### `/bpmnkit:deploy [file.bpmn] [--local|--camunda]`
|
|
93
|
+
|
|
94
|
+
Gate on deploy-readiness, then deploy to local Reebe or Camunda 8.
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
/bpmnkit:deploy
|
|
98
|
+
/bpmnkit:deploy order-fulfillment.bpmn --camunda
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### `/bpmnkit:instances [process-id] [--active|--failed]`
|
|
104
|
+
|
|
105
|
+
List running process instances.
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
/bpmnkit:instances
|
|
109
|
+
/bpmnkit:instances order-process --failed
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
### `/bpmnkit:incidents [--process-id X]`
|
|
115
|
+
|
|
116
|
+
List open incidents with suggested resolution actions.
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
/bpmnkit:incidents
|
|
120
|
+
/bpmnkit:incidents --process-id order-process
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
Source: https://docs.bpmnkit.com/guides/claude-code-plugin/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Claude Code Plugin
|
|
2
|
+
|
|
3
|
+
The bpmnkit Claude Code plugin adds BPMN-aware slash commands, autonomous agents, and
|
|
4
|
+
ambient quality hooks directly into Claude Code. It's **CLI-first**: every skill drives
|
|
5
|
+
`casen` via Bash — no MCP server, no proxy daemon. Every process is authored as a
|
|
6
|
+
`ProcessPlan` JSON file and compiled deterministically by `casen synth`; no skill ever
|
|
7
|
+
writes BPMN XML by hand.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Install the BPMNKit CLI globally:
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npm install -g @bpmnkit/cli
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
That's it — nothing else needs to be running.
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
### Local (development or team)
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
claude --plugin-dir ./plugins-claude/bpmnkit-claude
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Or add to your project's `.claude/settings.json`:
|
|
30
|
+
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"plugins": [
|
|
34
|
+
{ "path": "./plugins-claude/bpmnkit-claude", "scope": "project" }
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Via marketplace
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
/plugin marketplace add github:bpmnkit/monorepo
|
|
43
|
+
/plugin install bpmnkit
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
Source: https://docs.bpmnkit.com/guides/claude-code-plugin/
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Claude Code Plugin — Reference docs
|
|
2
|
+
|
|
3
|
+
Every skill reads the relevant reference doc before authoring a plan:
|
|
4
|
+
|
|
5
|
+
| File | Contents |
|
|
6
|
+
|---|---|
|
|
7
|
+
| `references/plan-format.md` | The `ProcessPlan` JSON schema + annotated, tested examples |
|
|
8
|
+
| `references/connectors.md` | The 116-template Camunda connector catalog index |
|
|
9
|
+
| `references/agentic.md` | The AI Agent Sub-process pattern, binding keys, a full example |
|
|
10
|
+
| `references/feel.md` | FEEL syntax crib sheet + the `"="`-means-expression convention |
|
|
11
|
+
| `references/modeling-style.md` | Camunda naming/structure conventions |
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Agents
|
|
17
|
+
|
|
18
|
+
### `process-builder`
|
|
19
|
+
|
|
20
|
+
Builds a complete BPMN process end-to-end from a description. Invoke directly:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
Build me an invoice approval process for accounts payable
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**What it does:**
|
|
27
|
+
|
|
28
|
+
1. Asks clarifying questions (error paths, user tasks, deploy target)
|
|
29
|
+
2. Checks domain patterns (`casen pattern list`/`get`)
|
|
30
|
+
3. Resolves connectors, writes the plan
|
|
31
|
+
4. Compiles it with `casen synth`
|
|
32
|
+
5. Shows a preview and **waits for your approval**
|
|
33
|
+
6. Tests the process, fixing failures by adjusting the plan
|
|
34
|
+
7. Scaffolds a worker stub for every job type with no connector
|
|
35
|
+
8. Gates on `casen lint --profile deploy`, then deploys to the chosen target
|
|
36
|
+
9. Reports the process ID, files created, and next steps
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
### `incident-resolver`
|
|
41
|
+
|
|
42
|
+
Triages and resolves open Camunda incidents. Invoke directly:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Investigate and resolve the open incidents
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**What it does:**
|
|
49
|
+
|
|
50
|
+
1. Fetches all open incidents (`casen incident list`)
|
|
51
|
+
2. Groups by process + error type, sorted by count
|
|
52
|
+
3. Investigates root cause per group
|
|
53
|
+
4. **Proposes a fix and waits for your approval** before executing
|
|
54
|
+
5. Executes approved fixes (retry jobs, resolve incidents, migrate instances)
|
|
55
|
+
6. Verifies the count dropped
|
|
56
|
+
7. Reports a resolution summary
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
Source: https://docs.bpmnkit.com/guides/claude-code-plugin/
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Camunda 8 Deployment — CI/CD: Deploy on Push
|
|
2
|
+
|
|
3
|
+
A typical GitHub Actions step:
|
|
4
|
+
|
|
5
|
+
```yaml
|
|
6
|
+
- name: Deploy BPMN processes
|
|
7
|
+
run: node scripts/deploy.mjs
|
|
8
|
+
env:
|
|
9
|
+
CAMUNDA_CLIENT_ID: ${{ secrets.CAMUNDA_CLIENT_ID }}
|
|
10
|
+
CAMUNDA_CLIENT_SECRET: ${{ secrets.CAMUNDA_CLIENT_SECRET }}
|
|
11
|
+
CAMUNDA_AUDIENCE: ${{ secrets.CAMUNDA_AUDIENCE }}
|
|
12
|
+
CAMUNDA_TOKEN_URL: ${{ secrets.CAMUNDA_TOKEN_URL }}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
// scripts/deploy.mjs
|
|
17
|
+
import { Bpmn } from "@bpmnkit/core";
|
|
18
|
+
import { CamundaClient } from "@bpmnkit/api";
|
|
19
|
+
import { readdir, readFile } from "node:fs/promises";
|
|
20
|
+
|
|
21
|
+
const client = new CamundaClient({
|
|
22
|
+
baseUrl: "https://api.cloud.camunda.io",
|
|
23
|
+
auth: {
|
|
24
|
+
type: "oauth2",
|
|
25
|
+
clientId: process.env.CAMUNDA_CLIENT_ID,
|
|
26
|
+
clientSecret: process.env.CAMUNDA_CLIENT_SECRET,
|
|
27
|
+
audience: process.env.CAMUNDA_AUDIENCE,
|
|
28
|
+
tokenUrl: process.env.CAMUNDA_TOKEN_URL,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const files = await readdir("./processes");
|
|
33
|
+
const resources = await Promise.all(
|
|
34
|
+
files
|
|
35
|
+
.filter((f) => f.endsWith(".bpmn"))
|
|
36
|
+
.map(async (f) => ({
|
|
37
|
+
name: f,
|
|
38
|
+
content: await readFile(`./processes/${f}`, "utf8"),
|
|
39
|
+
}))
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const result = await client.process.deploy({ resources });
|
|
43
|
+
console.log(`Deployed ${result.deployments.length} processes`);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
Source: https://docs.bpmnkit.com/guides/deployment/
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Camunda 8 Deployment — Deploying a Process
|
|
2
|
+
|
|
3
|
+
```typescript
|
|
4
|
+
import { Bpmn } from "@bpmnkit/core";
|
|
5
|
+
import { CamundaClient } from "@bpmnkit/api";
|
|
6
|
+
|
|
7
|
+
const xml = Bpmn.export(
|
|
8
|
+
Bpmn.createProcess("invoice-approval")
|
|
9
|
+
.startEvent("start")
|
|
10
|
+
.userTask("review", { name: "Review Invoice" })
|
|
11
|
+
.endEvent("end")
|
|
12
|
+
.withAutoLayout()
|
|
13
|
+
.build()
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
const result = await client.process.deploy({
|
|
17
|
+
resources: [
|
|
18
|
+
{ content: xml, name: "invoice-approval.bpmn" },
|
|
19
|
+
],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
console.log("Deployed version:", result.deployments[0]?.processDefinition?.version);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## Starting Process Instances
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
const instance = await client.process.startInstance({
|
|
30
|
+
bpmnProcessId: "invoice-approval",
|
|
31
|
+
variables: {
|
|
32
|
+
invoiceId: "inv-1234",
|
|
33
|
+
amount: 2500,
|
|
34
|
+
submittedBy: "alice@example.com",
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
console.log("Instance key:", instance.processInstanceKey);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With a Specific Version
|
|
42
|
+
|
|
43
|
+
```typescript
|
|
44
|
+
const instance = await client.process.startInstance({
|
|
45
|
+
bpmnProcessId: "invoice-approval",
|
|
46
|
+
version: 2,
|
|
47
|
+
variables: { invoiceId: "inv-5678" },
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
Source: https://docs.bpmnkit.com/guides/deployment/
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Camunda 8 Deployment — Handling Jobs
|
|
2
|
+
|
|
3
|
+
Register a long-poll job worker to process service tasks:
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
const subscription = await client.jobs.activateAndProcess({
|
|
7
|
+
type: "send-email",
|
|
8
|
+
maxJobsToActivate: 5,
|
|
9
|
+
timeout: 30_000,
|
|
10
|
+
worker: "email-service",
|
|
11
|
+
|
|
12
|
+
handler: async (job) => {
|
|
13
|
+
const { to, subject, body } = job.variables;
|
|
14
|
+
|
|
15
|
+
await sendEmail({ to, subject, body });
|
|
16
|
+
|
|
17
|
+
await client.jobs.complete({
|
|
18
|
+
jobKey: job.key,
|
|
19
|
+
variables: { sent: true, sentAt: new Date().toISOString() },
|
|
20
|
+
});
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// Stop the worker
|
|
25
|
+
subscription.close();
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Querying Instances
|
|
30
|
+
|
|
31
|
+
```typescript
|
|
32
|
+
// List running instances
|
|
33
|
+
const instances = await client.process.listInstances({
|
|
34
|
+
bpmnProcessId: "invoice-approval",
|
|
35
|
+
state: "ACTIVE",
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
// Get a specific instance
|
|
39
|
+
const instance = await client.process.getInstance({
|
|
40
|
+
processInstanceKey: "2251799813685249",
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// Get variables
|
|
44
|
+
const variables = await client.variables.list({
|
|
45
|
+
processInstanceKey: instance.key,
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
Source: https://docs.bpmnkit.com/guides/deployment/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Camunda 8 Deployment — Managing Incidents
|
|
2
|
+
|
|
3
|
+
```typescript
|
|
4
|
+
// List open incidents
|
|
5
|
+
const incidents = await client.incidents.list({
|
|
6
|
+
state: "ACTIVE",
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
// Resolve an incident (after fixing the underlying issue)
|
|
10
|
+
await client.incidents.resolve({ incidentKey: incident.key });
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## Lifecycle Events
|
|
15
|
+
|
|
16
|
+
Use the TypedEventEmitter to react to API events:
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
client.on("request", (e) => {
|
|
20
|
+
console.log(`→ ${e.method} ${e.url}`);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
client.on("response", (e) => {
|
|
24
|
+
console.log(`← ${e.status} in ${e.durationMs}ms`);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
client.on("error", (e) => {
|
|
28
|
+
metrics.increment("camunda.api.error", { url: e.url });
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
Source: https://docs.bpmnkit.com/guides/deployment/
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Camunda 8 Deployment
|
|
2
|
+
|
|
3
|
+
The `@bpmnkit/api` package is a fully-typed Camunda 8 REST API client. Use it to deploy
|
|
4
|
+
processes, start instances, and manage your cluster from Node.js scripts, backend services,
|
|
5
|
+
or CI/CD pipelines.
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Setup
|
|
9
|
+
|
|
10
|
+
### SaaS (Camunda 8 Cloud)
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { CamundaClient } from "@bpmnkit/api";
|
|
14
|
+
|
|
15
|
+
const client = new CamundaClient({
|
|
16
|
+
baseUrl: "https://api.cloud.camunda.io",
|
|
17
|
+
auth: {
|
|
18
|
+
type: "oauth2",
|
|
19
|
+
clientId: process.env.CAMUNDA_CLIENT_ID,
|
|
20
|
+
clientSecret: process.env.CAMUNDA_CLIENT_SECRET,
|
|
21
|
+
audience: process.env.CAMUNDA_AUDIENCE,
|
|
22
|
+
tokenUrl: process.env.CAMUNDA_TOKEN_URL,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Self-Managed
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
const client = new CamundaClient({
|
|
31
|
+
baseUrl: "http://localhost:8080",
|
|
32
|
+
auth: {
|
|
33
|
+
type: "bearer",
|
|
34
|
+
token: process.env.ZEEBE_TOKEN,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### No Auth (local dev)
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
const client = new CamundaClient({
|
|
43
|
+
baseUrl: "http://localhost:8080",
|
|
44
|
+
auth: { type: "none" },
|
|
45
|
+
});
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
Source: https://docs.bpmnkit.com/guides/deployment/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Gateways & Branching — Branching Inside Sub-Processes
|
|
2
|
+
|
|
3
|
+
The full gateway and branching API works inside `subProcess()` callbacks too:
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
.subProcess("handle-request", (sub) =>
|
|
7
|
+
sub
|
|
8
|
+
.startEvent("s")
|
|
9
|
+
.exclusiveGateway("route")
|
|
10
|
+
.branch("fast-path", (b) =>
|
|
11
|
+
b.condition("= priority == \"high\"")
|
|
12
|
+
.serviceTask("express", { taskType: "express-handler" })
|
|
13
|
+
.endEvent("done-fast"),
|
|
14
|
+
)
|
|
15
|
+
.branch("normal", (b) =>
|
|
16
|
+
b.defaultFlow()
|
|
17
|
+
.serviceTask("standard", { taskType: "standard-handler" })
|
|
18
|
+
.endEvent("done-normal"),
|
|
19
|
+
)
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Auto-join gateway insertion applies inside sub-processes the same way it does at the
|
|
24
|
+
top level — converging branches automatically get a matching join gateway.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
Source: https://docs.bpmnkit.com/guides/gateways/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Gateways & Branching — Exclusive Gateway (XOR)
|
|
2
|
+
|
|
3
|
+
Only one outgoing path is taken — the first branch whose condition evaluates to `true`.
|
|
4
|
+
One branch should always be the default to handle the fallthrough case:
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
import { Bpmn } from "@bpmnkit/core";
|
|
8
|
+
|
|
9
|
+
const xml = Bpmn.export(
|
|
10
|
+
Bpmn.createProcess("approval-flow")
|
|
11
|
+
.startEvent("start", { name: "Request Submitted" })
|
|
12
|
+
.userTask("review", { name: "Review Request" })
|
|
13
|
+
.exclusiveGateway("approved?", { name: "Approved?" })
|
|
14
|
+
.branch("yes", (b) =>
|
|
15
|
+
b.condition("= approved")
|
|
16
|
+
.serviceTask("notify", { taskType: "send-email", name: "Send Approval" })
|
|
17
|
+
.endEvent("done")
|
|
18
|
+
)
|
|
19
|
+
.branch("no", (b) =>
|
|
20
|
+
b.defaultFlow()
|
|
21
|
+
.endEvent("rejected", { name: "Request Rejected" })
|
|
22
|
+
)
|
|
23
|
+
.withAutoLayout()
|
|
24
|
+
.build()
|
|
25
|
+
);
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Conditions
|
|
29
|
+
|
|
30
|
+
Branch conditions are [FEEL expressions](https://docs.camunda.io/docs/components/modeler/feel/):
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
.branch("high-value", (b) =>
|
|
34
|
+
b.condition("= amount > 10000")
|
|
35
|
+
.serviceTask("manual-review", { taskType: "escalate" })
|
|
36
|
+
.endEvent("escalated")
|
|
37
|
+
)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
Source: https://docs.bpmnkit.com/guides/gateways/
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Gateways & Branching — Inclusive Gateway (OR)
|
|
2
|
+
|
|
3
|
+
One or more outgoing paths are taken based on conditions. All active paths converge at the
|
|
4
|
+
matching inclusive join:
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
.inclusiveGateway("options")
|
|
8
|
+
.branch("express", (b) =>
|
|
9
|
+
b.condition("= expressShipping").serviceTask("fedex", { taskType: "fedex-ship" })
|
|
10
|
+
)
|
|
11
|
+
.branch("gift-wrap", (b) =>
|
|
12
|
+
b.condition("= giftWrap").serviceTask("wrap", { taskType: "wrap-items" })
|
|
13
|
+
)
|
|
14
|
+
.branch("standard", (b) =>
|
|
15
|
+
b.defaultFlow().serviceTask("standard-ship", { taskType: "usps-ship" })
|
|
16
|
+
)
|
|
17
|
+
.inclusiveGateway("join")
|
|
18
|
+
.endEvent("end")
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## Event-Based Gateway
|
|
23
|
+
|
|
24
|
+
Waits for the _first_ of several events to occur, then takes that path:
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
.eventBasedGateway("wait-for-event")
|
|
28
|
+
.branch("payment", (b) =>
|
|
29
|
+
b.intermediateCatchEvent("payment-received", {
|
|
30
|
+
message: { name: "payment-confirmed", correlationKey: "= orderId" },
|
|
31
|
+
})
|
|
32
|
+
.endEvent("paid")
|
|
33
|
+
)
|
|
34
|
+
.branch("timeout", (b) =>
|
|
35
|
+
b.intermediateCatchEvent("payment-timeout", {
|
|
36
|
+
timer: { timeDuration: "PT24H" },
|
|
37
|
+
})
|
|
38
|
+
.endEvent("cancelled")
|
|
39
|
+
)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
Source: https://docs.bpmnkit.com/guides/gateways/
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Gateways & Branching — Nested Branching
|
|
2
|
+
|
|
3
|
+
Branches can contain further gateways:
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
.exclusiveGateway("route")
|
|
7
|
+
.branch("enterprise", (b) =>
|
|
8
|
+
b.condition("= tier == \"enterprise\"")
|
|
9
|
+
.parallelGateway("enterprise-split")
|
|
10
|
+
.branch("account-mgr", (b2) =>
|
|
11
|
+
b2.userTask("assign-am", { name: "Assign Account Manager" })
|
|
12
|
+
)
|
|
13
|
+
.branch("onboarding", (b2) =>
|
|
14
|
+
b2.serviceTask("kick-off", { taskType: "onboarding-kit" })
|
|
15
|
+
)
|
|
16
|
+
.parallelGateway("enterprise-join")
|
|
17
|
+
.endEvent("enterprise-done")
|
|
18
|
+
)
|
|
19
|
+
.branch("self-serve", (b) =>
|
|
20
|
+
b.defaultFlow()
|
|
21
|
+
.serviceTask("auto-setup", { taskType: "self-serve-setup" })
|
|
22
|
+
.endEvent("self-serve-done")
|
|
23
|
+
)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
Source: https://docs.bpmnkit.com/guides/gateways/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Gateways & Branching — Parallel Gateway (AND)
|
|
2
|
+
|
|
3
|
+
All outgoing paths run concurrently. A matching parallel join gateway waits for all paths
|
|
4
|
+
to complete before continuing:
|
|
5
|
+
|
|
6
|
+
```typescript
|
|
7
|
+
const xml = Bpmn.export(
|
|
8
|
+
Bpmn.createProcess("order-fulfillment")
|
|
9
|
+
.startEvent("start")
|
|
10
|
+
.parallelGateway("split")
|
|
11
|
+
.branch("warehouse", (b) =>
|
|
12
|
+
b.serviceTask("pick", { taskType: "warehouse-pick", name: "Pick Items" })
|
|
13
|
+
)
|
|
14
|
+
.branch("payment", (b) =>
|
|
15
|
+
b.serviceTask("charge", { taskType: "payment-charge", name: "Charge Card" })
|
|
16
|
+
)
|
|
17
|
+
.parallelGateway("join") // waits for all branches
|
|
18
|
+
.serviceTask("ship", { taskType: "shipping", name: "Ship Order" })
|
|
19
|
+
.endEvent("end")
|
|
20
|
+
.withAutoLayout()
|
|
21
|
+
.build()
|
|
22
|
+
);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
Source: https://docs.bpmnkit.com/guides/gateways/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Pattern Library — How matching works
|
|
2
|
+
|
|
3
|
+
`casen pattern get <query>` (via `findPattern()`) scores each pattern by counting how
|
|
4
|
+
many of its keywords appear in the request. The highest-scoring pattern is selected.
|
|
5
|
+
Exact pattern ID matches take priority over keyword scoring.
|
|
6
|
+
|
|
7
|
+
Examples:
|
|
8
|
+
|
|
9
|
+
| Request | Matched pattern |
|
|
10
|
+
|---|---|
|
|
11
|
+
| "invoice approval workflow" | `invoice-approval` |
|
|
12
|
+
| "employee onboarding with Okta and Jira" | `employee-onboarding` |
|
|
13
|
+
| "on-call incident escalation" | `incident-response` |
|
|
14
|
+
| "custom blockchain process" | _(no match — Claude works from scratch)_ |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
Source: https://docs.bpmnkit.com/guides/patterns/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Pattern Library
|
|
2
|
+
|
|
3
|
+
The pattern library (`@bpmnkit/patterns`) provides domain knowledge for common business
|
|
4
|
+
processes. When you run `/bpmnkit:implement`, Claude checks the library for a matching
|
|
5
|
+
pattern (`casen pattern list`/`get`) and uses its readme and worker specs as context while
|
|
6
|
+
writing the `ProcessPlan` — the pattern's own `template` field predates the plan/synth
|
|
7
|
+
pipeline and is a rough structural reference, not something pasted in directly.
|
|
8
|
+
|
|
9
|
+
Patterns are hints, not templates. Claude adapts them to the specific request and ignores
|
|
10
|
+
them entirely when nothing relevant matches.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Available patterns
|
|
14
|
+
|
|
15
|
+
| Pattern ID | Domain | Typical use |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| `invoice-approval` | Finance / accounts payable | Multi-level invoice review and ERP payment trigger |
|
|
18
|
+
| `employee-onboarding` | HR | Account provisioning, orientation scheduling, system access |
|
|
19
|
+
| `supplier-contract-review` | Procurement / legal | Contract classification, risk scan, CLM storage, e-signature |
|
|
20
|
+
| `incident-response` | IT / ops | Severity classification, on-call paging, post-mortem creation |
|
|
21
|
+
| `loan-origination` | Financial services | Identity verification, credit check, risk scoring, disbursement |
|
|
22
|
+
| `content-moderation` | Trust & safety | AI scan, action enforcement, CSAM reporting, user notification |
|
|
23
|
+
| `order-fulfillment` | E-commerce / supply chain | Inventory validation, payment, warehouse order, shipment tracking |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
Source: https://docs.bpmnkit.com/guides/patterns/
|