Skip to content

Replace inheritVariables with explicit in-mappings for undeployAppSubProcess - #1897

Merged
Yavor16 merged 3 commits into
masterfrom
remove-inherite-vars-undeploy
Aug 18, 2026
Merged

Replace inheritVariables with explicit in-mappings for undeployAppSubProcess#1897
Yavor16 merged 3 commits into
masterfrom
remove-inherite-vars-undeploy

Conversation

@Yavor16

@Yavor16 Yavor16 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Description:

Removes the implicit full-scope variable inheritance from every undeployAppSubProcess call activity in the process definitions. All 5 call sites previously used flowable:inheritVariables="true", which passes the entire parent process variable scope into the subprocess. This creates hidden coupling and can cause variables to leak unintentionally between process instances in multi-instance scenarios.

What changed: each call site now sets flowable:inheritVariables="false" and declares an explicit list of 27 flowable:in variable mappings, so the subprocess receives exactly the variables it needs and nothing more. This mirrors the pattern already applied to the processBatches subprocess in #1893.

Affected BPMN files (4 files, 5 call sites):

  • rollback-mta.bpmn (1 call site)
  • xs2-bg-deploy.bpmn (2 call sites)
  • xs2-deploy.bpmn (1 call site)
  • xs2-undeploy.bpmn (1 call site)

Areas to focus on: please verify the 27-variable flowable:in list is complete for each call site — a missing mapping would surface as an unset variable inside undeployAppSubProcess at runtime rather than at build time.

Reference: JIRA:LMCROSSITXSADEPLOY-3028

Issue:

…Process

All 5 call sites of undeployAppSubProcess across 4 BPMN files previously
used flowable:inheritVariables="true", which implicitly passes the entire
parent process variable scope into the subprocess. This creates hidden
coupling and can cause variables to leak unintentionally between process
instances in multi-instance scenarios.

Replace with flowable:inheritVariables="false" and an explicit list of
27 flowable:in variable mappings on each call site, consistent with the
same pattern applied to the processBatches subprocess in #1893.

Affected files:
- rollback-mta.bpmn (1 call site)
- xs2-bg-deploy.bpmn (2 call sites)
- xs2-deploy.bpmn (1 call site)
- xs2-undeploy.bpmn (1 call site)

JIRA:LMCROSSITXSADEPLOY-3028
The appToProcess variable is set as the multi-instance elementVariable by
the parent call activity (flowable:elementVariable="appToProcess"), but with
inheritVariables="false" it must be listed explicitly in flowable:in to
be available inside the subprocess.

Without it, UndeployAppStep.executeStepInternal() reads a null
APP_TO_PROCESS, causing a NullPointerException in getStepErrorMessage()
when DeleteApplicationRoutesStep runs.

JIRA:LMCROSSITXSADEPLOY-3028
<flowable:in source="namespace" target="namespace"></flowable:in>
<flowable:in source="keepFiles" target="keepFiles"></flowable:in>
<flowable:in source="appArchiveId" target="appArchiveId"></flowable:in>
<flowable:in source="mtaExtDescriptorId" target="mtaExtDescriptorId"></flowable:in>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are keepFiles/ appArchiveId/ mtaExtDescriptorId needed here in the undeploy diagram?

@sonarqubecloud

Copy link
Copy Markdown

@Yavor16
Yavor16 merged commit ee9d2bf into master Aug 18, 2026
8 checks passed
@Yavor16
Yavor16 deleted the remove-inherite-vars-undeploy branch August 18, 2026 13:07
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.

3 participants