
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
@bpmn-io/extract-process-variables
Advanced tools
A util for bpmn-js to extract Camunda BPM process variables from a BPMN 2.0 diagram.
An util for bpmn-js to extract Camunda BPM process variables from a BPMN 2.0 diagram.
$ npm i --save @bpmn-io/extract-process-variables
Given this example diagram
import {
getProcessVariables,
getVariablesForScope,
} from '@bpmn-io/extract-process-variables';
// For Camunda Platform 8 diagrams, use the /zeebe submodule
// import {
// getProcessVariables,
// getVariablesForScope,
// } from '@bpmn-io/extract-process-variables/zeebe';
const canvas = modeler.get('canvas');
const rootElement = canvas.getRootElement();
const allVariables = getProcessVariables(rootElement.businessObject);
/*
[
{
"name": "variable1",
"origin": [ "Task_1" ],
"scope": "Process_1"
},
{
"name": "variable2",
"origin": [ "Task_1" ],
"scope": "Process_1"
},
{
"name": "variable3",
"origin": [ "Task_2" ],
"scope": "SubProcess_1"
}
]
*/
const scopeVariables = getVariablesForScope('Process_1', rootElement.businessObject);
/*
[
{
"name": "variable1",
"origin": [ "Task_1" ],
"scope": "Process_1"
},
{
"name": "variable2",
"origin": [ "Task_1" ],
"scope": "Process_1"
}
]
*/
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.
We are currently extracting process variables from the following diagram properties
camunda:formFieldcamunda:outputParametercamunda:outcamunda:resultVariablecamunda:errorCodeVariablecamunda:errorMessageVariablecamunda:escalationCodeVariableWe are currently extracting process variables from the following diagram properties
zeebe:inputzeebe:outputzeebe:loopCharacteristics > inputElementzeebe:loopCharacteristics > outputCollectionzeebe:calledDecision > resultVariablezeebe:script > resultVariableMIT
1.0.1
FIX: correct script task output mapping (#30)FAQs
A util for bpmn-js to extract Camunda BPM process variables from a BPMN 2.0 diagram.
The npm package @bpmn-io/extract-process-variables receives a total of 17,305 weekly downloads. As such, @bpmn-io/extract-process-variables popularity was classified as popular.
We found that @bpmn-io/extract-process-variables demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 10 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.