ObjectStackObjectStack

Bpmn Interop

Bpmn Interop protocol schemas

@module automation/bpmn-interop

BPMN XML Interoperability Protocol

Defines the specification for importing and exporting BPMN 2.0 XML

process definitions. This enables interoperability with external BPM

tools (Camunda, Activiti, jBPM, etc.) via a plugin-based approach.

Priority: Low — long-term planning, not a core requirement.

Source: packages/spec/src/automation/bpmn-interop.zod.ts

TypeScript Usage

import { BpmnDiagnostic, BpmnElementMapping, BpmnExportOptions, BpmnImportOptions, BpmnInteropResult, BpmnUnmappedStrategy, BpmnVersion } from '@objectstack/spec/automation';
import type { BpmnDiagnostic, BpmnElementMapping, BpmnExportOptions, BpmnImportOptions, BpmnInteropResult, BpmnUnmappedStrategy, BpmnVersion } from '@objectstack/spec/automation';

// Validate data
const result = BpmnDiagnostic.parse(data);

BpmnDiagnostic

Diagnostic message from BPMN import/export

Properties

PropertyTypeRequiredDescription
severityEnum<'info' | 'warning' | 'error'>Diagnostic severity
messagestringDiagnostic message
bpmnElementIdstringoptionalBPMN element ID related to this diagnostic
nodeIdstringoptionalObjectStack node ID related to this diagnostic

BpmnElementMapping

Mapping between BPMN XML element and ObjectStack FlowNodeAction

Properties

PropertyTypeRequiredDescription
bpmnTypestringBPMN XML element type (e.g., "bpmn:parallelGateway")
flowNodeActionstringObjectStack FlowNodeAction value
bidirectionalbooleanWhether the mapping supports both import and export
notesstringoptionalNotes about mapping limitations

BpmnExportOptions

Options for exporting an ObjectStack flow as BPMN 2.0 XML

Properties

PropertyTypeRequiredDescription
versionEnum<'2.0' | '2.0.2'>Target BPMN specification version
includeLayoutbooleanInclude BPMN DI layout data from canvas positions
includeExtensionsbooleanInclude ObjectStack extensions in BPMN extensionElements
customMappingsObject[]optionalCustom element mappings for export
prettyPrintbooleanPretty-print XML output with indentation
namespacePrefixstringXML namespace prefix for BPMN elements

BpmnImportOptions

Options for importing BPMN 2.0 XML into an ObjectStack flow

Properties

PropertyTypeRequiredDescription
unmappedStrategyEnum<'skip' | 'warn' | 'error' | 'comment'>How to handle unmapped BPMN elements
customMappingsObject[]optionalCustom element mappings to override or extend defaults
importLayoutbooleanImport BPMN DI layout positions into canvas node coordinates
importDocumentationbooleanImport BPMN documentation elements as node descriptions
flowNamestringoptionalOverride flow name (defaults to BPMN process name)
validateAfterImportbooleanValidate imported flow against FlowSchema after import

BpmnInteropResult

Result of a BPMN import/export operation

Properties

PropertyTypeRequiredDescription
successbooleanWhether the operation completed successfully
diagnosticsObject[]Diagnostic messages from the operation
mappedCountintegerNumber of elements successfully mapped
unmappedCountintegerNumber of elements that could not be mapped

BpmnUnmappedStrategy

Strategy for unmapped BPMN elements during import

Allowed Values

  • skip
  • warn
  • error
  • comment

BpmnVersion

BPMN specification version for export

Allowed Values

  • 2.0
  • 2.0.2

On this page