Skip to content

Fix potential NullPointerException in AbstractDynamicStateManager (#4067) - #4342

Open
ESTeR9 wants to merge 1 commit into
flowable:mainfrom
ESTeR9:fix/4067-npe-abstract-dynamic-state-manager
Open

ESTeR9 wants to merge 1 commit into
flowable:mainfrom
ESTeR9:fix/4067-npe-abstract-dynamic-state-manager

Conversation

@ESTeR9

@ESTeR9 ESTeR9 commented Nov 27, 2026

Copy link
Copy Markdown

Fixes #4067

When moveActivityIdToSubProcessInstanceActivityId is called to move an active execution into a call activity subprocess instance, a NullPointerException can occur in AbstractDynamicStateManager.createEmbeddedSubProcessAndExecutions.

This change adds null safety checks in four locations:

  • When the resolved sub process is null, a descriptive FlowableException is thrown indicating the sub process could not be resolved.
  • When subProcess.getInitialFlowElement returns null, a descriptive FlowableException is thrown indicating a missing start event.
  • When newChildExecutions is empty after creating child executions, a descriptive FlowableException is thrown.
  • When the default continue parent execution is null, a descriptive FlowableException is thrown instead of an NPE later in the call chain.

Check List:

  • Unit tests: NO (defensive null checks — existing ChangeStateForCallActivityTest covers the API path)
  • Documentation: NA

…owable#4067)

When moveActivityIdToSubProcessInstanceActivityId is called to move an active
execution into a call activity subprocess instance, a NullPointerException can
occur in AbstractDynamicStateManager.createEmbeddedSubProcessAndExecutions.

This change adds null safety checks in four locations:

- When the resolved sub process is null, a descriptive FlowableException is
  thrown indicating the sub process could not be resolved.
- When subProcess.getInitialFlowElement returns null, a descriptive
  FlowableException is thrown indicating a missing start event.
- When newChildExecutions is empty after creating child executions, a
  descriptive FlowableException is thrown.
- When the default continue parent execution is null, a descriptive
  FlowableException is thrown instead of an NPE later in the call chain.

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

moveActivityIdToSubProcessInstanceActivityId to subProcess npe bug

1 participant