Bpmn-js-token-simulation color reset

Hey,
I actually wanted to ask from @philippfromme privately, but then I realized others can be interested about this too.
So my question is whether its possible to prevent the color reset in the token simulator or not. This one:

I guess not but then I would like to ask what are the reasons of the color reset.
Also can you implement a config parameter that can prevent the color reset please?

What exactly do you mean by color reset? Changing the colors when enabling the simulation or changing them back afterwards? Why would you prevent it?

Changing the colors when enabling the simulation. I would like to prevent it, bec.I have nicely colored shapes and when I switch to the simulation mode all these colors are resetted to black and white.

The reason for that is that colors are used by the simulation to highlight sequence flows. You can disable this feature by overriding it with an empty module.

new BpmnJS({
  additionalModules: [
    bpmnTokenSimulationModule,
    {
      preserveElementColors: [ 'value', {} ]
    }
  ]
});
1 Like

Thank you very much Philipp, it works.

How to replicate this feature in bpmn-js-token-simulation latest version, 0.0.33? can you please explain

@philippfromme can you please answer on above question?

Please do not necrobump old topics. Instead link to this thread from new topic.

Cf. my answer for recent bpmn-js-token-simulation versions (i.e. 0.33.0).