Skip to content

Commit fec6074

Browse files
committed
address bugbot comments and fix tests
1 parent 221125f commit fec6074

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

apps/sim/executor/handlers/workflow/workflow-handler.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ describe('WorkflowBlockHandler', () => {
198198

199199
expect(result).toEqual({
200200
success: true,
201+
childWorkflowId: 'child-id',
201202
childWorkflowName: 'Child Workflow',
202203
result: { data: 'test result' },
203204
childTraceSpans: [],
@@ -235,6 +236,7 @@ describe('WorkflowBlockHandler', () => {
235236

236237
expect(result).toEqual({
237238
success: true,
239+
childWorkflowId: 'child-id',
238240
childWorkflowName: 'Child Workflow',
239241
result: { nested: 'data' },
240242
childTraceSpans: [],

apps/sim/executor/handlers/workflow/workflow-handler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,14 +536,15 @@ export class WorkflowBlockHandler implements BlockHandler {
536536
message: `"${childWorkflowName}" failed: ${childResult.error || 'Child workflow execution failed'}`,
537537
childWorkflowName,
538538
childTraceSpans: childTraceSpans || [],
539+
childWorkflowSnapshotId,
539540
})
540541
}
541542

542543
return {
543544
success: true,
544545
childWorkflowName,
545546
childWorkflowId,
546-
childWorkflowSnapshotId,
547+
...(childWorkflowSnapshotId ? { childWorkflowSnapshotId } : {}),
547548
result,
548549
childTraceSpans: childTraceSpans || [],
549550
} as Record<string, any>

0 commit comments

Comments
 (0)