flowable / flowable/flowable-engine
after call method runtimeService.deleteMultiInstanceExecution, then got exception while call method taskService.complete
- Vorherrschende Sprache
- Java
- Sterne
- 9.5k
- Forks
- 2.9k
- Ø Merge
- 7 Std. 8 Min.
- Gemergte PRs (30 T.)
- 2
Beschreibung
**Describe the bug**
first, the exception is
'Could not execute inner activity behavior of multi instance behavior'
then, the operation is
1. multiInstanceLoopCharacteristics isSequential="**true**";
2. call method runtimeService.addMultiInstanceExecution to add some executions;
3. and call method runtimeService.deleteMultiInstanceExecution to delete on execution;
4. call method taskService.complete to approve the task;
then got the error.
the value of variables nrOfActiveInstances/nrOfCompletedInstances didn't change.
**Expected behavior**
multiInstance can add or delete execution, and can complete task.
**Code**
```
```
```
runtimeService.setVariable(defaultTask.getExecutionId(), "users", users);
// 第二个参数取巧,procInstId恰好是所有execution的parentId
users.forEach(userId -> runtimeService.addMultiInstanceExecution(workflowEventBO.getElementId(), workflowEventBO.getProcessInstanceId(), Collections.singletonMap("user", userId)));
// 减签(删除默认处理人对应数据)
runtimeService.deleteMultiInstanceExecution(defaultTask.getExecutionId(), true);
```
**Additional context**
the exception happen at
MultiInstanceActivityBehavior.executeOriginalBehavior.while.loopCounter
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Reproduziere den sequenziellen Multi-Instance-Ablauf mit dem im Bericht gezeigten XML und den Aufrufen von runtimeService. Beginne bei MultiInstanceActivityBehavior.executeOriginalBehavior und untersuche, wie sich loopCounter und nrOfActiveInstances/nrOfCompletedInstances nach addMultiInstanceExecution und deleteMultiInstanceExecution verhalten. Erledigt ist die Aufgabe, wenn taskService.complete ohne die gemeldete Ausnahme abgeschlossen wird und die Multi-Instance-Zähler konsistent bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- api, backend
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100