flowable/flowable-engine · error · IllegalArgumentException

Invalid event-type

Error message

Invalid event-type: ${typeName}

What it means

FlowableIdmEventType.getTypesFromString parses a comma-separated list of event-type names into FlowableIdmEventType values. If any token does not match a known event type constant, it throws this IllegalArgumentException naming the unknown type. This typically runs while parsing event-listener configuration for the IDM engine.

Solutions

  1. Correct the event-type string to one of the supported FlowableIdmEventType constant names.
  2. Check the FlowableIdmEventType class for the exact valid names in your version.
  3. If migrating versions, update renamed event types in your listener configuration.

Example fix

// before
FlowableIdmEventType.getTypesFromString("USER_CREATED,USER_DELETED");

// after
FlowableIdmEventType.getTypesFromString("USER_INITIALIZED,USER_DELETED"); // names must match enum constants
Defensive patterns

Strategy: validation

Validate before calling

Set<String> valid = Arrays.stream(FlowableIdmEventType.values())
    .flatMap(t -> Arrays.stream(t.getTypes()))
    .collect(Collectors.toSet());
for (String name : typeString.split(",")) {
    if (!valid.contains(name.trim())) {
        throw new IllegalArgumentException("Unknown IDM event type: " + name.trim());
    }
}

Try / catch

try {
    FlowableIdmEventType.getTypesFromString(cfg);
} catch (IllegalArgumentException e) {
    logger.error("Unknown event type in config: {}", e.getMessage());
}

Prevention

When it happens

Trigger: Calling getTypesFromString (or configuring IDM event listeners) with a type name that is not one of the enum's supported names, e.g. 'USER_CREATED' when only 'USER_INITIALIZED' variants exist, or a typo/case mismatch.

Common situations: Typo in flowable.idm.cfg.xml or Spring event-listener XML/property config; upgrading Flowable where an event type was renamed or removed; using engine event names in IDM listener config interchangeably.

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/6a42b76dc691c4c7. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-idm-api/src/main/java/org/flowable/idm/api/event/FlowableIdmEventType.java:102

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

        return result.toArray(EMPTY_ARRAY);
    }
}

View on GitHub (pinned to d6d39ce1c6)