AnsweredAssumed Answered

The ACT_RU_TASK.TASK_DEF_KEY_ is not set after updating taskEntity

Question asked by ginxo on Jul 22, 2016
Hello friends,

I'm updating a TaskEntity (i get them doing taskEntityManager.findTasksByProcessInstanceId(processInstanceId);) but when i update it and flush it the only thing it's not updated is the TASK_DEF_KEY_ column

    //get tasks
    private void setNewTaskValues(final TaskEntity taskEntity, final FlowElement newFlowElement) {
        UserTask userTask = (UserTask) newFlowElement;
        taskEntity.setNameWithoutCascade(userTask.getName());
        taskEntity.setTaskDefinitionKeyWithoutCascade(userTask.getId()); // if I use the setTaskDefinitionKey even the ACT_HI_TASKINST is updated but not the one from ACT_RU_TASK
        taskEntity.setFormKeyWithoutCascade(userTask.getFormKey());
    }
    //update
    //flush

Probably i'm missing something during the updating process, some kind of trigger, I've reviewed the mybatis queries but I don't see anything relevant.
I'm using activiti 5.20.0 version.
Please can any of you give me some light on it?

Thanks a lot,
Kike.

Outcomes