jmix
jmix copied to clipboard
Dynamic Attributes support in BPM process form
Environment
Jmix version: <2.6.1>
Bug Description
Saved dynamic attribute values are empty on BPM process form.
Steps To Reproduce
- Open and run the provided project
- Start "Test" process definition, then in My Tasks section open "Do Work" task.
- Input some values to all fields, set IsPersonalDoc to true. Submit.
- Open "Check Work" task.
Current Behavior
Dynamic attributes ownerName and IsPersonalDoc are empty.
Expected Behavior
Dynamic attributes ownerName and IsPersonalDoc are filled with values from previous User Task.
Sample Project
sample.zip from forum
Changes
BPM provides additional annotation for @ProcessVariable:
-
@ProcessVariableParam
This annotation is represented by two parameters: key and value. Now, it is possible provide additional configuration to process variable. For now, supported only one boolean parameter: "loadDynAttr".
To load dynamic attributes for entity process variable use the following code:
@ProcessVariable(name = "documentVar", params = {
@ProcessVariableParam(key = ProcessVariableConstants.LOAD_DYN_ATTR_PARAM, value = "true")})
private Document documentVar;