jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
559 stars 118 forks source link

BPM: Jmix form params equals NULL when the form is opened in Navigate mode #3453

Closed stasmakarov closed 2 weeks ago

stasmakarov commented 2 months ago

Environment

Jmix version: 2.3.0

Bug Description

When Jmix view process form has parameters, for example params = { @Param(name = "variableName"), @Param(name = "entityPickerCaption") }

and a form is opened in 'Navigate' mode (This tab), values of the parameters are equal NULL

Steps To Reproduce

  1. Create a process:

    image
  2. Set Task 1 properties:

    image
  3. Create Jmix view form with parameters (see attached file)

  4. Set Task 2 properties -- the same like Task 1, but Open mode = This tab:

    image
  5. Deploy the process

Current Behavior

  1. Start the process

  2. Open Task 1 -- params values are OK:

    image
  3. Open Task 2 params are nulls:

    image

When using params in code, it will cause NPE.

Expected Behavior

Parameters are passed from the form properties, not nulls.

QA notes

The problem also exists for the start form and a fix has been done for this case as well.

mbucan commented 2 months ago

Please check implementations of openStartProcessForm and openTaskProcessForm of the io.jmix.bpmflowui.processform.ProcessFormViews interface, and their usage in StartProcessView and InputDialogTaskProcessForm.

When I move from 2.2.3 to 2.3, I get problems with opening, probably due to the breaking changes "Navigation Requires Origin View" and "Navigation to BPM Process Forms" and I think this is related because the process forms are "navigate" and "this tab".

Kind regards, Mladen

konyashkina commented 2 weeks ago

Tested on Jmix version: 2.3.999-SNAPSHOT Jmix Studio plugin version: 2.3.SNAPSHOT6714-241 IntelliJ version: IntelliJ IDEA 2024.1.1