fix(core): Fix pairedItem issue with partial manual executions (#8575)
Co-authored-by: Danny Martini <danny@n8n.io> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -1,6 +1,13 @@
|
||||
import type { IWorkflowDb } from '@/Interfaces';
|
||||
import type { AuthenticatedRequest } from '@/requests';
|
||||
import type { INode, IConnections, IWorkflowSettings, IRunData, IPinData } from 'n8n-workflow';
|
||||
import type {
|
||||
INode,
|
||||
IConnections,
|
||||
IWorkflowSettings,
|
||||
IRunData,
|
||||
IPinData,
|
||||
StartNodeData,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
export declare namespace WorkflowRequest {
|
||||
type CreateUpdatePayload = Partial<{
|
||||
@@ -19,7 +26,7 @@ export declare namespace WorkflowRequest {
|
||||
workflowData: IWorkflowDb;
|
||||
runData: IRunData;
|
||||
pinData: IPinData;
|
||||
startNodes?: string[];
|
||||
startNodes?: StartNodeData[];
|
||||
destinationNode?: string;
|
||||
};
|
||||
|
||||
|
||||
@@ -101,7 +101,11 @@ export class WorkflowExecutionService {
|
||||
user: User,
|
||||
sessionId?: string,
|
||||
) {
|
||||
const pinnedTrigger = this.selectPinnedActivatorStarter(workflowData, startNodes, pinData);
|
||||
const pinnedTrigger = this.selectPinnedActivatorStarter(
|
||||
workflowData,
|
||||
startNodes?.map((nodeData) => nodeData.name),
|
||||
pinData,
|
||||
);
|
||||
|
||||
// If webhooks nodes exist and are active we have to wait for till we receive a call
|
||||
if (
|
||||
@@ -143,7 +147,7 @@ export class WorkflowExecutionService {
|
||||
const hasRunData = (node: INode) => runData !== undefined && !!runData[node.name];
|
||||
|
||||
if (pinnedTrigger && !hasRunData(pinnedTrigger)) {
|
||||
data.startNodes = [pinnedTrigger.name];
|
||||
data.startNodes = [{ name: pinnedTrigger.name, sourceData: null }];
|
||||
}
|
||||
|
||||
const executionId = await this.workflowRunner.run(data);
|
||||
|
||||
Reference in New Issue
Block a user