{"record":{"id":"2d8e044d11de63e4","repo":"flowable/flowable-engine","slug":"no-matching-parent-execution-for-activity-errorh","errorCode":null,"errorMessage":"No matching parent execution for activity ${errorHandlerId} found","messagePattern":"No matching parent execution for activity (.+?) found","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ErrorPropagation.java","lineNumber":174,"sourceCode":"                    } else {\n                        currentActivity = currentActivity.getParentActivity();\n                        leavingExecution = leavingExecution.getParent();\n                    }\n                }\n\n                // Follow parents up until matching scope can't be found anymore (needed to support for multi-instance)\n                while (leavingExecution != null\n                        && leavingExecution.getParent() != null\n                        && leavingExecution.getParent().getActivity() != null\n                        && leavingExecution.getParent().getActivity().getId().equals(catchingScope.getId())) {\n                    leavingExecution = leavingExecution.getParent();\n                }\n            }\n\n            if (matchingParentFound && leavingExecution != null) {\n                executeEventHandler(errorHandler, leavingExecution, errorCode);\n            } else {\n                throw new ActivitiException(\"No matching parent execution for activity \" + errorHandlerId + \" found\");\n            }\n        }\n\n    }\n\n    private static void executeEventHandler(ActivityImpl borderEventActivity, ActivityExecution leavingExecution, String errorCode) {\n        if (Context.getProcessEngineConfiguration() != null && Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {\n            Context.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(\n                    ActivitiEventBuilder.createErrorEvent(FlowableEngineEventType.ACTIVITY_ERROR_RECEIVED, borderEventActivity.getId(), errorCode, leavingExecution.getId(), leavingExecution.getProcessInstanceId(),\n                            leavingExecution.getProcessDefinitionId()),\n                    EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG);\n        }\n\n        // The current activity of the execution will be changed in the next lines.\n        // So we must make sure the activity is ended correctly here\n        // The other executions (for example when doing something parallel in a subprocess, will\n        // be destroyed by the destroy scope operation (but this execution will be used to do it and\n        // will have list the original activity by then)","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ErrorPropagation.java#L156-L192","documentation":"During error catch execution, the engine walks up the execution hierarchy to find the parent execution from which to leave toward the error handler activity. If no matching parent execution is found (matchingParentFound false or leavingExecution null), it throws ActivitiException.","triggerScenarios":"The error handler activity (boundary/event subprocess handler) is not reachable from the failing execution's hierarchy — e.g. the boundary event belongs to an activity whose execution structure does not contain the current scope's parent chain.","commonSituations":"Concurrent/async scopes where the expected parent execution already ended; error thrown from an inner scope whose parent link is missing; process definition topology changed between versions; throwing error from outside the scope of the activity with the boundary event.","solutions":["Ensure the boundary error event is attached to the activity currently executing (or an enclosing scope) where the error is thrown","Check concurrent execution structure: use exclusive/non-concurrent paths or verify parent execution links","Redeploy a corrected process definition and restart affected instances","Avoid throwing the error from a scope that has no path to the catching boundary event"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Attach boundary error events to the activity actually throwing the error","Keep execution paths non-concurrent across the throw/catch boundary or model scope-level catches","Test error propagation scenarios (nested call activities, async scopes) in CI"],"tags":["bpmn","execution-hierarchy","error-handling"],"backgroundTag":"invalid-state-transition","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}