flowable / flowable/flowable-engine
Can't update start user id for historic process instance
- Vorherrschende Sprache
- Java
- Sterne
- 9.5k
- Forks
- 2.9k
- Ø Merge
- 7 Std. 8 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
**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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit dem im Issue erwähnten MyBatis-Mapping-XML für HistoricProcessInstance und dem Aktualisierungspfad von HistoricProcessInstanceEntityManager. Reproduziere die Aktualisierung mit auf null gesetztem startUserId auf PostgreSQL und überprüfe anschließend, dass die historische Prozessinstanz den geleerten Wert persistiert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java, postgresql
- Bereich
- backend, databases
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 42/100