flowable/flowable-engine · error · XMLException

No converter for ${flowElement.getClass()} found

Error message

No converter for ${flowElement.getClass()} found

What it means

createXML(FlowElement, ...) looks up the XML writer converter in convertersToXMLMap by the flow element's class; if no BaseBpmnXMLConverter is registered for that concrete class it throws this XMLException. It means the model contains a FlowElement subtype the converter cannot serialize.

Source

Thrown at modules/flowable-bpmn-converter/src/main/java/org/flowable/bpmn/converter/BpmnXMLConverter.java:701

                if (StringUtils.isNotEmpty(adhocSubProcess.getCompletionCondition())) {
                    xtw.writeStartElement(ELEMENT_COMPLETION_CONDITION);
                    xtw.writeCData(adhocSubProcess.getCompletionCondition());
                    xtw.writeEndElement();
                }
            }

            for (Artifact artifact : subProcess.getArtifacts()) {
                createXML(artifact, model, xtw);
            }

            xtw.writeEndElement();

        } else {

            BaseBpmnXMLConverter converter = convertersToXMLMap.get(flowElement.getClass());

            if (converter == null) {
                throw new XMLException("No converter for " + flowElement.getClass() + " found");
            }

            converter.convertToXML(xtw, flowElement, model, options);
        }
    }

    protected void createXML(Artifact artifact, BpmnModel model, XMLStreamWriter xtw) throws Exception {

        BaseBpmnXMLConverter converter = convertersToXMLMap.get(artifact.getClass());

        if (converter == null) {
            throw new XMLException("No converter for " + artifact.getClass() + " found");
        }

        converter.convertToXML(xtw, artifact, model, options);
    }
}

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Register a converter for the custom element class with converter.addConverter(MyElement.class, MyConverter.class) before serialization.
  2. Implement a BaseBpmnXMLConverter subclass for the unsupported element type (writeElementAttributes/writeChildElements).
  3. Remove or replace the unsupported element in the model before calling convertToXML.
  4. Align Flowable versions so the element type is one the converter knows.

Example fix

// before
model.addFlowElement(new MyCustomElement("id1")); // no converter registered -> throws
converter.convertToXML(model, out);
// after
BpmnXMLConverter converter = new BpmnXMLConverter();
converter.addConverter(MyCustomElement.class, new MyCustomElementXMLConverter());
converter.convertToXML(model, out);
Defensive patterns

Strategy: type-guard

Type guard

boolean isSerializable(BpmnXMLConverter c, FlowElement el) {
    return c != null && el != null
        && c.getConvertersToXMLMap().containsKey(el.getClass()); // or track registered element classes yourself
}

Try / catch

try {
    converter.convertToXML(model, out);
} catch (XMLException e) {
    if (e.getMessage().startsWith("No converter for ")) {
        throw new ModelSerializationException("Register a converter for the custom element (see addConverter)", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling convertToXML on a BpmnModel that contains a FlowElement subclass not present in convertersToXMLMap — typically a custom FlowElement added programmatically, or a class introduced by a newer Flowable version being written by an older converter.

Common situations: Developers extending BpmnModel with custom flow elements without registering a matching converter via BpmnXMLConverter.addConverter (or without extending BaseBpmnXMLConverter); mixed Flowable versions between designer and engine.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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