{"record":{"id":"1ba1a6e8f788ec46","repo":"flowable/flowable-engine","slug":"errorcode","errorCode":"${errorCode}","errorMessage":"No catching boundary event found for error with errorCode '${errorCode}', neither in same process nor in parent process","messagePattern":"No catching boundary event found for error with errorCode '(.+?)', neither in same process nor in parent process","errorType":"error_code","errorClass":"BpmnError","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ErrorPropagation.java","lineNumber":82,"sourceCode":"        while (execution != null) {\n            String eventHandlerId = findLocalErrorEventHandler(execution, errorCode);\n            if (eventHandlerId != null) {\n                executeCatch(eventHandlerId, execution, errorCode);\n                break;\n            }\n\n            if (execution.isProcessInstanceType()) {\n                // dispatch process completed event\n                if (Context.getProcessEngineConfiguration() != null && Context.getProcessEngineConfiguration().getEventDispatcher().isEnabled()) {\n                    Context.getProcessEngineConfiguration().getEventDispatcher().dispatchEvent(\n                            ActivitiEventBuilder.createEntityEvent(FlowableEngineEventType.PROCESS_COMPLETED_WITH_ERROR_END_EVENT, execution),\n                            EngineConfigurationConstants.KEY_PROCESS_ENGINE_CONFIG);\n                }\n            }\n            execution = getSuperExecution(execution);\n        }\n        if (execution == null) {\n            throw new BpmnError(errorCode, \"No catching boundary event found for error with errorCode '\"\n                    + errorCode + \"', neither in same process nor in parent process\");\n        }\n    }\n\n    private static String findLocalErrorEventHandler(ActivityExecution execution, String errorCode) {\n        PvmScope scope = execution.getActivity();\n        while (scope != null) {\n\n            @SuppressWarnings(\"unchecked\")\n            List<ErrorEventDefinition> definitions = (List<ErrorEventDefinition>) scope.getProperty(BpmnParse.PROPERTYNAME_ERROR_EVENT_DEFINITIONS);\n            if (definitions != null) {\n                // definitions are sorted by precedence, ie. event subprocesses first.\n                for (ErrorEventDefinition errorEventDefinition : definitions) {\n                    if (errorEventDefinition.catches(errorCode)) {\n                        return scope.findActivity(errorEventDefinition.getHandlerActivityId()).getId();\n                    }\n                }\n            }","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/helper/ErrorPropagation.java#L64-L100","documentation":"Raised as a BpmnError when an error is propagated (ErrorPropagation.propagateError) but neither the current process instance's activities nor any parent (call-activity) process contains a catching error boundary event / error event handler for the given errorCode. The error has nowhere to go, so the engine aborts.","triggerScenarios":"An error end event or ErrorThrowingEventListener throws errorCode X while no boundary error event, error event subprocess, or parent-process handler catches X anywhere up the execution hierarchy.","commonSituations":"Typo or case mismatch between the thrown errorCode and the boundaryEvent's errorRef; boundary event attached to the wrong activity; missing error boundary on the call activity in the parent process; error event subprocess absent.","solutions":["Add an error boundary event (or error start event in an event subprocess) that catches the thrown errorCode on the appropriate activity","Fix errorCode/errorRef mismatches (names are matched exactly) between thrower and catcher","Ensure the parent process's call activity has a boundary error event when errors should cross the call boundary","Declare a shared <error> element in the process definitions and reference it consistently"],"exampleFix":"// before\n<serviceTask id=\"t\" flowable:class=\"X\"/> <!-- no error catch -->\n// after\n<boundaryEvent id=\"catchErr\" attachedToRef=\"t\">\n  <errorEventDefinition errorRef=\"myError\"/>\n</boundaryEvent>","handlingStrategy":"validation","validationCode":"// before deploy: assert every thrown errorCode has a catcher\nSet<String> thrown = setOf(\"myError\");\nSet<String> caught = collectErrorRefs(bpmnModel); // errorRefs on boundary/error-start events\nif (!caught.containsAll(thrown)) throw new IllegalStateException(\"uncatched error codes: \" + thrown);\nif (!caught.containsAll(thrown)) throw new IllegalStateException(\"uncatched error codes: \" + thrown);","typeGuard":null,"tryCatchPattern":"try {\n    runtimeService.trigger(executionId);\n} catch (org.activiti.engine.delegate.BpmnError e) {\n    logger.error(\"Unhandled BPMN error: {}\", e.getErrorCode());\n    throw e;\n}","preventionTips":["Model a catching boundary/error-start event for every error code thrown","Share <error> declarations between thrower and catcher definitions","Add BPMN model validation to your build pipeline"],"tags":["bpmn","error-handling","process-definition"],"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"}