Skip to content

Commit e5b7a51

Browse files
vobuCopilot
andauthored
fix: update src/commands/diagram.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 4548c34 commit e5b7a51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/commands/diagram.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ export async function getProcessInstanceDiagram(key: string, options: {
5858
// 3. Extract completed element IDs (exclude PROCESS type)
5959
const completedElements = [...new Set(
6060
((elementInstances as any).items || [])
61-
.filter((el: any) => el.type !== 'PROCESS')
61+
.filter((el: any) =>
62+
el.type !== 'PROCESS' &&
63+
(el.state === 'COMPLETED' || el.state === 'TERMINATED')
64+
)
6265
.map((el: any) => el.elementId)
6366
)];
6467

0 commit comments

Comments
 (0)