Can I change the process-instance start time explicitly for testing?

Can I change the process-instance start time explicitly for testing just after it is created? Would it affect (break) any of the functionality?

Also I have the History enabled (mode: full), so are these the tables affected or am I missing any?

  • ACT_HI_ACTINST
  • ACT_HI_PROCINST
  • ACT_HI_DETAIL

Hi @vermauv,

In general, that should be ok. If you have a unit test, I recommend looking at the (internal) class org.camunda.bpm.engine.impl.util.ClockUtil which lets you pin the time to any value before starting the process instance. Don’t use it outside of unit tests, though, because it may have unexpected side effects.

Cheers,
Thorben

2 Likes

Thanks @thorben :slight_smile: