camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 476 forks source link

Change sequence in Script Task Script section #3495

Closed ingorichtsmeier closed 1 year ago

ingorichtsmeier commented 1 year ago

What should we do?

Change the sequence of the fields FEEL expression and Result variable in a Script task implemented as a FEEL expression.

They should be Result variable and then FEEL expression.

Why should we do it?

I've modeled a process for Zeebe 8.0 where all tasks were implemented by Service Tasks just with an Output mapping. The task worker was a NOOP-worker and used only to complete the task.

Here, the business logic in the modeler looks like this:

grafik

It's common to most programming language to read the expression like let a = b; (or Setze RVSATZAN = 0,093 in german).

As Zeebe 8.2 supports a FEEL, I want to switch my Service Tasks to Script tasks to get rid of my service task worker.

Now, using the section Script, the sequence of the fields are switched. First the expression, then the variable:

grafik

This is confusing and lacks the readability.

Keep it consistent with an output mapping.

marstamm commented 1 year ago

Hi @ingorichtsmeier , thank you for reporting. I agree, it is confusing and does not make sense.

As this is an easy fix and will impact users with the 8.2 release, I'll move it to ready to be picked up in the next planning

nikku commented 1 year ago

Spot on find @ingorichtsmeier. Kudos!

marstamm commented 1 year ago

where is the file that produces this view

Why does the file matter? You can just create a Script Task with FEEL expression implementation in Modeler 5.8.0 to reproduce the issue described here

ingorichtsmeier commented 1 year ago

Hi @stephengarn, the repo with the process model is here: https://github.com/camunda-consulting/lohnsteuer-pap

The process model with the script tasks itself is on this branch: https://github.com/camunda-consulting/lohnsteuer-pap/blob/feel-script-tasks/src/main/resources/mpara-unterprozess.bpmn