Exemple of how to create Custom sequence flow

Hi guys,

I try to find a simple example in github of how to create a custom sequence-flow and how to add this new custom sequence flow in the Change element context pad ?

image

Never mind. I found the solution

This is my code : export default class PopupMenuProvider {
constructor(modeling, popupMenu, bpmnRenderer, elementRegistry) {
this.modeling = modeling;
this.bpmnRenderer = bpmnRenderer;
this.elementRegistry = elementRegistry;
this.popupMenu = popupMenu;
popupMenu.registerProvider(‘bpmn-replace’, this);
}

getPopupMenuEntries(element) {
if (!is(element, ‘bpmn:SequenceFlow’)) {
return;
}
return {
‘entry-1’: {
className: ‘bpmn-icon-connection’,
label: ‘label’,
action: () => {
const outgoingGfx = this.elementRegistry.getGraphics(element.id);
attr(outgoingGfx, ‘stroke-dasharray’, 5);
this.popupMenu.close();
}

  }
};

}
}

PopupMenuProvider.$inject = [‘modeling’, ‘popupMenu’, ‘bpmnRenderer’, ‘elementRegistry’];Preformatted text

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.