flowable/flowable-engine · error · FlowableException

Error while executing transformation from object: using tra

Error message

Error while executing transformation from object:  using transformer 

What it means

FlowableException thrown by AbstractTransformer.transform when the concrete primTransform implementation throws any exception. It wraps the original cause in a message identifying the object and the transformer, converting arbitrary transformer failures into Flowable's runtime exception type.

Source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/transformer/AbstractTransformer.java:30

 */
package org.flowable.engine.impl.transformer;

import org.flowable.common.engine.api.FlowableException;

/**
 * A Transformer is responsible of transforming an object into a different object
 * 
 * @author Esteban Robles Luna
 */
public abstract class AbstractTransformer implements Transformer {

    @Override
    public Object transform(Object anObject) {
        try {
            return this.primTransform(anObject);
        } catch (Exception e) {

            throw new FlowableException("Error while executing transformation from object: " + anObject + " using transformer " + this, e);
        }
    }

    /**
     * Transforms anObject into a different object
     * 
     * @param anObject
     *            the object to be transformed
     * @return the transformed object
     */
    protected abstract Object primTransform(Object anObject) throws Exception;
}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Inspect the wrapped cause (e.getCause() in logs) to find the real failure — usually a format, cast, or serialization problem.
  2. Validate/normalize the value before passing it to the engine API (e.g. parse dates with a fixed formatter, pass correct types).
  3. For serialization-related causes after an upgrade, check compatible JDK/Flowable versions and re-save the affected variables.
  4. Fix or add unit tests for custom transformer implementations (primTransform) to handle edge inputs.

Example fix

// before
taskService.setVariable(taskId, "dueDate", "2026-13-45");

// after: validate before transform
Date parsed = null;
try {
    parsed = new SimpleDateFormat("yyyy-MM-dd").parse("2026-05-01");
} catch (ParseException e) {
    throw new IllegalArgumentException("invalid date", e);
}
taskService.setVariable(taskId, "dueDate", parsed);
Defensive patterns

Strategy: try-catch

Validate before calling

if (value instanceof String && expectsDate) {
    new SimpleDateFormat("yyyy-MM-dd").parse((String) value); // fails fast with clear error
}

Try / catch

try {
    taskService.setVariable(taskId, name, value);
} catch (FlowableException e) {
    log.error("transform failed for '{}': {}", name, e.getCause(), e);
    throw e;
}

Prevention

When it happens

Trigger: Any registered variable transformer (e.g. date/serializable transformers) whose primTransform fails: unparseable input format, ClassCastException, IO/serialization errors during variable conversion when setting or getting variables.

Common situations: Setting a process variable whose type does not match the expected transformer (e.g. malformed date string); deserialization failures after upgrading Flowable/JDK so stored serialized variables no longer match; custom transformer bugs.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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