(
ctx: ExecutionContext,
loopId: string,
scope: LoopScope
)
| 310 | } |
| 311 | |
| 312 | private async createExitResult( |
| 313 | ctx: ExecutionContext, |
| 314 | loopId: string, |
| 315 | scope: LoopScope |
| 316 | ): Promise<LoopContinuationResult> { |
| 317 | const results = scope.allIterationOutputs |
| 318 | const totalIterations = results.length |
| 319 | const compactedResults = await compactSubflowResults(results, { |
| 320 | workspaceId: ctx.workspaceId, |
| 321 | workflowId: ctx.workflowId, |
| 322 | executionId: ctx.executionId, |
| 323 | largeValueExecutionIds: ctx.largeValueExecutionIds, |
| 324 | largeValueKeys: ctx.largeValueKeys, |
| 325 | allowLargeValueWorkflowScope: ctx.allowLargeValueWorkflowScope, |
| 326 | userId: ctx.userId, |
| 327 | requireDurable: true, |
| 328 | }) |
| 329 | const output = { results: compactedResults } |
| 330 | this.state.setBlockOutput(loopId, output, DEFAULTS.EXECUTION_TIME) |
| 331 | scope.allIterationOutputs = [] |
| 332 | |
| 333 | await emitSubflowSuccessEvents(ctx, loopId, 'loop', output, this.contextExtensions) |
| 334 | |
| 335 | return { |
| 336 | shouldContinue: false, |
| 337 | shouldExit: true, |
| 338 | selectedRoute: EDGE.LOOP_EXIT, |
| 339 | aggregatedResults: output.results, |
| 340 | totalIterations, |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | private async evaluateCondition( |
| 345 | ctx: ExecutionContext, |
no test coverage detected