flowable / flowable/flowable-engine

after call method runtimeService.deleteMultiInstanceExecution, then got exception while call method taskService.complete

Aperta
#3,133 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
9.5k
Fork
2.9k
Merge medio
7h 8m
PR unite (30g)
2

Descrizione

**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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.