@bpmnkit/connectors
v1.3.1
Published
Camunda 8 out-of-the-box connector catalog and deterministic element-template application for @bpmnkit/core
Maintainers
Readme
Website · Documentation · GitHub · Changelog
Core tier. Semver at 1.0: nothing breaks without a major release. See product tiers.
Overview
@bpmnkit/connectors bundles the 130+ Camunda 8 out-of-the-box connector element templates (Slack, SendGrid, HTTP, Kafka, AWS, the agentic-AI family, and more) and applies them to @bpmnkit/core builder options deterministically — every binding kind (zeebe:input, zeebe:output, zeebe:taskHeader, zeebe:taskDefinition, zeebe:property, zeebe:adHoc, zeebe:agentDefinition), dropdown-gated conditions, required-field validation, and FEEL parse-checking on FEEL-tagged values.
Features
- Full connector catalog — search and inspect all bundled Camunda 8 OOTB templates
- Complete binding resolution — including
zeebe:propertyandzeebe:output, which naive appliers drop - Required-field and FEEL validation — problems are reported, never silently swallowed
- Works with any template — bundled catalog or a custom/generated
ElementTemplate - Inbound connectors and linked resources —
applyTemplateToElementwrites a template onto an element of a parsed model: the rootbpmn:messageand itszeebe:subscriptioncorrelation key,zeebe:properties,zeebe:linkedResourcesand thezeebe:modelerTemplatestamps - Templates BPMN Kit maintains —
BPMNKIT_CONNECTOR_TEMPLATESadds services Camunda ships no connector for, on the REST connector, e.g. Cloudflare Clef decision models (io.bpmnkit.connectors.CloudflareClef.v1)
The catalog and application logic live in @bpmnkit/core/connectors, whose templates leave out icons, groups, tooltips and placeholders to stay small. This package re-exports that API and adds those parts back, so getTemplate and applyConnectorTemplate answer with the full template. Use it in an editor or property panel, and the core subpath where a bundle should stay small.
Installation
npm install @bpmnkit/connectorsQuick Start
import { Bpmn } from "@bpmnkit/core"
import { applyConnectorTemplate, searchConnectors } from "@bpmnkit/connectors"
const [slack] = searchConnectors("slack")
const result = applyConnectorTemplate(slack.id, {
method: "chat.postMessage",
token: "{{secrets.SLACK_OAUTH_TOKEN}}",
"data.channel": "#ops",
"data.text": "=\"Order \" + orderId + \" failed validation\"",
})
if (result.problems.length > 0) throw new Error(result.problems[0].message)
const defs = Bpmn.createProcess("proc")
.startEvent("s")
.serviceTask("notify", result.serviceTask!)
.endEvent("e")
.build()Inbound connectors
An inbound connector's message and correlation key live on a root bpmn:message, which builder
options cannot reach. Apply the template to an element of a parsed model instead:
import { Bpmn } from "@bpmnkit/core"
import { applyTemplateToElement, getTemplate } from "@bpmnkit/connectors"
const webhook = getTemplate("io.camunda.connectors.webhook.WebhookConnectorIntermediate.v1")!
const { definitions, problems } = applyTemplateToElement(Bpmn.parse(xml), "payment-received", webhook, {
"inbound.context": "payments",
"message.correlationKey": "=orderId",
correlationKeyExpression: "=request.body.orderId",
})
const updated = Bpmn.export(definitions)Your project's own templates
Drop element templates in .camunda/element-templates/ and they join the bundled catalogue —
no project configuration, no registration step. A template nearer the diagram wins over one at
the project root, which wins over the bundled version of the same id.
import { registerElementTemplates } from "@bpmnkit/connectors"
import { discoverElementTemplates } from "@bpmnkit/connectors/node"
const { templates, problems } = await discoverElementTemplates({
from: "processes/orders/order.bpmn",
root: process.cwd(),
})
registerElementTemplates(templates)
// `problems` names every template that was rejected, and why — nothing is dropped silently.The filesystem half lives behind @bpmnkit/connectors/node, so the main entry stays
importable in a browser: a studio or a viewer takes templates from its host instead.
Validate them in CI with casen connector validate.
API Reference
function listConnectors(): ConnectorSummary[]
function searchConnectors(query: string): ConnectorSummary[]
function getTemplate(id: string): ElementTemplate | undefined
function registerElementTemplates(templates: readonly ElementTemplate[]): void
function clearRegisteredTemplates(): void
function validateElementTemplate(value: unknown): TemplateValidation
function readTemplateDocument(value: unknown): TemplateDocumentResult
function applyConnectorTemplate(templateId: string, values?: Record<string, string>): ApplyResult
function applyElementTemplate(template: ElementTemplate, values?: Record<string, string>): ApplyResult
function applyTemplateToElement(
definitions: BpmnDefinitions,
elementId: string,
template: ElementTemplate,
values?: Record<string, string>,
): ApplyToElementResult // { definitions, problems } — the input is never mutated
// @bpmnkit/connectors/node
function discoverElementTemplates(options: DiscoverOptions): Promise<DiscoveryResult>
function collectElementTemplates(options: { root: string; configFolder?: string }): Promise<DiscoveryResult>
interface ApplyResult {
serviceTask?: ServiceTaskOptions
adHocSubProcess?: Partial<AdHocSubProcessOptions>
startEvent?: Partial<StartEventOptions>
boundaryEvent?: Partial<BoundaryEventOptions>
intermediateEvent?: Partial<IntermediateCatchEventOptions>
problems: ApplyProblem[]
}Related Packages
| Package | Description |
|---------|-------------|
| @bpmnkit/core | BPMN/DMN/Form parser, builder, layout engine |
| @bpmnkit/canvas | Zero-dependency SVG BPMN viewer |
| @bpmnkit/editor | Full-featured interactive BPMN editor |
| @bpmnkit/engine | Lightweight BPMN process simulator for tests and demos |
| @bpmnkit/feel | FEEL expression language parser & evaluator |
| @bpmnkit/plugins | 34 composable canvas plugins |
| @bpmnkit/api | Camunda 8 REST API TypeScript client |
| @bpmnkit/ascii | Render BPMN diagrams as Unicode ASCII art |
| @bpmnkit/markdown | BPMN diagrams in Markdown — remark, markdown-it and README pre-rendering |
| @bpmnkit/docspack | BPMN Kit docs as an offline docspack package for AI agents |
| @bpmnkit/camunda-docspack | Camunda 8 docs as an offline docspack package for AI agents |
| @bpmnkit/ui | Shared design tokens and UI components |
| @bpmnkit/profiles | Shared auth, profile storage, and client factories for CLI & proxy |
| @bpmnkit/operate | Monitoring & operations frontend for Camunda clusters |
| @bpmnkit/connector-gen | Generate connector templates from OpenAPI specs |
| @bpmnkit/cli | Camunda 8 command-line interface (casen) |
| @bpmnkit/proxy | Local AI bridge and Camunda API proxy server |
| @bpmnkit/patterns | Domain process patterns for BPMNKit AIKit |
| @bpmnkit/reebe-wasm | WebAssembly BPMN engine for browser simulation |
| @bpmnkit/worker-client | Thin Zeebe REST client for standalone workers |
| @bpmnkit/flow | Code-first durable flows that derive BPMN, job types and workers |
| @bpmnkit/user-tasks | Embeddable user task widget for Camunda 8 |
| @bpmnkit/cli-sdk | Plugin authoring SDK for the casen CLI |
| @bpmnkit/create-casen-plugin | Scaffold a new casen CLI plugin in seconds |
| @bpmnkit/casen-report | HTML reports from Camunda 8 incident and SLA data |
| @bpmnkit/casen-worker-http | Example HTTP worker plugin — completes jobs with live JSONPlaceholder API data |
| @bpmnkit/casen-worker-ai | AI task worker — classify, summarize, extract, and decide using Claude |
