Custom render reuses default renderer


#1

Hi guys,

I need to mark executed pass of the flow.
I want to use CustomRender for this purpose.
I want to get default rendered element’s shapes and mark them somehow, for example change color.
How can I get those default shapes and update them at drawShape/drawConnection methods of CustomRenderer?

Thanks a lot


#2

Sorry for waste of topic, I don’t see how I can delete not that smart questions I post.
I found an answer at this example:


#3

There is no need for a custom renderer if you only want to color elements. You can use the existing API to simply set the color. Read more about it here.


#4

Thanks for the response.
I tried this example and it worked for me.
The issue is, that I am using BpmnViewer, not modeler.


#5

Even then it is possible to get around implementing a custom renderer by using more low-level APIs. I’ve done exactly this in bpmn-js-token-simulation in case you’re interested.