flowable/flowable-engine · error · XMLException
No errorCode defined mapException with errorCode=${errorCode
Error message
No errorCode defined mapException with errorCode=${errorCode} and class=${exceptionClass} What it means
When parsing a <mapException> element the converter requires a non-empty errorCode attribute, because the error code is the key used to match thrown exceptions to their mapped Java class. An empty or missing errorCode makes the parser throw XMLException.
Source
Thrown at modules/flowable-bpmn-converter/src/main/java/org/flowable/bpmn/converter/child/FlowableMapExceptionParser.java:56
return;
}
String errorCode = xtr.getAttributeValue(null, MAP_EXCEPTION_ERRORCODE);
String andChildren = xtr.getAttributeValue(null, MAP_EXCEPTION_ANDCHILDREN);
String rootCause = xtr.getAttributeValue(null, MAP_EXCEPTION_ROOTCAUSE);
String exceptionClass = xtr.getElementText();
boolean hasChildrenBool = false;
if (StringUtils.isEmpty(andChildren) || "false".equals(andChildren.toLowerCase())) {
hasChildrenBool = false;
} else if ("true".equals(andChildren.toLowerCase())) {
hasChildrenBool = true;
} else {
throw new XMLException("'" + andChildren + "' is not valid boolean in mapException with errorCode=" + errorCode + " and class=" + exceptionClass);
}
if (StringUtils.isEmpty(errorCode) || StringUtils.isEmpty(errorCode.trim())) {
throw new XMLException("No errorCode defined mapException with errorCode=" + errorCode + " and class=" + exceptionClass);
}
((Activity) parentElement).getMapExceptions().add(new MapExceptionEntry(errorCode, exceptionClass, hasChildrenBool, rootCause));
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Add a non-empty errorCode attribute to the mapException element
- Remove the empty/placeholder mapException element if it is unused
- Redeploy the process definition after the fix
Example fix
<!-- before --> <flowable:mapException errorCode="" exceptionClass="java.lang.Exception"/> <!-- after --> <flowable:mapException errorCode="MY_ERR" exceptionClass="java.lang.Exception"/>
Defensive patterns
Strategy: try-catch
Try / catch
try { bpmnXMLConverter.convertToBpmnModel(xmlInput); } catch (XMLException e) { /* add missing errorCode */ } Prevention
- Ensure every mapException has a non-empty errorCode
When it happens
Trigger: Parsing BPMN XML with <flowable:mapException exceptionClass="..."/> lacking an errorCode attribute, or with errorCode="" or whitespace only.
Common situations: Copy-pasted mapException elements where errorCode was removed; modelers generating incomplete attributes; template placeholders like ${errorCode} not substituted before deployment.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- '${andChildren}' is not valid boolean in mapException with e
- variableListenerEventDefinition is only supported for events
- Error code must not be null.
- Error code must not be empty.
- 'html' or 'text' is required to be defined when using the ma
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/7ac921bd1a2ba02b.
Report an issue: GitHub.