Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use the same input/output element in multi-instance #4687

Closed
korthout opened this issue Jun 9, 2020 · 4 comments · Fixed by #9947
Closed

Unable to use the same input/output element in multi-instance #4687

korthout opened this issue Jun 9, 2020 · 4 comments · Fixed by #9947
Assignees
Labels
area/ux Marks an issue as related to improving the user experience kind/bug Categorizes an issue or PR as a bug scope/broker Marks an issue or PR to appear in the broker section of the changelog severity/mid Marks a bug as having a noticeable impact but with a known workaround version:1.3.14 Marks an issue as being completely or in parts released in 1.3.14 version:8.1.0-alpha5 Marks an issue as being completely or in parts released in 8.1.0-alpha5 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0

Comments

@korthout
Copy link
Member

korthout commented Jun 9, 2020

Describe the bug
Although undocumented, zeebe currently does not support referring to the same variable in the input element and the output element of a multi-instance element.

This is likely due to the nil initialisation of the output element variable (in the case that the output element expression is either a variable name or the name of a property of a variable).

To Reproduce

  • deploy https://gist.github.com/korthout/2038aae67d9692d5d7776e17a50d5ea9
  • create instance: zbctl create instance Process_0ci0xjm --variables='{"Book":{"Title":"My Book","pages":[{"PageNumber":1,"IsRead":false},{"PageNumber":2,"IsRead":false}]}}'
  • an incident is raised: "failed to evaluate expression '{page:{PageNumber:page.PageNumber,isRead:true}}': expected Context or List of Contextes but found 'ValNull'"

Expected behavior
In the above case, I expect the variable page:

  • to be initialised to an element of the input collection, at the start of the multi-instance body;
  • to be changed by the service task;
  • to be collected into the output collection variable (i.e. pages) at the end of the multi-instance body.

Environment:

  • OS: macOS 10.15.5
  • Zeebe Version: 0.24.0-alpha2 (probably also 0.23.2)
  • Configuration: hazelcast-exporter 0.9.0 and simple monitor 0.19.0
@korthout korthout added the kind/bug Categorizes an issue or PR as a bug label Jun 9, 2020
@korthout
Copy link
Member Author

korthout commented Jun 9, 2020

Workaround is available: use different variable names for input and output element.

@korthout korthout added Impact: Usability scope/broker Marks an issue or PR to appear in the broker section of the changelog severity/low Marks a bug as having little to no noticeable impact for the user and removed Status: Needs Triage labels Jun 9, 2020
@korthout
Copy link
Member Author

Closed in favor of duplicate but up-to-date #7330

@korthout
Copy link
Member Author

korthout commented Jun 22, 2021

Reopened, because it's not the same case #7330. That issue was related to the output collection expression hiding the input collection variable.

In this issue, the output element is NIL initialized after the input element is created. If they have the same name, the just created input element variable is overwritten (UPDATED) to NIL. Either it shouldn't be updated if it refers to the same element, or the NIL initialization should happen before the input element variable is created.

@korthout korthout reopened this Jun 22, 2021
@npepinpe npepinpe added this to Planned in Zeebe Jun 23, 2021
@npepinpe npepinpe removed this from Planned in Zeebe Oct 19, 2021
@npepinpe npepinpe added area/ux Marks an issue as related to improving the user experience and removed Impact: Usability labels Apr 11, 2022
@korthout korthout added severity/mid Marks a bug as having a noticeable impact but with a known workaround and removed severity/low Marks a bug as having little to no noticeable impact for the user labels Jul 8, 2022
@korthout
Copy link
Member Author

korthout commented Jul 8, 2022

Sev should be mid, it has a noticeable impact but a workaround is available.
I was also able to reproduce this on 8.0.4, so the bug still exists

zeebe-bors-camunda bot added a commit that referenced this issue Aug 2, 2022
9957: [Backport stable/1.3] Don't overwrite local multi-instance variables r=korthout a=backport-action

# Description
Backport of #9947 to `stable/1.3`.

relates to #4687

Co-authored-by: Nico Korthout <nico.korthout@camunda.com>
zeebe-bors-camunda bot added a commit that referenced this issue Aug 2, 2022
9958: [Backport stable/8.0] Don't overwrite local multi-instance variables r=korthout a=backport-action

# Description
Backport of #9947 to `stable/8.0`.

relates to #4687

Co-authored-by: Nico Korthout <nico.korthout@camunda.com>
@saig0 saig0 added release/8.0.8 version:1.3.14 Marks an issue as being completely or in parts released in 1.3.14 labels Sep 1, 2022
@Zelldon Zelldon added the version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0 label Oct 4, 2022
github-merge-queue bot pushed a commit that referenced this issue Mar 14, 2024
* style: convert variable panel tabs to carbon

* test: add panel header test back

* refactor: add undefined check for first tab

* refactor: use default layer color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ux Marks an issue as related to improving the user experience kind/bug Categorizes an issue or PR as a bug scope/broker Marks an issue or PR to appear in the broker section of the changelog severity/mid Marks a bug as having a noticeable impact but with a known workaround version:1.3.14 Marks an issue as being completely or in parts released in 1.3.14 version:8.1.0-alpha5 Marks an issue as being completely or in parts released in 8.1.0-alpha5 version:8.1.0 Marks an issue as being completely or in parts released in 8.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants