{"record":{"id":"5b99ff540f7eb36a","repo":"flowable/flowable-engine","slug":"exception-during-execution-of-command","errorCode":null,"errorMessage":"Exception during execution of command ","messagePattern":"Exception during execution of command ","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/interceptor/CommandContextInterceptor.java","lineNumber":151,"sourceCode":"                commandContext.popEngineCfgStack();\n                Context.removeCommandContext();\n            }\n        }\n\n        // Rethrow exception if needed\n        if (contextReused && commandContext.getException() != null) {\n\n            // If it's reused, we need to throw the exception again so it propagates upwards,\n            // but the exception needs to be reset again or the parent call can incorrectly be marked\n            // as having an exception (the nested call can be try-catched for example)\n            Throwable exception = commandContext.getException();\n            commandContext.resetException();\n\n            // Wrapping it to avoid having 'throws throwable' in all method signatures\n            if (exception instanceof FlowableException) {\n                throw (FlowableException) exception;\n            } else {\n                throw new FlowableException(\"Exception during execution of command \" + command, exception);\n            }\n        }\n\n        return null;\n    }\n    \n    public CommandContextFactory getCommandContextFactory() {\n        return commandContextFactory;\n    }\n\n    public void setCommandContextFactory(CommandContextFactory commandContextFactory) {\n        this.commandContextFactory = commandContextFactory;\n    }\n    \n    public Map<String, AbstractEngineConfiguration> getEngineConfigurations() {\n        return engineConfigurations;\n    }\n","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/interceptor/CommandContextInterceptor.java#L133-L169","documentation":"Logged/rethrown by CommandContextInterceptor.execute after command execution failed: a general error occurred while running the command inside the interceptor chain (cause is the original exception). Marks the failure point between context setup and teardown.","triggerScenarios":"Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/interceptor/CommandContextInterceptor.java:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Read the chained cause to identify the real failure","Re-run with debug logging on the command interceptor chain if the cause is unclear"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}