flowable / flowable/flowable-engine

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

オープン
#3,133 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
9.5k
フォーク
2.9k
平均マージ
7時間 8分
マージ済み PR(30日)
2

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

レポートに示されている XML と runtimeService の呼び出しを使用して、シーケンシャルなマルチインスタンスフローを再現します。MultiInstanceActivityBehavior.executeOriginalBehavior から開始し、addMultiInstanceExecution と deleteMultiInstanceExecution の後に loopCounter と nrOfActiveInstances/nrOfCompletedInstances がどのように変化するかを確認します。taskService.complete が報告された例外なしで完了し、マルチインスタンスのカウンターが一貫性を保っていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
api, backend
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。