Mapping process variables defines how data is passed between a process and other models used within that process, such as forms, connectors, scripts, and decision tables.
Mapping is configured on BPMN elements, including user tasks, service tasks, and script tasks. It determines how process variables are exchanged with inputs and outputs of these elements.
Process variable mapping is divided into two types:
- Input mapping defines how data is passed from process variables to another model within the process (for example, sending form input values to a decision table).
- Output mapping defines how data from a model is returned to process variables (for example, storing a decision result for use later in the process).
These mappings control the flow of data between process steps and ensure that required values are available at each stage.
Mappings are saved as part of the process configuration and are associated with the specific BPMN element. They are stored using the element identifier in the Extensions Editor.
If no variables are mapped, the element does not appear in the mapping configuration.
The following options are available for the Mapping behavior:
| Mapping type | Description |
|---|---|
| Don't map variables | No data is passed between the process and the model. |
| Map variables | Lets you explicitly define how inputs and outputs are mapped by assigning them manually. |
| Map input variables | Automatically maps process variables to model inputs when names match. |
| Map output variables | Automatically maps model outputs to process variables when names match. |
| Map all variables | Automatically maps both inputs and outputs when names match. |
The following is an example of explicitly mapping variables:
"mappings": {
"Task_1f1wpht": {
"inputs": {
"flavor": {
"type": "variable",
"value": "choice"
},
"price": {
"type": "value",
"value": "${lookUp.price}"
},
"Limit": {
"type": "value",
"value": 200
}
}
}
},
}