(scope: Record<string, unknown> = {}, loopId = 'loop-1')
| 56 | } |
| 57 | |
| 58 | function createContext(scope: Record<string, unknown> = {}, loopId = 'loop-1'): ExecutionContext { |
| 59 | return { |
| 60 | workflowId: 'workflow-1', |
| 61 | workspaceId: 'workspace-1', |
| 62 | executionId: 'execution-1', |
| 63 | userId: 'user-1', |
| 64 | blockStates: new Map(), |
| 65 | executedBlocks: new Set(), |
| 66 | blockLogs: [], |
| 67 | metadata: { requestId: 'request-1' }, |
| 68 | environmentVariables: {}, |
| 69 | workflowVariables: {}, |
| 70 | decisions: { router: new Map(), condition: new Map() }, |
| 71 | completedLoops: new Set(), |
| 72 | activeExecutionPath: new Set(), |
| 73 | loopExecutions: new Map([[loopId, scope as any]]), |
| 74 | } as ExecutionContext |
| 75 | } |
| 76 | |
| 77 | function createOrchestrator(loopConfigs = new Map<string, any>()) { |
| 78 | const state = createState() |
no outgoing calls
no test coverage detected