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

Function continueCascadeAfterResume

apps/sim/background/resume-execution.ts:321–347  ·  view source on GitHub ↗
(cellContext: {
  tableId: string
  rowId: string
  workspaceId: string
  groupId: string
})

Source from the content-addressed store, hash-verified

319}
320
321async function continueCascadeAfterResume(cellContext: {
322 tableId: string
323 rowId: string
324 workspaceId: string
325 groupId: string
326}): Promise<void> {
327 const { getTableById } = await import('@/lib/table/service')
328 const { getRowById } = await import('@/lib/table/rows/service')
329 const { pickNextEligibleGroupForRow } = await import('@/lib/table/workflow-columns')
330 const { runRowCascadeLoop } = await import('@/background/workflow-column-execution')
331
332 const freshTable = await getTableById(cellContext.tableId)
333 if (!freshTable) return
334 const freshRow = await getRowById(cellContext.tableId, cellContext.rowId, cellContext.workspaceId)
335 if (!freshRow) return
336 const next = pickNextEligibleGroupForRow(freshTable, freshRow, cellContext.groupId)
337 if (!next) return
338 await runRowCascadeLoop({
339 tableId: cellContext.tableId,
340 tableName: freshTable.name,
341 rowId: cellContext.rowId,
342 workspaceId: cellContext.workspaceId,
343 groupId: next.id,
344 workflowId: next.workflowId,
345 executionId: generateId(),
346 })
347}
348
349export const resumeExecutionTask = task({
350 id: 'resume-execution',

Callers 1

executeResumeJobFunction · 0.85

Calls 5

generateIdFunction · 0.90
getTableByIdFunction · 0.85
getRowByIdFunction · 0.85
runRowCascadeLoopFunction · 0.85

Tested by

no test coverage detected