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?
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.
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.