flowable/flowable-engine · error · ActivitiIllegalArgumentException
unknown type
Error message
unknown type '${type}' ${id} What it means
FormTypes.parseFormPropertyType throws ActivitiIllegalArgumentException when a form property in the BPMN XML declares a type that has not been registered in the engine's form type registry (string, long, date, enum, boolean are built in). The lookup formTypes.get(type) returned null so no FormType exists to parse/convert values.
Solutions
- Register the custom type: processEngineConfiguration.getFormTypes().addFormType(new MyFormType()) before deploying/starting
- Fix the type attribute spelling in the BPMN XML to a built-in type (string, long, boolean, date, enum)
- Verify deployment/upgrade did not drop custom FormType registrations
Example fix
// before <activiti:formProperty id="color" type="colour"/> // unknown // after <activiti:formProperty id="color" type="string"/> // or register it: processEngineConfiguration.getFormTypes().addFormType(new ColourFormType());
Defensive patterns
Strategy: validation
Validate before calling
Set<String> known = formTypes.getFormTypes(); // FormTypes exposes registered names
if (!known.contains(formProperty.getType()))
throw new IllegalArgumentException("Register or fix form type: " + formProperty.getType()); Try / catch
try {
repositoryService.createDeployment().addClasspathResource("process.bpmn20.xml").deploy();
} catch (ActivitiIllegalArgumentException e) {
if (e.getMessage().startsWith("unknown type")) { /* register custom FormType, redeploy */ }
else throw e;
} Prevention
- Register all custom FormTypes in engine configuration before deployment
- Keep a central list of allowed type names and validate BPMN against it
- Lint BPMN form property types in CI
When it happens
Trigger: Deploying/starting a process whose <activiti:formProperty id=... type="customType"/> names a type never registered via ProcessEngineConfigurationImpl.setFormTypes or a custom FormType name with a typo.
Common situations: Custom form type class exists but was never registered on the engine configuration; upgrade removed/renamed a custom type; typo like 'dtae' instead of 'date'; copy-pasted type name from another engine.
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
- Cannot complete BPMN job. There is no BPMN engine available
- Cannot create an event-throwing event-listener, unknown…
- Cannot query external jobs. There is no BPMN or CMMN engine…
- Cannot start process instance by message: subscription to…
- Could not resolve key for
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/15e1e389072d15db.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/form/FormTypes.java:54
public AbstractFormType parseFormPropertyType(FormProperty formProperty) {
AbstractFormType formType = null;
if ("date".equals(formProperty.getType()) && StringUtils.isNotEmpty(formProperty.getDatePattern())) {
formType = new DateFormType(formProperty.getDatePattern());
} else if ("enum".equals(formProperty.getType())) {
// ACT-1023: Using linked hashmap to preserve the order in which the entries are defined
Map<String, String> values = new LinkedHashMap<>();
for (FormValue formValue : formProperty.getFormValues()) {
values.put(formValue.getId(), formValue.getName());
}
formType = new EnumFormType(values);
} else if (StringUtils.isNotEmpty(formProperty.getType())) {
formType = formTypes.get(formProperty.getType());
if (formType == null) {
throw new ActivitiIllegalArgumentException("unknown type '" + formProperty.getType() + "' " + formProperty.getId());
}
}
return formType;
}
}
View on GitHub (pinned to d6d39ce1c6)