CustomRenderer - how to redraw the model?

How can we update the rendered model?
so that the method CustomRenderer:: drawShape() is called again, as it is called after the xml is imported.

It is required for us to enable updating the visualization of the model based on changes coming from an external service.

The renderer is called whenever an element changed

So it should be possible to execute it on demand, e.g. by simply updating a shape’s properties

1 Like

Thanks, yes, I’ve relying on this when changing the element.
Yet, here is the case that this is some dynamic aspect that is drawn over the model when an event is received from the external service
(and for that we don’t want to change any element).

Anyway, we believe that it should be logical to add some method to initiate redrawing.

some workaround for us could be maybe doing some change that is not visible, or doing a small change and then returning it the previous state, or having some hidden element (if hiding is possible) and changing that one …

Can you elaborate? What changes are coming in and how would they be reflected visually? bpmn-js has a well defined concept for re-rendering elements after they have changed. Usually you’d not want to mess with this by calling low-level methods.