An util for bpmn-js to extract Camunda BPM process variables from a BPMN 2.0 diagram.
Installation
$ npm i --save @bpmn-io/extract-process-variables
Usage
Camunda Platform 7
Given this example diagram
import {
getProcessVariables,
getVariablesForScope,
} from '@bpmn-io/extract-process-variables';
const canvas = modeler.get('canvas');
const rootElement = canvas.getRootElement();
const allVariables = getProcessVariables(rootElement.businessObject);
const scopeVariables = getVariablesForScope('Process_1', rootElement.businessObject);
Note that origin
and scope
retrieves the full moddle element. The example outputs are reduced due to better readibility.
Note that camunda-bpmn-moddle or zeebe-bpmn-moddle descriptors have to be installed.
Properties support
Camunda Platform 7
We are currently extracting process variables from the following diagram properties
camunda:formField
camunda:outputParameter
camunda:out
camunda:resultVariable
camunda:errorCodeVariable
camunda:errorMessageVariable
camunda:escalationCodeVariable
Camunda Platform 8
We are currently extracting process variables from the following diagram properties
zeebe:input
zeebe:output
zeebe:loopCharacteristics > inputElement
zeebe:loopCharacteristics > outputCollection
zeebe:calledDecision > resultVariable
zeebe:script > resultVariable
See also
License
MIT