flowable / flowable/flowable-engine

Can't update start user id for historic process instance

Open
#1,983 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
9.5k
Forks
2.9k
Avg merge
7h 8m
Merged PRs (30d)
2

Description

**Describe the bug**
Can't update start user id for historic process instance.
I checked the mybatis mapping xml for historicProcessInstance, there is no update sql for start user id. We need to update the start user id to null when the user need to be off boarding.

**Expected behavior**
The start user id can be updated.

**Code**
HistoricProcessInstanceEntityManager historicProcessInstanceEntityManager =
CommandContextUtil.getHistoricProcessInstanceEntityManager();
List processInstanceList =
historicProcessInstanceEntityManager.findHistoricProcessInstancesByQueryCriteria(historicProcessInstanceQuery);
for (HistoricProcessInstance processInstance : processInstanceList) {
HistoricProcessInstanceEntity processEntity = (HistoricProcessInstanceEntity) processInstance;
processEntity.setStartUserId(null);
historicProcessInstanceEntityManager.update(processEntity);
}

**Additional context**
Flowable version: 6.4.2
Database: postgresql 11

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.