{"record":{"id":"c66e37abe1293f2c","repo":"flowable/flowable-engine","slug":"exception-during-timer-execution-for-job","errorCode":null,"errorMessage":"exception during timer execution for \" + job","messagePattern":"exception during timer execution for \" \\+ job","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/jobexecutor/TimerStartEventJobHandler.java","lineNumber":85,"sourceCode":"                    if (flowElement == null) {\n                        throw new FlowableException(\"Could not find matching FlowElement for activityId \" + activityId + \" in \" + processDefinitionEntity);\n                    }\n                    ProcessInstanceHelper processInstanceHelper = processEngineConfiguration.getProcessInstanceHelper();\n                    processInstanceHelper.createAndStartProcessInstanceWithInitialFlowElement(processDefinitionEntity, null, null, null, flowElement, process\n                            , null, null, null, null, true);\n                } else {\n                    new StartProcessInstanceCmd(processDefinitionEntity.getKey(), null, null, null, job.getTenantId()).execute(commandContext);\n                }\n\n            } else {\n                LOGGER.debug(\"ignoring timer of suspended process definition {}\", processDefinitionEntity.getId());\n            }\n        } catch (RuntimeException e) {\n            LOGGER.error(\"exception during timer execution for {}\", job, e);\n            throw e;\n        } catch (Exception e) {\n            LOGGER.error(\"exception during timer execution for {}\", job, e);\n            throw new FlowableException(\"exception during timer execution for \" + job, e);\n        }\n    }\n}\n","sourceCodeStart":67,"sourceCodeEnd":89,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/jobexecutor/TimerStartEventJobHandler.java#L67-L89","documentation":"Wrapper thrown by TimerStartEventJobHandler.execute when a checked Exception occurs during timer start-event execution. RuntimeExceptions are logged and rethrown as-is; checked exceptions are wrapped in this FlowableException for the job executor.","triggerScenarios":"Any checked exception inside the timer execution path — e.g. starting the process instance or dispatching events throws a checked Exception.","commonSituations":"Event dispatcher listener failures, command execution throwing checked exceptions, or underlying IO/serialization issues during process instance start.","solutions":["Inspect the logged stack trace (LOGGER.error includes the cause) for the real exception","Fix the underlying cause (e.g. failing event listener or command)","If the cause is transient (e.g. DB contention), rely on the async executor's retry policy"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { /* timer fires */ } catch (FlowableException e) { if (e.getMessage().startsWith(\"exception during timer execution\")) { /* handle e.getCause() */ } else throw e; }","preventionTips":["Keep event listeners and commands exception-safe","Monitor async executor deadletter jobs for wrapped causes"],"tags":["flowable","timer","job-executor","wrapper"],"backgroundTag":"upstream-api-error","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}