flowable/flowable-engine · warning

Using Joda-Time LocalDate has been deprecated and will be…

Error message

Using Joda-Time LocalDate has been deprecated and will be removed in a future version.

What it means

A deprecation WARN from DateUtil.toDate: an org.joda.time.LocalDate object was supplied where a java.util.Date is needed; Flowable converts it via toDay().toDate(). Joda-Time support will be removed in a future Flowable version.

Solutions

  1. Convert the value to java.time.LocalDate or java.util.Date before passing it to DMN evaluation.
  2. Migrate the owning codebase off Joda-Time (project is EOL since Java SE 8's java.time).
  3. If Joda values come from persistence, update the variable mapping/serialization layer to java.time types.

Example fix

// before
Object value = org.joda.time.LocalDate.now();
Date d = DateUtil.toDate(value);
// after
Date d = Date.from(java.time.LocalDate.now().atStartOfDay(ZoneId.systemDefault()).toInstant());
Defensive patterns

Strategy: type-guard

Validate before calling

if (value instanceof org.joda.time.LocalDate) { value = ((org.joda.time.LocalDate) value).toDate(); }

Type guard

boolean isJodaLocalDate(Object v) { return v instanceof org.joda.time.LocalDate; }

Prevention

When it happens

Trigger: Any DMN code path that calls DateUtil.toDate with a Joda LocalDate — e.g. date-typed decision table inputs or FEEL date functions receiving Joda values during decision execution.

Common situations: Applications still using Joda-Time alongside Flowable; variables persisted by older engine versions and read back as Joda types; utility code passing Joda dates into DMN expression evaluation.

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


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

Appendix: source

Thrown at modules/flowable-dmn-engine/src/main/java/org/flowable/dmn/engine/impl/el/util/DateUtil.java:36

import org.flowable.common.engine.impl.joda.JodaDeprecationLogger;
import org.joda.time.LocalDate;
import org.joda.time.format.DateTimeFormat;
import org.joda.time.format.DateTimeFormatter;

/**
 * @author Yvo Swillens
 */
public class DateUtil {

    public static Date toDate(Object dateObject) {
        if (dateObject == null) {
            throw new IllegalArgumentException("date object cannot be empty");
        }

        if (dateObject instanceof Date) {
            return (Date) dateObject;
        } else if (dateObject instanceof LocalDate) {
            JodaDeprecationLogger.LOGGER.warn("Using Joda-Time LocalDate has been deprecated and will be removed in a future version.");
            return ((LocalDate) dateObject).toDate();
        } else if (dateObject instanceof java.time.LocalDate) {
            return Date.from(((java.time.LocalDate) dateObject).atStartOfDay()
                    .atZone(ZoneId.systemDefault())
                    .toInstant());
        } else {
            DateTimeFormatter dtf = DateTimeFormat.forPattern("yyyy-MM-dd");
            LocalDate dateTime = dtf.parseLocalDate((String) dateObject);
            return dateTime.toDate();
        }
    }

    public static Date addDate(Object startDate, Object years, Object months, Object days) {
        LocalDate currentDate = new LocalDate(startDate);
        
        currentDate = currentDate.plusYears(intValue(years));
        currentDate = currentDate.plusMonths(intValue(months));
        currentDate = currentDate.plusDays(intValue(days));

View on GitHub (pinned to d6d39ce1c6)