{"record":{"id":"afe2838b5882879d","repo":"flowable/flowable-engine","slug":"invalid-date-value-propertyvalue-afe283","errorCode":null,"errorMessage":"invalid date value ${propertyValue}","messagePattern":"invalid date value (.+?)","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/form/DateFormType.java","lineNumber":60,"sourceCode":"    }\n\n    @Override\n    public Object getInformation(String key) {\n        if (\"datePattern\".equals(key)) {\n            return datePattern;\n        }\n        return null;\n    }\n\n    @Override\n    public Object convertFormValueToModelValue(String propertyValue) {\n        if (StringUtils.isEmpty(propertyValue)) {\n            return null;\n        }\n        try {\n            return dateFormat.parseObject(propertyValue);\n        } catch (ParseException e) {\n            throw new ActivitiIllegalArgumentException(\"invalid date value \" + propertyValue, e);\n        }\n    }\n\n    @Override\n    public String convertModelValueToFormValue(Object modelValue) {\n        if (modelValue == null) {\n            return null;\n        }\n        return dateFormat.format(modelValue);\n    }\n}\n","sourceCodeStart":42,"sourceCodeEnd":72,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/form/DateFormType.java#L42-L72","documentation":"Thrown by DateFormType.convertFormValueToModelValue when the submitted form string cannot be parsed with the form type's date format (default dd/MM/yyyy hh:mm, or a custom pattern given in the form type configuration). The ParseException is wrapped in an ActivitiIllegalArgumentException. Parsing occurs when a form property of type 'date' is submitted back into the process.","triggerScenarios":"Submitting a form property of type date whose string value doesn't match the configured SimpleDateFormat pattern — e.g. \"2026-09-11\" against the default dd/MM/yyyy hh:mm pattern, or a localized string parsed with a different Locale than the formatter's.","commonSituations":"Client sends ISO-8601 dates while the engine expects the legacy pattern; users entering dates in browser locale; custom DateFormType pattern changed in code but old clients still send the old format; timezone-shifted values losing the time part.","solutions":["Submit dates in the exact configured pattern (default dd/MM/yyyy hh:mm) — format on the client with the same SimpleDateFormat.","Create the form type with an explicit pattern matching your input: new DateFormType(\"yyyy-MM-dd'T'HH:mm:ss\").","Normalize input before submission (parse with ISO format, reformat with the engine pattern).","Accept null/empty for absent values; never submit placeholder strings like 'N/A'."],"exampleFix":"// before: sending ISO string to default DateFormType\nformProperties.put(\"dueDate\", \"2026-09-11T10:00:00Z\");\n// after\nSimpleDateFormat f = new SimpleDateFormat(\"dd/MM/yyyy hh:mm\");\nformProperties.put(\"dueDate\", f.format(isoInstant.toDate()));","handlingStrategy":"validation","validationCode":"SimpleDateFormat engineFormat = new SimpleDateFormat(\"dd/MM/yyyy hh:mm\");\nengineFormat.parse(input); // throws if input won't survive DateFormType parsing\nif (!input.isEmpty() && !input.matches(\"\\\\d{2}/\\\\d{2}/\\\\d{4} \\\\d{2}:\\\\d{2}\")) {\n    throw new IllegalArgumentException(\"Date must match dd/MM/yyyy hh:mm\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    formService.submitTaskFormData(taskId, props);\n} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"invalid date value\")) {\n        props.put(\"dueDate\", reformat(isoInput, \"dd/MM/yyyy hh:mm\"));\n    }\n}","preventionTips":["Format client dates with the same pattern as the DateFormType configuration.","Pass an explicit pattern when constructing DateFormType for ISO-style inputs.","Empty string is valid (yields null) — use it for absent dates, not placeholders."],"tags":["forms","date","parsing","validation"],"backgroundTag":"invalid-date-format","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"}