Bpmn-js-token-simulation color reset


#1

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?


#2

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?


#3

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.


#4

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', {} ]
    }
  ]
});

#5

Thank you very much Philipp, it works.