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

Method execute

apps/sim/executor/execution/executor.ts:86–104  ·  view source on GitHub ↗
(workflowId: string, triggerBlockId?: string)

Source from the content-addressed store, hash-verified

84 }
85
86 async execute(workflowId: string, triggerBlockId?: string): Promise<ExecutionResult> {
87 const savedIncomingEdges = this.contextExtensions.dagIncomingEdges
88 const dag = this.dagBuilder.build(this.workflow, {
89 triggerBlockId,
90 savedIncomingEdges,
91 includeAllBlocks: this.contextExtensions.resumeFromSnapshot === true,
92 })
93 const restoredClonedSubflows = this.restoreSnapshotParallelBatches(
94 dag,
95 this.contextExtensions.snapshotState
96 )
97 this.restoreSavedIncomingEdges(dag, savedIncomingEdges)
98 const { context, state } = this.createExecutionContext(workflowId, triggerBlockId)
99 context.subflowParentMap = this.buildSubflowParentMap(dag)
100 this.registerRestoredClonedSubflows(context.subflowParentMap, restoredClonedSubflows)
101
102 const engine = this.buildExecutionPipeline(context, dag, state)
103 return await engine.run(triggerBlockId)
104 }
105
106 async continueExecution(
107 _pendingBlocks: string[],

Callers

nothing calls this directly

Calls 8

buildSubflowParentMapMethod · 0.95
runMethod · 0.65
buildMethod · 0.45

Tested by

no test coverage detected