camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.

Home Page:https://camunda.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Form field won't be provided as a process variable when it is referenced as the business-key in a generated task form

timstawowski opened this issue · comments

Environment (Required on creation)

  • Camunda-BPM-EE: v7.20.4
  • Camunda Modeler: v5.22

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

When starting a process via Tasklist which has a form type "Generated Task Forms" on the start-event, a created form field which is also used as the business-key won't be provided as a process variable.

Steps to reproduce (Required on creation)

  1. Create a C7 .bpmn file, like:
    missing_process_variable
  2. Deploy the process.
  3. Start process via Tasklist.
  4. Created form field will be used as business-key but will not create a process-variable.

Observed Behavior (Required on creation)

  • When another form field is created, the new form field will produce a process-variable.
  • When the business-key attribute is unset, all form fields will be populated as a process variable.

Expected behavior (Required on creation)

All created form fields will be provided as a process-variable, regardless if one of them is also referenced as the business-key.

Root Cause (Required on prioritization)

Solution Ideas

Hints

The XML produced by the Camunda Modeler looks fine. So I assume this has to be something to do with the engine.

Links

Breakdown

Pull Requests

No tasks being tracked yet.

Dev2QA handover

  • Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment

Hi @timstawowski,

Not adding a variable to the scope when the form field is referenced as business key is expected behavior since the data would be redundantly available in the process.

As a workaround in your case, can you set the business key as a variable via execution listener?

If not, I see your desired behavior as a feature request, and we would need to make this configurable.

Best,
Tassilo

Hi @tasso94,

thanks for your reply. Sorry, I didn't know about this being working as expected. I find it a bit confusing to be honest, because the modeler as well tells me that I can expect the form field as process variable, even when it is referenced as the business-key.

process_variable_a

I get the point of trying to avoid duplicate data, but in my opinion the business-key configuration should not have any impact of the availability of a process variable.

Hi @timstawowski,

We got feedback in the past from other users that the current behavior is expected.
See https://jira.camunda.com/browse/CAM-7551

The guidance of the Camunda Modeler may not be helpful in this case. Do you want to bring this up with the Modeler team? https://github.com/camunda/camunda-modeler/issues/new?assignees=&labels=bug&projects=&template=BUG_REPORT.yml

Best,
Tassilo

Hey @tasso94,

thanks for the links and yes I will hand this over to the Modeler team.
I will close that issue.