flowable/flowable-engine · error · ActivitiException
Errors while parsing: ${errorBuilder}
Error message
Errors while parsing:
${errorBuilder} What it means
After parsing a BPMN XML document, BpmnParse runs process validation and aggregates all errors into errorBuilder. If any validation problems were found, it throws this ActivitiException listing them all at once, aborting the parse/deployment.
Source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/BpmnParse.java:192
List<ValidationError> validationErrors = processValidator.validate(bpmnModel);
if (validationErrors != null && !validationErrors.isEmpty()) {
StringBuilder warningBuilder = new StringBuilder();
StringBuilder errorBuilder = new StringBuilder();
for (ValidationError error : validationErrors) {
if (error.isWarning()) {
warningBuilder.append(error);
warningBuilder.append("\n");
} else {
errorBuilder.append(error);
errorBuilder.append("\n");
}
}
// Throw exception if there is any error
if (errorBuilder.length() > 0) {
throw new ActivitiException("Errors while parsing:\n" + errorBuilder);
}
// Write out warnings (if any)
if (warningBuilder.length() > 0) {
LOGGER.warn("Following warnings encountered during process validation: {}", warningBuilder);
}
}
}
}
bpmnModel.setSourceSystemId(sourceSystemId);
bpmnModel.setEventSupport(new FlowableEventSupport());
// Validation successful (or no validation)
transformProcessDefinitions();
} catch (Exception e) {View on GitHub (pinned to d6d39ce1c6)
Solutions
- Read the full errorBuilder message in the exception — it enumerates each validation problem with element/line context
- Fix each listed problem in the BPMN XML (missing elements, broken references, invalid attributes)
- Run the XML through a BPMN validator or the engine's repositoryService validation API before deploying
- Regenerate the diagram from a conforming modeler (e.g. Flowable Modeler) if the source tool produced invalid XML
Defensive patterns
Strategy: try-catch
Validate before calling
// validate before deploy
List<ValidationError> errors = repositoryService.validateProcess(bpmnXmlInputStream);
if (!errors.isEmpty()) { /* fix first */ } Try / catch
try {
repositoryService.createDeployment().addInputStream(name, xml).deploy();
} catch (ActivitiException e) {
if (e.getMessage().startsWith("Errors while parsing:")) {
String[] problems = e.getMessage().split("\\n");
// report each listed validation problem
}
} Prevention
- Run the repository validation API or a BPMN validator in CI before deployment
- Generate XML only from conforming BPMN modelers
- Keep processes small and deploy-test incrementally so errors stay readable
When it happens
Trigger: Deploying or parsing a BPMN 2.0 XML file that fails the process validator: e.g. references to undefined elements, invalid sequence-flow wiring, missing required attributes, duplicate ids.
Common situations: Importing diagrams exported by non-conforming tools; hand-edited process definitions; upgrading engine versions where validation rules became stricter; deploying many processes and only the offending file's errors are reported.
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
- EventRegistryEventDefinition on '" + elementId + "' has an e
- The deployment contains process definitions with the same ke
- Error parsing XML
- No script provided for scriptTask {}
- The bpmn 2.0 xml is not properly encoded
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/22293363344f4ea9.
Report an issue: GitHub.