Repository navigation
fix(engine): use stored process definition key for MDC - #3109
Merged
kthoms merged 2 commits intoJun 14, 2026
Merged
Conversation
Use ExecutionEntity#getProcessDefinitionKey() when populating the process definition key logging context. This avoids resolving the full process definition just to read the key. Backported and adapted from Fluxnova commit 705979e55288c506eb37e30408910d2ee9ee47ad in finos/fluxnova-bpm-platform. Also seen in Fluxnova commit 9cc0f792c8901f91969c272f599721fa4219f68f. Original author: Mannuru, ReddyKishore <[email protected]>
kthoms
reviewed
Jun 11, 2026
|
kthoms
deleted the
backport/fluxnova-300-process-data-context-definition-key
branch
June 14, 2026 14:34
kthoms
pushed a commit
that referenced
this pull request
Jun 14, 2026
* fix(engine): use stored process definition key for MDC Use ExecutionEntity#getProcessDefinitionKey() when populating the process definition key logging context. This avoids resolving the full process definition just to read the key. Backported and adapted from Fluxnova commit 705979e55288c506eb37e30408910d2ee9ee47ad in finos/fluxnova-bpm-platform. Also seen in Fluxnova commit 9cc0f792c8901f91969c272f599721fa4219f68f. Original author: Mannuru, ReddyKishore <[email protected]> * test: mock process engine configuration in ProcessDataContextTest (cherry picked from commit 3b52cf0)
Contributor
|
Cherry-picked for 2.1.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
This backports a small Fluxnova engine fix for
ProcessDataContext: when the MDC logging context needs the process definition key, the engine now reads the already stored execution property viaExecutionEntity#getProcessDefinitionKey()instead of resolving the full process definition and then callinggetKey()on it.Problem
Before this change,
ProcessDataContext#pushSectionpopulated the configuredprocessDefinitionKeyMDC property through:That makes MDC population depend on resolving/loading the process definition even though the execution already carries the process definition key directly. For logging-context setup this is unnecessary work and can cause avoidable process-definition access on a path that should only copy execution metadata into MDC.
Fix
Use:
This keeps the logging-context behavior the same from the caller's perspective, but avoids resolving the full process definition for the key.
Test coverage
Added
ProcessDataContextTest#pushSectionUsesStoredProcessDefinitionKeyForMdc.The test is intentionally not self-referential: it configures only the
processDefinitionKeyMDC property, stubsexecution.getProcessDefinitionKey()with a concrete value, asserts that the value is written to MDC, and verifies thatexecution.getProcessDefinition()is never called.Backport attribution
Backported and adapted from Fluxnova:
Adaptation notes:
Verification
git diff --check./mvnw -pl engine -Dskip.frontend.build=true -Dtest=ProcessDataContextTest test