flowable/flowable-engine · error · ActivitiIllegalArgumentException

invalid date value

Error message

invalid date value ${propertyValue}

What it means

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.

Solutions

  1. Submit dates in the exact configured pattern (default dd/MM/yyyy hh:mm) — format on the client with the same SimpleDateFormat.
  2. Create the form type with an explicit pattern matching your input: new DateFormType("yyyy-MM-dd'T'HH:mm:ss").
  3. Normalize input before submission (parse with ISO format, reformat with the engine pattern).
  4. Accept null/empty for absent values; never submit placeholder strings like 'N/A'.

Example fix

// before: sending ISO string to default DateFormType
formProperties.put("dueDate", "2026-09-11T10:00:00Z");
// after
SimpleDateFormat f = new SimpleDateFormat("dd/MM/yyyy hh:mm");
formProperties.put("dueDate", f.format(isoInstant.toDate()));
Defensive patterns

Strategy: validation

Validate before calling

SimpleDateFormat engineFormat = new SimpleDateFormat("dd/MM/yyyy hh:mm");
engineFormat.parse(input); // throws if input won't survive DateFormType parsing
if (!input.isEmpty() && !input.matches("\\d{2}/\\d{2}/\\d{4} \\d{2}:\\d{2}")) {
    throw new IllegalArgumentException("Date must match dd/MM/yyyy hh:mm");
}

Try / catch

try {
    formService.submitTaskFormData(taskId, props);
} catch (org.activiti.engine.ActivitiIllegalArgumentException e) {
    if (e.getMessage().startsWith("invalid date value")) {
        props.put("dueDate", reformat(isoInput, "dd/MM/yyyy hh:mm"));
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/afe2838b5882879d. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/form/DateFormType.java:60

    }

    @Override
    public Object getInformation(String key) {
        if ("datePattern".equals(key)) {
            return datePattern;
        }
        return null;
    }

    @Override
    public Object convertFormValueToModelValue(String propertyValue) {
        if (StringUtils.isEmpty(propertyValue)) {
            return null;
        }
        try {
            return dateFormat.parseObject(propertyValue);
        } catch (ParseException e) {
            throw new ActivitiIllegalArgumentException("invalid date value " + propertyValue, e);
        }
    }

    @Override
    public String convertModelValueToFormValue(Object modelValue) {
        if (modelValue == null) {
            return null;
        }
        return dateFormat.format(modelValue);
    }
}

View on GitHub (pinned to d6d39ce1c6)