{"record":{"id":"13e5bfe5401b0cfd","repo":"flowable/flowable-engine","slug":"error-converting-timer-expression","errorCode":null,"errorMessage":"Error converting timer expression","messagePattern":"Error converting timer expression","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/TimerExpressionXmlConverter.java","lineNumber":46,"sourceCode":"    @Override\n    public String getXMLElementName() {\n        return CmmnXmlConstants.ELEMENT_TIMER_EXPRESSION;\n    }\n    \n    @Override\n    public boolean hasChildElements() {\n        return false;\n    }\n\n    @Override\n    protected CmmnElement convert(XMLStreamReader xtr, ConversionHelper conversionHelper) {\n        try {\n            String expression = xtr.getElementText();\n            if (StringUtils.isNotEmpty(expression) && conversionHelper.getCurrentCmmnElement() instanceof TimerEventListener timerEventListener) {\n                timerEventListener.setTimerExpression(expression);\n            }\n        } catch (XMLStreamException e) {\n            throw new FlowableException(\"Error converting timer expression\", e);\n        }\n        return null;\n    }\n    \n}\n","sourceCodeStart":28,"sourceCodeEnd":52,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-converter/src/main/java/org/flowable/cmmn/converter/TimerExpressionXmlConverter.java#L28-L52","documentation":"Thrown when the StAX reader cannot read the text of a <timerExpression> element while converting a CMMN timer event listener. The expression would be set via setTimerExpression on the TimerEventListener; an XMLStreamException is wrapped in this FlowableException.","triggerScenarios":"Parsing CMMN XML with a timer event listener whose <timerExpression> element is malformed or unreadable (unclosed tags, invalid chars, encoding problems).","commonSituations":"Hand-edited timer expressions; ISO duration strings containing invalid characters; truncated XML files.","solutions":["Validate and repair the <timerExpression> element in the CMMN XML.","Inspect the cause XMLStreamException for the exact offset.","Ensure the element is well-formed, e.g. <timerExpression>PT1H</timerExpression>.","Re-export the model from the modeling tool."],"exampleFix":"// before\n<timerExpression>PT1\n// after\n<timerExpression>PT1H</timerExpression>","handlingStrategy":"try-catch","validationCode":"javax.xml.validation.Validator v = schema.newValidator();\nv.validate(new StreamSource(cmmnXml));","typeGuard":null,"tryCatchPattern":"try {\n    CmmnModel model = converter.convertToCmmnModel(in);\n} catch (FlowableException e) {\n    throw new IllegalStateException(\"Invalid <timerExpression> element: \" + e.getCause(), e);\n}","preventionTips":["Schema-validate CMMN XML files","Use valid ISO-8601 durations for timer expressions","Keep XML files intact — detect truncation via validation"],"tags":["cmmn","xml-parsing","timer"],"backgroundTag":"file-read-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}