Skip to content

fix(engine): evaluate multi-instance input mappings with iteration bindings - #3818

Draft
hauptmedia wants to merge 1 commit into
mainfrom
fix/3814-mi-input-scope
Draft

hauptmedia wants to merge 1 commit into
mainfrom
fix/3814-mi-input-scope

Conversation

@hauptmedia

@hauptmedia hauptmedia commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #3814. The issue was also reproduced with Operaton 2.1.5.

Multi-instance input mappings currently evaluate in the outer scope and can miss the current element/loop counter or silently read a same-name parent value. Capture the iteration bindings for input evaluation while preserving the existing parent semantics for other reads and explicit writes. Mapping targets remain local.

Expressions, scripts and the public DelegateExecution view use consistent bindings, including null shadowing and lazily deserialized typed values. No persistent execution scope, database schema or history layout changes are introduced. The ADR explains the compatibility tradeoff for custom code relying on concrete internal execution casts or object identity.

Regression tests

  • 61 added invocations: 51 engine integrations, 4 adapter unit cases and 6 Spin JSON cases.
  • Covers sequential/parallel tasks, nested multi-instance scopes and reused names, null/colliding values, EL/script/execution reads, mapping order and targets, parent writes, typed JSON, extension namespaces, async boundaries and persisted retry.
  • Red/green check: the unchanged base fails 40 of the 51 new integration cases; all 51 pass with the fix. All 11 preservation controls pass on the unchanged base.
  • Existing input/output coverage: 69 cases, zero failures/errors, 5 existing skips.

Companion draft PRs: #3819 (baseline engine regressions) and #3820 (frontend/SDK harness and date validation).

Verification scope

The three companion change sets were validated together on 79f9f874bcec4f3ff7423ac39270bfea2b66cfb1: 26,919 distinct Java cases, zero failures/errors and 142 existing skips; all 129 reactor modules completed successfully across verified recovery segments. This was not one uninterrupted build, and it is not a claim that each split branch independently passed the expanded full suite.

This branch is based on ce6e96e4139a006bb3ba6a3fce70f80eb3641f5c. The intervening main change only updates the REST documentation dependency lockfile. Every published changed file was checked byte-for-byte against the tested content.

Legacy browser test execution is explicitly deferred for this run: Chromium cannot create its required Unix socket in the test executor. The 32 UI, 7 SDK browser and 13 Commons browser spec inventories are not claimed as passed. No tests are permanently disabled. Optional external-database/runtime-container/E2E matrices were not run.

The cleanup script's isolated imports phase passed. Its code/test phases encountered existing recipe configuration errors, so the complete cleanup pipeline is not claimed as passed. git diff --check passed.

…ndings

Preserve parent mapping semantics while exposing the current element and loop counter through a DelegateExecution view. Add 61 regression invocations and an architectural decision record.

Fixes #3814
@github-actions github-actions Bot added documentation Improvements or additions to documentation lang:java Pull requests that update Java code scope:core-api Changes to the core API: engine, dmn-engine, feel-engine, REST API, OpenAPI scope:tests Changes affecting only test code labels Oct 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Oct 9, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lang:java Pull requests that update Java code scope:core-api Changes to the core API: engine, dmn-engine, feel-engine, REST API, OpenAPI scope:tests Changes affecting only test code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-instance element variable is unavailable in task input mappings

1 participant