refactor(core): Persist node execution order, and forward it to the frontend (#14455)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2025-04-09 10:19:58 +02:00
committed by GitHub
parent 707ecb63ae
commit 9ba58ca80b
41 changed files with 235 additions and 113 deletions

View File

@@ -2180,16 +2180,22 @@ export interface ITaskMetadata {
subExecutionsCount?: number;
}
// The data that gets returned when a node runs
export interface ITaskData {
/** The data that gets returned when a node execution starts */
export interface ITaskStartedData {
startTime: number;
/** This index tracks the order in which nodes are executed */
executionIndex: number;
source: Array<ISourceData | null>; // Is an array as nodes have multiple inputs
hints?: NodeExecutionHint[];
}
/** The data that gets returned when a node execution ends */
export interface ITaskData extends ITaskStartedData {
executionTime: number;
executionStatus?: ExecutionStatus;
data?: ITaskDataConnections;
inputOverride?: ITaskDataConnections;
error?: ExecutionError;
hints?: NodeExecutionHint[];
source: Array<ISourceData | null>; // Is an array as nodes have multiple inputs
metadata?: ITaskMetadata;
}
@@ -2336,6 +2342,7 @@ export interface IWorkflowExecuteAdditionalData {
) => Promise<ExecuteWorkflowData>;
executionId?: string;
restartExecutionId?: string;
currentNodeExecutionIndex: number;
httpResponse?: express.Response;
httpRequest?: express.Request;
restApiUrl: string;

View File

@@ -916,7 +916,15 @@ export class WorkflowDataProxy {
);
if (pinData) {
taskData = { data: { main: [pinData] }, startTime: 0, executionTime: 0, source: [] };
taskData = {
data: {
main: [pinData],
},
startTime: 0,
executionTime: 0,
executionIndex: 0,
source: [],
};
}
}