(workflowId: string, workspaceId?: string)
| 69 | } |
| 70 | |
| 71 | async 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 | |
| 91 | async function resolveSelectorValue( |
| 92 | value: string, |
no test coverage detected