{"record":{"id":"63878df533b578c2","repo":"flowable/flowable-engine","slug":"no-converter-for-artifact-getclass-found","errorCode":null,"errorMessage":"No converter for ${artifact.getClass()} found","messagePattern":"No converter for (.+?) found","errorType":"exception","errorClass":"XMLException","httpStatus":null,"severity":"error","filePath":"modules/flowable-bpmn-converter/src/main/java/org/flowable/bpmn/converter/BpmnXMLConverter.java","lineNumber":713,"sourceCode":"\n        } else {\n\n            BaseBpmnXMLConverter converter = convertersToXMLMap.get(flowElement.getClass());\n\n            if (converter == null) {\n                throw new XMLException(\"No converter for \" + flowElement.getClass() + \" found\");\n            }\n\n            converter.convertToXML(xtw, flowElement, model, options);\n        }\n    }\n\n    protected void createXML(Artifact artifact, BpmnModel model, XMLStreamWriter xtw) throws Exception {\n\n        BaseBpmnXMLConverter converter = convertersToXMLMap.get(artifact.getClass());\n\n        if (converter == null) {\n            throw new XMLException(\"No converter for \" + artifact.getClass() + \" found\");\n        }\n\n        converter.convertToXML(xtw, artifact, model, options);\n    }\n}\n","sourceCodeStart":695,"sourceCodeEnd":719,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-bpmn-converter/src/main/java/org/flowable/bpmn/converter/BpmnXMLConverter.java#L695-L719","documentation":"The artifact counterpart of createXML(Artifact, ...): when convertersToXMLMap has no converter registered for the Artifact subclass (e.g. an Association or custom Artifact type) the converter throws XMLException(\"No converter for <class> found\"). Serialization cannot proceed for that artifact.","triggerScenarios":"convertToXML on a BpmnModel whose process contains an Artifact subclass with no registered XML converter — custom Artifact implementations added programmatically, or artifact types not covered by the converter map in that Flowable version.","commonSituations":"Custom artifact extensions to the process model without a corresponding BaseBpmnXMLConverter, or engine/designer version mismatches where the writer doesn't know an artifact type present in the model.","solutions":["Register an artifact converter: converter.addConverter(MyArtifact.class, new MyArtifactXMLConverter()).","Implement the missing BaseBpmnXMLConverter subclass for the artifact type.","Remove the unsupported artifact from the model or replace it with a supported one (e.g. standard Association/TextAnnotation).","Upgrade/align Flowable versions so the artifact type is supported out of the box."],"exampleFix":"// before\nprocess.addArtifact(new MyLink(\"link1\")); // unknown artifact type\nconverter.convertToXML(model, out); // throws\n// after\nclass MyLinkXMLConverter extends BaseBpmnXMLConverter { /* implement */ }\nconverter.addConverter(MyLink.class, new MyLinkXMLConverter());\nconverter.convertToXML(model, out);","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"boolean isSerializable(BpmnXMLConverter c, Artifact a) {\n    return a == null || KNOWN_ARTIFACT_TYPES.contains(a.getClass()) // Association, TextAnnotation, ...\n        || converterRegisteredFor(c, a.getClass());\n}","tryCatchPattern":"try {\n    converter.convertToXML(model, out);\n} catch (XMLException e) {\n    if (e.getMessage().startsWith(\"No converter for \") && e.getMessage().contains(\"Artifact\") == false) { /* classify via message */ }\n    if (e.getMessage().startsWith(\"No converter for\")) {\n        throw new ModelSerializationException(\"Unsupported artifact type: \" + e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Register a BaseBpmnXMLConverter for every custom Artifact subclass via addConverter","Prefer standard artifacts (Association, TextAnnotation) unless an extension is truly needed","Cover artifacts in the round-trip serialization test suite"],"tags":["java","bpmn","converter","artifact"],"backgroundTag":"unsupported-operation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}