mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
refactor(core): Persist node execution order, and forward it to the frontend (#14455)
This commit is contained in:
committed by
GitHub
parent
707ecb63ae
commit
9ba58ca80b
@@ -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;
|
||||
|
||||
@@ -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: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user