MCPcopy Index your code
hub / github.com/simstudioai/sim / setNodeOutput

Method setNodeOutput

apps/sim/executor/execution/block-executor.ts:321–342  ·  view source on GitHub ↗
(node: DAGNode, output: NormalizedBlockOutput, duration = 0)

Source from the content-addressed store, hash-verified

319 }
320
321 private setNodeOutput(node: DAGNode, output: NormalizedBlockOutput, duration = 0): void {
322 this.state.setBlockOutput(node.id, output, duration)
323
324 const originalBlockId = node.metadata.originalBlockId
325 const branchIndex = node.metadata.branchIndex
326 if (
327 node.metadata.isParallelBranch &&
328 originalBlockId &&
329 branchIndex !== undefined &&
330 extractOuterBranchIndex(node.id) === undefined
331 ) {
332 const globalBranchNodeId = buildBranchNodeId(originalBlockId, branchIndex)
333 if (globalBranchNodeId !== node.id) {
334 this.state.setBlockOutput(globalBranchNodeId, output, duration)
335 }
336 this.state.setBlockOutput(
337 buildOuterBranchScopedId(originalBlockId, branchIndex),
338 output,
339 duration
340 )
341 }
342 }
343
344 private findHandler(block: SerializedBlock): BlockHandler | undefined {
345 return this.blockHandlers.find((h) => h.canHandle(block))

Callers 2

executeMethod · 0.95
handleBlockErrorMethod · 0.95

Calls 4

extractOuterBranchIndexFunction · 0.90
buildBranchNodeIdFunction · 0.90
buildOuterBranchScopedIdFunction · 0.90
setBlockOutputMethod · 0.65

Tested by

no test coverage detected