const navigation = {enabled: true}; const loadOptions = {fit: {type: bpmnvisu.FitType.Center, margin: 20}}; class BpmnVisualizationCustomizedColors extends bpmnvisu.BpmnVisualization { constructor(globalOptions) { super(globalOptions); this.configureStyle(); } configureStyle() { // do nothing by default } } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // custom markers for message flows //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class BpmnVisualizationCustomColorsMarkers extends BpmnVisualizationCustomizedColors { configureStyle() { const styleSheet = this.graph.getStylesheet(); // mxStylesheet parameter const style = styleSheet.styles[bpmnvisu.FlowKind.MESSAGE_FLOW]; style[bpmnvisu.BpmnStyleIdentifier.EDGE_START_FILL_COLOR] = '#ee1cb0'; style[bpmnvisu.BpmnStyleIdentifier.EDGE_END_FILL_COLOR] = 'orange'; } } const bpmnVisualization1 = new BpmnVisualizationCustomColorsMarkers({container: 'bpmn-container-1', navigation}); bpmnVisualization1.load(getIncidentManagementBpmnDiagram(), loadOptions); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // custom markers for sequence flows //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// class BpmnVisualizationCustomColorsMarkersSeqFlow extends BpmnVisualizationCustomizedColors { configureStyle() { const styleSheet = this.graph.getStylesheet(); // mxStylesheet parameter const seqFlowConditionalMarkerFromActivityStyle = styleSheet.styles[bpmnvisu.SequenceFlowKind.CONDITIONAL_FROM_ACTIVITY]; seqFlowConditionalMarkerFromActivityStyle[bpmnvisu.BpmnStyleIdentifier.EDGE_START_FILL_COLOR] = '#6a71ee'; } } const bpmnVisualization2 = new BpmnVisualizationCustomColorsMarkersSeqFlow({container: 'bpmn-container-2', navigation}); bpmnVisualization2.load(sequenceFlowDiagram(), loadOptions); function sequenceFlowDiagram() { return ` Flow_1qbojo4 Flow_0e2llvg Flow_07vj0qd Flow_1io36a6 Flow_0zxbqa5 Flow_1nstpgm Flow_0v4ibpj Flow_06mrz3i Flow_1io36a6 Flow_0v4ibpj Flow_0jjktak Flow_07vj0qd Flow_0jjktak Flow_1nstpgm Flow_04af1mr Flow_1qbojo4 Flow_0e2llvg Flow_0zxbqa5 Flow_04af1mr Flow_06mrz3i Flow_0jud8xv Flow_0jud8xv `; }