Buttom always active


Hi all!

I have four buttoms in my modeler.

 var exportArtifacts = debounce(function() {

    saveSVG(function(err, svg) {
      setEncoded(downloadSvgLink, 'diagram.svg', err ? null : svg);

    saveDiagram(function(err, xml) {
      setEncoded(downloadLink, 'diagram.bpmn', err ? null : xml);

    saveJSON(function(err, json) {
      setEncoded(downloadJsonLink, 'diagram.json', err ? null : json);

    saveGet(function(err, json) {
      setEncoded(downloadGetLink, 'diagram.json', err ? null: json);

  }, 500);
  bpmnModeler.on('commandStack.changed', exportArtifacts);

I need the first two to activate when there are changes. But the last two are always activated.

var eventBus = bpmnModeler.get('eventBus');
eventBus.on('elements.changed', myFunction);

This is how I handle my save button. Hope it helps you.


Can you explain how the exportArtifacts function is supposed to work?


I only need to create a normal button in the modeler that call a function when somebody click it.


And what is this function supposed to do?


@anapareciendo: Please share a running / prototypical example that clearly shows what you’re trying to achieve, what is working and what is not.

Use our existing starter projects to quickly hack it or share your existing, partial solution on GitHub. Provide the necessary pointers that allow us to quickly understand where you got stuck.

This way we may be able to help you in a constructive manner.

Thanks :heart:


Thanks for the info!

Finally, I only need to modify the CSS code. So it’s solved!

I will try to get more information about my code in the next issue.