How add bpmn in mvc core2.2

HI Iam use new project mv ccore2.2 iam add Library but dont show bpmn in page
iam see this error :


<script src=""></script>
<script src="~/bpmnjs/bpmn-viewer.development.js"></script>
<link rel="stylesheet" href="" />
<link rel="stylesheet" href="" />
<script src="~/bpmnjs/bpmn-modeler.development.js"></script>

<div id="canvas"></div>

<button id="save-button">print to console</button>

var diagramURL = './rtl.bpmn';
 //var diagramUrl = '';

//   var diagramURL = './rtl.bpmn';modeler instance
var bpmnModeler = new BpmnJS({
    container: '#canvas',
    keyboard: {
        bindTo: window

/* Save diagram contents and print them to the console.
function exportDiagram() {

    bpmnModeler.saveXML({ format: true }, function(err, xml) {

        if (err) {
            return console.error('could not save BPMN 2.0 diagram', err);

        alert('Diagram exported. Check the developer tools!');

        console.log('DIAGRAM', xml);

 * Open diagram in our modeler instance.

function openDiagram(bpmnXML) {

    // import diagram
    bpmnModeler.importXML(bpmnXML, function(err) {

        if (err) {
            return console.error('could not import BPMN 2.0 diagram', err);

        // access modeler components
        var canvas = bpmnModeler.get('canvas');
        var overlays = bpmnModeler.get('overlays');

        // zoom to fit full viewport

        // attach an overlay to a node
        overlays.add('SCAN_OK', 'note', {
            position: {
                bottom: 0,
                right: 0
            html: '<div class="diagram-note">Mixed up the labels?</div>'

        // add marker
        canvas.addMarker('SCAN_OK', 'needs-discussion');

// load external diagram file via AJAX and open it
//  $.get(diagramUrl, openDiagram, 'text');

// wire save button

   .then(r => r.text())
   .then(diagramXML => openDiagram(diagramXML));

I do not see any error, which one do you see?

It reveals your bpmn file is missing (GET http://localhost:5855/rtl.bpmn - 404). Make sure the file is available.

1 Like

tahnks iam think dont know rtl.bpmn vs… change rtl.bpmn to rtl.xml
sloved problem

This topic was automatically closed after 6 hours. New replies are no longer allowed.