feat: Implement new partial execution logic for acyclic workflows (no-changelog) (#10256)

Co-authored-by: Tomi Turtiainen <10324676+tomi@users.noreply.github.com>
This commit is contained in:
Danny Martini
2024-09-18 15:06:36 +02:00
committed by GitHub
parent 73f89ef101
commit 2a084f96f8
31 changed files with 2367 additions and 20 deletions

View File

@@ -34,6 +34,7 @@ import { useI18n } from '@/composables/useI18n';
import { get } from 'lodash-es';
import { useExecutionsStore } from '@/stores/executions.store';
import type { PushPayload } from '@n8n/api-types';
import { useLocalStorage } from '@vueuse/core';
export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType<typeof useRouter> }) {
const nodeHelpers = useNodeHelpers();
@@ -213,9 +214,15 @@ export function useRunWorkflow(useRunWorkflowOpts: { router: ReturnType<typeof u
};
});
// -1 means the backend chooses the default
// 0 is the old flow
// 1 is the new flow
const partialExecutionVersion = useLocalStorage('PartialExecution.version', -1);
const startRunData: IStartRunData = {
workflowData,
runData: newRunData,
// With the new partial execution version the backend decides what run
// data to use and what to ignore.
runData: partialExecutionVersion.value === 1 ? (runData ?? undefined) : newRunData,
startNodes,
};
if ('destinationNode' in options) {