Hi, I want to change the colour (stroke) of connections between two elements for each different connection type.
For example, I want the Sequence Flow Connection line to be red and the Default Flow Connection Line to be blue.
I tried overriding the DrawConnection method, but it doesn’t get called.
Is there a better method or have I done something wrong?
P.S. I wanna define the colors on Application initialization and not draw programmatically a line with a specific colour (stroke).
Then you’ll have to set colors on newly created connections (Example: Assign Color Example - CodeSandbox) and also on existing connections during import and export.
Yes, I have. I have tried three different types, namely the Sequence Flow, Default Flow and Conditional Flow as seen in the picture below, which are all red.
Furthermore, as you can see in the picture of the XML file, all connections have the same BPMN type: sequenceFlow.
How can I differentiate between these three and maybe future custom connection types?
PS: I can’t use the same connection you used for the blue connection as I have a custom palette and removed most of the native BPMN elements.