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

@@ -51,14 +51,10 @@ export function NodeTypes(nodeTypes: INodeTypeData = predefinedNodesTypes): INod
export function WorkflowExecuteAdditionalData(
waitPromise: IDeferredPromise<IRun>,
nodeExecutionOrder: string[],
): IWorkflowExecuteAdditionalData {
const hooks = new ExecutionLifecycleHooks('trigger', '1', mock());
hooks.addHandler('nodeExecuteAfter', (nodeName) => {
nodeExecutionOrder.push(nodeName);
});
hooks.addHandler('workflowExecuteAfter', (fullRunData) => waitPromise.resolve(fullRunData));
return mock<IWorkflowExecuteAdditionalData>({ hooks });
return mock<IWorkflowExecuteAdditionalData>({ hooks, currentNodeExecutionIndex: 0 });
}
const preparePinData = (pinData: IDataObject) => {