flowable/flowable-engine · warning
Using Joda-Time DateTime has been deprecated and will be…
Error message
Using Joda-Time DateTime has been deprecated and will be removed in a future version. Task Variable {} in task {} was a Joda-Time DateTime. What it means
Flowable deprecated Joda-Time variable types. When a task-scoped variable with a org.joda.time.DateTime value is stored (setValue on JodaDateTimeType) and the ValueFields has a taskId, a deprecation warning naming the variable and task is logged, telling you Joda-Time DateTime support will be removed.
Solutions
- Convert the value to java.time.OffsetDateTime/Instant (or java.util.Date) before setting the variable.
- Migrate stored variable values to the Flowable java-time compatible types on next write.
- Suppress only if temporary: plan removal before upgrading to the version dropping Joda support.
- Audit variable writes for Joda types (search for org.joda.time in setVariable call sites).
Example fix
// before taskService.setVariableLocal(taskId, "dueDate", org.joda.time.DateTime.now()); // after taskService.setVariableLocal(taskId, "dueDate", java.time.OffsetDateTime.now());
Defensive patterns
Strategy: type-guard
Validate before calling
public static Object normalizeVar(Object v) {
if (v instanceof org.joda.time.DateTime dt) return dt.toDate();
return v;
}
taskService.setVariableLocal(taskId, name, normalizeVar(value)); Type guard
static boolean isJodaDateTime(Object v) {
return v instanceof org.joda.time.DateTime;
} Prevention
- Ban org.joda.time in new code (enforce via ArchUnit/Checkstyle import rules).
- Convert Joda values at API boundaries before storing engine variables.
- Migrate variable handling to java.time types project-wide.
When it happens
Trigger: Calling variableService/TaskService APIs to set a task variable whose value is a Joda DateTime — e.g. taskService.setVariableLocal(taskId, name, dateTimeValue) or engine-internal variable creation with a DateTime object while taskId != null.
Common situations: Legacy process/Java code still using Joda-Time after migration guidance; old libraries returning DateTime that is passed straight into setVariable; upgrading Flowable where Joda support is being phased out.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- Using Joda-Time DateTime has been deprecated and will be…
- Using Joda-Time DateTime has been deprecated and will be…
- Using Joda-Time LocalDate has been deprecated and will be…
- Using Joda-Time LocalDate has been deprecated and will be…
- Using Joda-Time LocalDate has been deprecated and will be…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/d682aae20b364c2c.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-variable-service/src/main/java/org/flowable/variable/service/impl/types/JodaDateTimeType.java:58
return true;
}
return DateTime.class.isAssignableFrom(value.getClass());
}
@Override
public Object getValue(ValueFields valueFields) {
Long longValue = valueFields.getLongValue();
if (longValue != null) {
return new DateTime(longValue);
}
return null;
}
@Override
public void setValue(Object value, ValueFields valueFields) {
if (value != null) {
if (valueFields.getTaskId() != null) {
JodaDeprecationLogger.LOGGER.warn(
"Using Joda-Time DateTime has been deprecated and will be removed in a future version. Task Variable {} in task {} was a Joda-Time DateTime. ",
valueFields.getName(), valueFields.getTaskId());
} else if (valueFields.getProcessInstanceId() != null) {
JodaDeprecationLogger.LOGGER.warn(
"Using Joda-Time DateTime has been deprecated and will be removed in a future version. Process Variable {} in process instance {} and execution {} was a Joda-Time DateTime. ",
valueFields.getName(), valueFields.getProcessInstanceId(), valueFields.getExecutionId());
} else {
JodaDeprecationLogger.LOGGER.warn(
"Using Joda-Time DateTime has been deprecated and will be removed in a future version. Variable {} in {} instance {} and sub-scope {} was a Joda-Time DateTime. ",
valueFields.getName(), valueFields.getScopeType(), valueFields.getScopeId(), valueFields.getSubScopeId());
}
valueFields.setLongValue(((DateTime) value).getMillis());
} else {
valueFields.setLongValue(null);
}
}
}
View on GitHub (pinned to d6d39ce1c6)