camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.03k stars 1.53k forks source link

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

Closed timstawowski closed 2 months ago

timstawowski commented 2 months ago

Environment (Required on creation)

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)

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

Dev2QA handover

tasso94 commented 2 months ago

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

timstawowski commented 2 months ago

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.

tasso94 commented 2 months ago

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

timstawowski commented 2 months ago

Hey @tasso94,

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