jmix icon indicating copy to clipboard operation
jmix copied to clipboard

Dynamic Attributes support in BPM process form

Open tmusin opened this issue 6 months ago • 1 comments

Environment

Jmix version: <2.6.1>

Bug Description

Saved dynamic attribute values are empty on BPM process form.

Steps To Reproduce

  1. Open and run the provided project
  2. Start "Test" process definition, then in My Tasks section open "Do Work" task.
  3. Input some values to all fields, set IsPersonalDoc to true. Submit.
  4. 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

tmusin avatar Aug 20 '25 13:08 tmusin

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;

Flaurite avatar Nov 20 '25 09:11 Flaurite