flowable / flowable/flowable-engine
after call method runtimeService.deleteMultiInstanceExecution, then got exception while call method taskService.complete
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 7h 8m
- Merged PRs (30d)
- 2
Description
**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
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.