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

Function resolveWorkflow

apps/sim/lib/workflows/comparison/resolve-values.ts:71–89  ·  view source on GitHub ↗
(workflowId: string, workspaceId?: string)

Source from the content-addressed store, hash-verified

69}
70
71async function resolveWorkflow(workflowId: string, workspaceId?: string): Promise<string | null> {
72 if (!workspaceId) return null
73
74 try {
75 const definition = getSelectorDefinition('sim.workflows')
76 if (definition.fetchById) {
77 const result = await definition.fetchById({
78 key: 'sim.workflows',
79 context: { workspaceId },
80 detailId: workflowId,
81 })
82 return result?.label ?? null
83 }
84 return null
85 } catch (error) {
86 logger.warn('Failed to resolve workflow', { workflowId, error })
87 return null
88 }
89}
90
91async function resolveSelectorValue(
92 value: string,

Callers 1

resolveValueForDisplayFunction · 0.85

Calls 2

getSelectorDefinitionFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected