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

[Backport stable/1.3] Don't overwrite local multi-instance variables #9957

Merged
merged 5 commits into from
Aug 2, 2022

Conversation

backport-action
Copy link
Collaborator

Description

Backport of #9947 to stable/1.3.

relates to #4687

When the output element expression is a variable (or a nested property
of a variable) then it needs to be nil initialized, to make sure that
the variable exists at the local scope.

However, when the output element expression refers to the same variable
as the input element, then it shouldn't overwrite this variable. Note
that the input variable is already created at the local scope.

This adds a test case that fails if the output element variable is nil
initialized when it refers to the same variable as the input element.

(cherry picked from commit 75f567e)
When the output element expression is a variable (or a nested property
of a variable) then it needs to be nil initialized, to make sure that
the variable exists at the local scope.

However, when the output element expression refers to the same variable
as the input element, then it shouldn't overwrite this variable. Note
that the input variable is already created at the local scope.

We can simply filter out this case, and only nil init the other output
element variables.

(cherry picked from commit 1377cd6)
The zeebe extension property Output Element must be an expression. The
method only exists to allow a test case that rejects a process when the
output element is a static value.

(cherry picked from commit debacc7)
When the output element expression is a variable (or a nested property
of a variable) then it needs to be nil initialized, to make sure that
the variable exists at the local scope.

However, when the output element expression refers to the loopCounter
variable, then it shouldn't overwrite this variable. Note
that the loopCounter is already created at the local scope.

This adds a test case that fails if the output element variable is nil
initialized when it refers to the loopCounter variable.

(cherry picked from commit ffd9ad2)
Similar to the scenario of the input element variable, if the output
element expressions refers to the `loopCounter` variable, then we
shouldn't NIL initialize it.

(cherry picked from commit 64a4309)
Copy link
Member

@korthout korthout left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🤖

bors merge

@zeebe-bors-camunda zeebe-bors-camunda bot merged commit b21cde5 into stable/1.3 Aug 2, 2022
@zeebe-bors-camunda zeebe-bors-camunda bot deleted the backport-9947-to-stable/1.3 branch August 2, 2022 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants