I have service task throwing exception in some scenario so the process is terminated, I am trying to restart the process from the failed service task but the below call is throwing the exception : org.camunda.bpm.engine.BadUserRequestException: Historic process instance cannot be found: historicProcessInstanceId is null
camunda.getRuntimeService().restartProcessInstances()
.startBeforeActivity()
.processInstanceIds()
.execute();
Looking at the docs : Process Instance Restart | docs.camunda.org, it says “provided that the history level is set to FULL” so I even tried setting the full history log like below but still getting the same error.
ProcessEngineConfiguration
.createStandaloneInMemProcessEngineConfiguration()
.setHistory(ProcessEngineConfiguration.HISTORY_FULL)
.buildProcessEngine();
Am I missing something here? I didn’t see specific configuration needed for restart process to be able to work.
Thank you in advance.