bpmn-js-signavio-compat
raw JSON → 1.2.3 verified Fri May 01 auth: no javascript
A Signavio compatibility layer for bpmn-js, enabling interoperability with diagrams exported from Signavio. Current stable version is 1.2.3, with irregular releases as needed. It adds support for Signavio-specific sub-process expand/collapse behavior. Key differentiators: it is the official compatibility module from the bpmn-io team, designed to work with multiple bpmn-js major versions (1.x through 8.x). Requires a transpiler for use. Lightweight plugin that adds a single feature without altering the core bpmn-js library.
Common errors
error Error: No provider for "bpmn-js-signavio-compat"! ↓
cause Missing or incorrect import/require syntax.
fix
Ensure you are using the correct import: import signavioCompatModule from 'bpmn-js-signavio-compat'; or const signavioCompatModule = require('bpmn-js-signavio-compat').default;
error Module not found: Can't resolve 'bpmn-js-signavio-compat' ↓
cause Package not installed or missing in node_modules.
fix
Run npm install bpmn-js-signavio-compat or yarn add bpmn-js-signavio-compat.
error TypeError: signavioCompatModule is not a function ↓
cause Using the module incorrectly, e.g., trying to call it as a function instead of passing as an additional module.
fix
Do not invoke the module; pass it directly to additionalModules array as an object.
error Unexpected token 'export' ↓
cause ES6+ syntax not transpiled; environment does not support ES modules.
fix
Use a transpiler like Babel to compile your code, or switch to CommonJS with require('.default').
Warnings
gotcha Requires a transpiler (e.g., Babel) to use because it relies on ES modules and may use modern syntax. ↓
fix Set up Babel or similar to transpile node_modules if not already configured.
deprecated The package only provides a single feature (sub-process expand/collapse) and may not cover all Signavio-specific behaviors. ↓
fix Check the Signavio compatibility manually for other features; consider contributing or filing issues.
gotcha Using require() in CommonJS without .default will yield an object with the actual module as default property, leading to errors when passed as additionalModule. ↓
fix Use require('bpmn-js-signavio-compat').default or switch to ES import syntax.
Install
npm install bpmn-js-signavio-compat yarn add bpmn-js-signavio-compat pnpm add bpmn-js-signavio-compat Imports
- signavioCompatModule wrong
const signavioCompatModule = require('bpmn-js-signavio-compat');correctimport signavioCompatModule from 'bpmn-js-signavio-compat'; - signavioCompatModule wrong
var signavioCompatModule = require('bpmn-js-signavio-compat');correctvar signavioCompatModule = require('bpmn-js-signavio-compat').default; - import signavioCompatModule from 'bpmn-js-signavio-compat' wrong
import { signavioCompatModule } from 'bpmn-js-signavio-compat';correctimport signavioCompatModule from 'bpmn-js-signavio-compat';
Quickstart
import Modeler from 'bpmn-js/lib/Modeler';
import signavioCompatModule from 'bpmn-js-signavio-compat';
const modeler = new Modeler({
container: '#container',
additionalModules: [
signavioCompatModule
]
});
// Load a Signavio-exported diagram
fetch('https://example.com/diagram.bpmn')
.then(res => res.text())
.then(diagramXML => modeler.importXML(diagramXML))
.catch(err => console.error(err));