I'm using camunda engine on Spring environment, so I'm trying to change process definition for a process instance just like http://docs.camunda.org/latest/guides/user-guide/#process-engine-process-versioning with:
@Transactional
public void migrateProcessInstance(String processInstanceId, int newVersion) {
SetProcessDefinitionVersionCmd command =
new SetProcessDefinitionVersionCmd(processInstanceId, newVersion);
((ProcessEngineImpl) processEngine)
.getProcessEngineConfiguration()
.getCommandExecutorTxRequired().execute(command);
}
But it's not working, it's executed without errors but when I see act_hi_procinst and act_ru_task tables nothing has changed. I've seen the SetProcessDefinitionVersionCmd code and I didn't see any call for update like other commands only a few changes for ExecutionEntity and TaskEntity, is that a bug in SetProcessDefinitionVersionCmd or am I doing something wrong?