flowable/flowable-engine · error · XMLException

'${andChildren}' is not valid boolean in mapException with e

Error message

'${andChildren}' is not valid boolean in mapException with errorCode=${errorCode} and class=${exceptionClass}

What it means

Flowable's BPMN XML converter parses <mapException> child elements of service-task-like activities. The 'andChildren' attribute must be 'true' or 'false' (or empty, treated as false); any other value makes the converter throw XMLException during model import/parse.

Source

Thrown at modules/flowable-bpmn-converter/src/main/java/org/flowable/bpmn/converter/child/FlowableMapExceptionParser.java:52

    @Override
    public void parseChildElement(XMLStreamReader xtr, BaseElement parentElement, BpmnModel model) throws Exception {
        if (!(parentElement instanceof Activity)) {
            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

  1. Set andChildren to exactly "true" or "false" (lowercase), or remove the attribute entirely (empty defaults to false)
  2. Re-validate/redeploy the BPMN XML after fixing the attribute
  3. If generating XML programmatically, ensure booleans are rendered as lowercase strings

Example fix

<!-- before -->
<flowable:mapException errorCode="MY_ERR" exceptionClass="java.lang.Exception" andChildren="True"/>
<!-- after -->
<flowable:mapException errorCode="MY_ERR" exceptionClass="java.lang.Exception" andChildren="true"/>
Defensive patterns

Strategy: try-catch

Try / catch

try { bpmnXMLConverter.convertToBpmnModel(xmlInput); } catch (XMLException e) { /* fix andChildren attribute */ }

Prevention

When it happens

Trigger: Deploying or parsing a BPMN XML file whose <flowable:mapException> element has an andChildren attribute set to something other than true/false, e.g. andChildren="True" (capitalized), "yes", "1" or a typo.

Common situations: Hand-authored or generated BPMN XML with boolean typos; tools exporting 'yes/no' booleans; after copying mapException definitions between modelers.

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