Hello
I implement bpmn.js in an angular project. In development mode everything is OK and works properly. but in production mode, I got this error when I import .bpmn file to the modeler:
error Error: unparsable content </head> detected
line: 262
column: 62
nested error: closing tag mismatch
this is the .bpmn file:
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1">
<bpmn:process id="Process_1" isExecutable="false">
<bpmn:startEvent id="StartEvent_1"/>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/>
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
And this is how I call it:
load(): void {
this.getExample().subscribe(data => {
this.modeler.importXML(data).then(result => {
console.log('success', result);
}, (error) => console.log('error', error));
});
}
public getExample(): Observable<string> {
const url = '/assets/bpmn/diagram.bpmn'; // local
return this._http.get(url, { responseType: 'text' });
}