flowable/flowable-engine · error · FlowableException

Errors while parsing:

Error message

Errors while parsing:

What it means

After XML conversion, CmmnParserImpl.validateCmmnModel runs semantic validation of the CMMN model. All collected validation errors are concatenated and thrown as a single FlowableException "Errors while parsing:\n..." listing each problem on its own line.

Solutions

  1. Read the exception message — it enumerates every validation error with its location.
  2. Fix each listed element (missing ids, dangling references, invalid structure) in the .cmmn file.
  3. Validate the model in a CMMN-compliant modeler before deploying.
  4. Run repository deployment validation earlier in CI to catch invalid definitions before runtime parse.

Example fix

// before
<planItem id="pi1" definitionRef="missingTask"/> <!-- definitionRef not defined -->
// after
<planItem id="pi1" definitionRef="task1"/>
<task id="task1" name="Task"/>
Defensive patterns

Strategy: try-catch

Validate before calling

// Deploy-time pre-validation via repository service or CMMN validator before runtime parse

Try / catch

try { parser.parse(...); } catch (FlowableException e) { if (e.getMessage().startsWith("Errors while parsing:")) { for (String line : e.getMessage().split("\n")) log.warn(line); } throw e; }

Prevention

When it happens

Trigger: Parsing a syntactically valid CMMN document that violates model rules (e.g. missing required attributes/references, invalid plan item structure) such that the validator's error list is non-empty.

Common situations: Case models referencing non-existent plan items/stages; missing sentry/entry criteria references; hand-written CMMN missing required elements; exports from modeling tools with unsupported constructs.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/parser/CmmnParserImpl.java:108

            logger.warn("Case should be validated, but no case validator is configured on the case engine configuration!");
        } else {
            List<ValidationEntry> validationEntries = caseValidator.validate(cmmnModel);
            if (validationEntries != null && !validationEntries.isEmpty()) {

                StringBuilder warningBuilder = new StringBuilder();
                StringBuilder errorBuilder = new StringBuilder();

                for (ValidationEntry entry : validationEntries) {
                    if (entry.getLevel() == ValidationEntry.Level.Warning) {
                        warningBuilder.append(entry).append("\n");
                    } else {
                        errorBuilder.append(entry).append("\n");
                    }
                }

                // Throw exception if there is any error
                if (errorBuilder.length() > 0) {
                    throw new FlowableException("Errors while parsing:\n" + errorBuilder);
                }

                // Write out warnings (if any)
                if (warningBuilder.length() > 0) {
                    logger.warn("Following warnings encountered during case validation: {}", warningBuilder);
                }

            }
        }
    }

    public void processCmmnElements(CmmnModel cmmnModel, CmmnParseResult parseResult) {
        for (Case caze : cmmnModel.getCases()) {
            cmmnParseHandlers.parseElement(this, parseResult, caze);
        }
    }

    public void processDI(CmmnModel cmmnModel, List<CaseDefinitionEntity> caseDefinitions) {

View on GitHub (pinned to d6d39ce1c6)