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

Function runResumeAndCellTerminal

apps/sim/background/resume-execution.ts:294–319  ·  view source on GitHub ↗
(
  payload: ResumeExecutionPayload,
  pausedExecution: Awaited<ReturnType<typeof PauseResumeManager.getPausedExecutionById>>,
  writers: CellWriters
)

Source from the content-addressed store, hash-verified

292}
293
294async function runResumeAndCellTerminal(
295 payload: ResumeExecutionPayload,
296 pausedExecution: Awaited<ReturnType<typeof PauseResumeManager.getPausedExecutionById>>,
297 writers: CellWriters
298): Promise<Awaited<ReturnType<typeof PauseResumeManager.startResumeExecution>>> {
299 if (!pausedExecution) throw new Error('Paused execution missing — already nulled by caller')
300 const result = await PauseResumeManager.startResumeExecution({
301 resumeEntryId: payload.resumeEntryId,
302 resumeExecutionId: payload.resumeExecutionId,
303 pausedExecution,
304 contextId: payload.contextId,
305 resumeInput: payload.resumeInput,
306 userId: payload.userId,
307 onBlockComplete: writers.cellOnBlockComplete,
308 })
309
310 if (result.status === 'paused') {
311 await writers.writeCellTerminal('paused', null)
312 } else if (result.success) {
313 await writers.writeCellTerminal('completed', null)
314 } else {
315 await writers.writeCellTerminal('error', result.error ?? 'Workflow execution failed')
316 }
317
318 return result
319}
320
321async function continueCascadeAfterResume(cellContext: {
322 tableId: string

Callers 1

executeResumeJobFunction · 0.85

Calls 1

startResumeExecutionMethod · 0.80

Tested by

no test coverage detected