diff --git a/cypress/e2e/19-execution.cy.ts b/cypress/e2e/19-execution.cy.ts index 1bf01536b2..90d1e92576 100644 --- a/cypress/e2e/19-execution.cy.ts +++ b/cypress/e2e/19-execution.cy.ts @@ -536,10 +536,13 @@ describe('Execution', () => { cy.wait('@workflowRun').then((interception) => { expect(interception.request.body).not.to.have.property('runData').that.is.an('object'); - expect(interception.request.body).to.have.property('pinData').that.is.an('object'); + expect(interception.request.body).to.have.property('workflowData').that.is.an('object'); + expect(interception.request.body.workflowData) + .to.have.property('pinData') + .that.is.an('object'); const expectedPinnedDataKeys = ['Webhook']; - const { pinData } = interception.request.body as Record; + const { pinData } = interception.request.body.workflowData as Record; expect(Object.keys(pinData)).to.have.lengthOf(expectedPinnedDataKeys.length); expect(pinData).to.include.all.keys(expectedPinnedDataKeys); }); @@ -555,14 +558,18 @@ describe('Execution', () => { cy.wait('@workflowRun').then((interception) => { expect(interception.request.body).to.have.property('runData').that.is.an('object'); - expect(interception.request.body).to.have.property('pinData').that.is.an('object'); + expect(interception.request.body).to.have.property('workflowData').that.is.an('object'); + expect(interception.request.body.workflowData) + .to.have.property('pinData') + .that.is.an('object'); const expectedPinnedDataKeys = ['Webhook']; const expectedRunDataKeys = ['If', 'Webhook']; - const { pinData, runData } = interception.request.body as Record; + const { pinData } = interception.request.body.workflowData as Record; expect(Object.keys(pinData)).to.have.lengthOf(expectedPinnedDataKeys.length); expect(pinData).to.include.all.keys(expectedPinnedDataKeys); + const { runData } = interception.request.body as Record; expect(Object.keys(runData)).to.have.lengthOf(expectedRunDataKeys.length); expect(runData).to.include.all.keys(expectedRunDataKeys); }); diff --git a/packages/cli/src/workflows/workflow.request.ts b/packages/cli/src/workflows/workflow.request.ts index 0378857ca3..7b1fd85528 100644 --- a/packages/cli/src/workflows/workflow.request.ts +++ b/packages/cli/src/workflows/workflow.request.ts @@ -1,13 +1,6 @@ import type { IWorkflowDb } from '@/Interfaces'; import type { AuthenticatedRequest, ListQuery } from '@/requests'; -import type { - INode, - IConnections, - IWorkflowSettings, - IRunData, - IPinData, - StartNodeData, -} from 'n8n-workflow'; +import type { INode, IConnections, IWorkflowSettings, IRunData, StartNodeData } from 'n8n-workflow'; export declare namespace WorkflowRequest { type CreateUpdatePayload = Partial<{ @@ -26,7 +19,6 @@ export declare namespace WorkflowRequest { type ManualRunPayload = { workflowData: IWorkflowDb; runData: IRunData; - pinData: IPinData; startNodes?: StartNodeData[]; destinationNode?: string; }; diff --git a/packages/cli/src/workflows/workflowExecution.service.ts b/packages/cli/src/workflows/workflowExecution.service.ts index e34c80e94e..2a562707f9 100644 --- a/packages/cli/src/workflows/workflowExecution.service.ts +++ b/packages/cli/src/workflows/workflowExecution.service.ts @@ -92,16 +92,11 @@ export class WorkflowExecutionService { } async executeManually( - { - workflowData, - runData, - pinData, - startNodes, - destinationNode, - }: WorkflowRequest.ManualRunPayload, + { workflowData, runData, startNodes, destinationNode }: WorkflowRequest.ManualRunPayload, user: User, pushRef?: string, ) { + const pinData = workflowData.pinData; const pinnedTrigger = this.selectPinnedActivatorStarter( workflowData, startNodes?.map((nodeData) => nodeData.name), diff --git a/packages/editor-ui/src/Interface.ts b/packages/editor-ui/src/Interface.ts index 4616080c23..8b8565c9f6 100644 --- a/packages/editor-ui/src/Interface.ts +++ b/packages/editor-ui/src/Interface.ts @@ -200,7 +200,6 @@ export interface IStartRunData { startNodes?: StartNodeData[]; destinationNode?: string; runData?: IRunData; - pinData?: IPinData; } export interface ITableData { diff --git a/packages/editor-ui/src/composables/useRunWorkflow.ts b/packages/editor-ui/src/composables/useRunWorkflow.ts index 71527e8ed6..599f5e356d 100644 --- a/packages/editor-ui/src/composables/useRunWorkflow.ts +++ b/packages/editor-ui/src/composables/useRunWorkflow.ts @@ -219,7 +219,6 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType