flowable/flowable-engine · error · FlowableIllegalArgumentException

Invalid event-type:

Error message

Invalid event-type: 

What it means

FlowableEngineEventType.getTypesFromString throws FlowableIllegalArgumentException("Invalid event-type: " + typeName) when one of the comma/whitespace-separated type names given does not match any FlowableEngineEventType enum constant. It validates that every requested event type string corresponds to a known engine event before returning the typed array.

Solutions

  1. Compare the offending type name against the FlowableEngineEventType enum constants and fix the spelling/casing
  2. Only use event types defined in your Flowable version (check the enum source for renames between versions)
  3. Trim whitespace and validate each token before calling getTypesFromString

Example fix

// before
engine.getRuntimeService().addEventListener(listener, FlowableEngineEventType.getTypesFromString("ENTITY_CREATE,ENTITY_UPDATEE"));
// after
String types = "ENTITY_CREATE,ENTITY_UPDATED";
for (String t : types.split(",")) {
    FlowableEngineEventType.valueOf(t.trim()); // fail fast with a clear message
}
engine.getRuntimeService().addEventListener(listener, FlowableEngineEventType.getTypesFromString(types));
Defensive patterns

Strategy: validation

Validate before calling

// validate each event type token against the enum before calling getTypesFromString
for (String token : typesString.split(",")) {
    try {
        FlowableEngineEventType.valueOf(token.trim());
    } catch (IllegalArgumentException ex) {
        throw new IllegalArgumentException("Unknown Flowable event type: " + token);
    }
}

Try / catch

try {
    FlowableEngineEventType[] types = FlowableEngineEventType.getTypesFromString(configuredTypes);
} catch (FlowableIllegalArgumentException e) {
    LOGGER.error("Bad event type in config: {}", e.getMessage());
    throw new IllegalArgumentException("Fix event types in configuration", e);
}

Prevention

When it happens

Trigger: Calling getTypesFromString("A,B,C") (e.g. when subscribing an event listener) where any of the comma-separated tokens is misspelled, has wrong casing, or is not a FlowableEngineEventType name.

Common situations: Typo'd event names in process-engine configuration (e.g. listener registration via properties/YAML), custom event names assumed to exist, copying event-type strings from different Flowable versions where constants were renamed.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-engine-common-api/src/main/java/org/flowable/common/engine/api/delegate/event/FlowableEngineEventType.java:417

     * @return an array of FlowableEngineEventType based on the given string.
     * @throws FlowableIllegalArgumentException
     *             when one of the given string is not a valid type name
     */
    public static FlowableEngineEventType[] getTypesFromString(String string) {
        List<FlowableEngineEventType> result = new ArrayList<>();
        if (string != null && !string.isEmpty()) {
            String[] split = StringUtils.split(string, ",");
            for (String typeName : split) {
                boolean found = false;
                for (FlowableEngineEventType type : values()) {
                    if (typeName.equals(type.name())) {
                        result.add(type);
                        found = true;
                        break;
                    }
                }
                if (!found) {
                    throw new FlowableIllegalArgumentException("Invalid event-type: " + typeName);
                }
            }
        }

        return result.toArray(EMPTY_ARRAY);
    }
}

View on GitHub (pinned to d6d39ce1c6)