diff --git a/packages/cli/src/databases/repositories/execution.repository.ts b/packages/cli/src/databases/repositories/execution.repository.ts index 89b032ab06..32ddc25f65 100644 --- a/packages/cli/src/databases/repositories/execution.repository.ts +++ b/packages/cli/src/databases/repositories/execution.repository.ts @@ -226,10 +226,10 @@ export class ExecutionRepository extends Repository { const { data, workflowData, ...rest } = execution; const { identifiers: inserted } = await this.insert(rest); const { id: executionId } = inserted[0] as { id: string }; - const { connections, nodes, name } = workflowData ?? {}; + const { connections, nodes, name, settings } = workflowData ?? {}; await this.executionDataRepository.insert({ executionId, - workflowData: { connections, nodes, name, id: workflowData?.id }, + workflowData: { connections, nodes, name, settings, id: workflowData?.id }, data: stringify(data), }); return String(executionId); diff --git a/packages/cli/test/integration/database/repositories/execution.repository.test.ts b/packages/cli/test/integration/database/repositories/execution.repository.test.ts index 72ebaa9596..cfb897d627 100644 --- a/packages/cli/test/integration/database/repositories/execution.repository.test.ts +++ b/packages/cli/test/integration/database/repositories/execution.repository.test.ts @@ -20,7 +20,7 @@ describe('ExecutionRepository', () => { describe('createNewExecution', () => { it('should save execution data', async () => { const executionRepo = Container.get(ExecutionRepository); - const workflow = await createWorkflow(); + const workflow = await createWorkflow({ settings: { executionOrder: 'v1' } }); const executionId = await executionRepo.createNewExecution({ workflowId: workflow.id, data: { @@ -48,6 +48,7 @@ describe('ExecutionRepository', () => { connections: workflow.connections, nodes: workflow.nodes, name: workflow.name, + settings: workflow.settings, }); expect(executionData?.data).toEqual('[{"resultData":"1"},{}]'); });