Hi,
In our BPM project, we need the process to wait before performing the next external worker call. The way I implemented this is as follows.
However I will need to unit test this, and just following the external worker flow will not work. I have tried looking for the answer in the JobTestHelper documentation, and came across the following (also referenced in another topic on this forum):
Job timer = managementService.createTimerJobQuery().singleResult();
while (timer == null){
timer = managementService.createTimerJobQuery().singleResult();
}
Job executableJob = managementService.moveTimerToExecutableJob(timer.getId());
managementService.executeJob(executableJob.getId());
This implementation gives the following error
HistoricActivityInstanceEntity [...] was updated by another transaction concurrently
my question: is this the correct way to implement the timer in my process, and if so, what is the correct way to implement the timer in my unit tests?
Best regards,
Sebastiaan