mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
refactor: remove startmetata
This commit is contained in:
parent
ba0502e589
commit
83abcea9ac
|
@ -397,11 +397,9 @@ export class RetrieverWorkflow implements INodeType {
|
||||||
items,
|
items,
|
||||||
config?.getChild(),
|
config?.getChild(),
|
||||||
{
|
{
|
||||||
startMetadata: {
|
parentExecution: {
|
||||||
parentExecution: {
|
executionId: workflowProxy.$execution.id,
|
||||||
executionId: workflowProxy.$execution.id,
|
workflowId: workflowProxy.$workflow.id,
|
||||||
workflowId: workflowProxy.$workflow.id,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -455,11 +455,9 @@ export class ToolWorkflow implements INodeType {
|
||||||
let receivedData: ExecuteWorkflowData;
|
let receivedData: ExecuteWorkflowData;
|
||||||
try {
|
try {
|
||||||
receivedData = await this.executeWorkflow(workflowInfo, items, runManager?.getChild(), {
|
receivedData = await this.executeWorkflow(workflowInfo, items, runManager?.getChild(), {
|
||||||
startMetadata: {
|
parentExecution: {
|
||||||
parentExecution: {
|
executionId: workflowProxy.$execution.id,
|
||||||
executionId: workflowProxy.$execution.id,
|
workflowId: workflowProxy.$workflow.id,
|
||||||
workflowId: workflowProxy.$workflow.id,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
subExecutionId = receivedData.executionId;
|
subExecutionId = receivedData.executionId;
|
||||||
|
|
|
@ -36,8 +36,8 @@ import type {
|
||||||
ExecuteWorkflowOptions,
|
ExecuteWorkflowOptions,
|
||||||
IWorkflowExecutionDataProcess,
|
IWorkflowExecutionDataProcess,
|
||||||
EnvProviderState,
|
EnvProviderState,
|
||||||
ITaskMetadata,
|
|
||||||
ExecuteWorkflowData,
|
ExecuteWorkflowData,
|
||||||
|
RelatedExecution,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
import { Container } from 'typedi';
|
import { Container } from 'typedi';
|
||||||
|
|
||||||
|
@ -684,7 +684,7 @@ function hookFunctionsSaveWorker(): IWorkflowExecuteHooks {
|
||||||
export async function getRunData(
|
export async function getRunData(
|
||||||
workflowData: IWorkflowBase,
|
workflowData: IWorkflowBase,
|
||||||
inputData?: INodeExecutionData[],
|
inputData?: INodeExecutionData[],
|
||||||
metadata?: ITaskMetadata,
|
parentExecution?: RelatedExecution,
|
||||||
): Promise<IWorkflowExecutionDataProcess> {
|
): Promise<IWorkflowExecutionDataProcess> {
|
||||||
const mode = 'integrated';
|
const mode = 'integrated';
|
||||||
|
|
||||||
|
@ -704,7 +704,7 @@ export async function getRunData(
|
||||||
data: {
|
data: {
|
||||||
main: [inputData],
|
main: [inputData],
|
||||||
},
|
},
|
||||||
metadata,
|
metadata: { parentExecution },
|
||||||
source: null,
|
source: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -785,7 +785,7 @@ export async function executeWorkflow(
|
||||||
|
|
||||||
const runData =
|
const runData =
|
||||||
options.loadedRunData ??
|
options.loadedRunData ??
|
||||||
(await getRunData(workflowData, options.inputData, options.startMetadata));
|
(await getRunData(workflowData, options.inputData, options.parentExecution));
|
||||||
|
|
||||||
const executionId = await activeExecutions.add(runData);
|
const executionId = await activeExecutions.add(runData);
|
||||||
|
|
||||||
|
|
|
@ -111,6 +111,7 @@ import type {
|
||||||
ISupplyDataFunctions,
|
ISupplyDataFunctions,
|
||||||
WebhookType,
|
WebhookType,
|
||||||
SchedulingFunctions,
|
SchedulingFunctions,
|
||||||
|
RelatedExecution,
|
||||||
} from 'n8n-workflow';
|
} from 'n8n-workflow';
|
||||||
import {
|
import {
|
||||||
NodeConnectionType,
|
NodeConnectionType,
|
||||||
|
@ -3646,7 +3647,7 @@ export function getExecuteFunctions(
|
||||||
parentCallbackManager?: CallbackManager,
|
parentCallbackManager?: CallbackManager,
|
||||||
options?: {
|
options?: {
|
||||||
doNotWaitToFinish?: boolean;
|
doNotWaitToFinish?: boolean;
|
||||||
startMetadata?: ITaskMetadata;
|
parentExecution?: RelatedExecution;
|
||||||
},
|
},
|
||||||
): Promise<ExecuteWorkflowData> {
|
): Promise<ExecuteWorkflowData> {
|
||||||
return await additionalData
|
return await additionalData
|
||||||
|
@ -3982,7 +3983,7 @@ export function getSupplyDataFunctions(
|
||||||
parentCallbackManager?: CallbackManager,
|
parentCallbackManager?: CallbackManager,
|
||||||
options?: {
|
options?: {
|
||||||
doNotWaitToFinish?: boolean;
|
doNotWaitToFinish?: boolean;
|
||||||
startMetadata?: ITaskMetadata;
|
parentExecution?: RelatedExecution;
|
||||||
},
|
},
|
||||||
): Promise<ExecuteWorkflowData> =>
|
): Promise<ExecuteWorkflowData> =>
|
||||||
await additionalData
|
await additionalData
|
||||||
|
|
|
@ -231,11 +231,9 @@ export class ExecuteWorkflow implements INodeType {
|
||||||
[items[i]],
|
[items[i]],
|
||||||
undefined,
|
undefined,
|
||||||
{
|
{
|
||||||
startMetadata: {
|
parentExecution: {
|
||||||
parentExecution: {
|
executionId: workflowProxy.$execution.id,
|
||||||
executionId: workflowProxy.$execution.id,
|
workflowId: workflowProxy.$workflow.id,
|
||||||
workflowId: workflowProxy.$workflow.id,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -265,11 +263,9 @@ export class ExecuteWorkflow implements INodeType {
|
||||||
undefined,
|
undefined,
|
||||||
{
|
{
|
||||||
doNotWaitToFinish: true,
|
doNotWaitToFinish: true,
|
||||||
startMetadata: {
|
parentExecution: {
|
||||||
parentExecution: {
|
executionId: workflowProxy.$execution.id,
|
||||||
executionId: workflowProxy.$execution.id,
|
workflowId: workflowProxy.$workflow.id,
|
||||||
workflowId: workflowProxy.$workflow.id,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
@ -324,11 +320,9 @@ export class ExecuteWorkflow implements INodeType {
|
||||||
undefined,
|
undefined,
|
||||||
{
|
{
|
||||||
doNotWaitToFinish: !waitForSubWorkflow,
|
doNotWaitToFinish: !waitForSubWorkflow,
|
||||||
startMetadata: {
|
parentExecution: {
|
||||||
parentExecution: {
|
executionId: workflowProxy.$execution.id,
|
||||||
executionId: workflowProxy.$execution.id,
|
workflowId: workflowProxy.$workflow.id,
|
||||||
workflowId: workflowProxy.$workflow.id,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -956,7 +956,7 @@ export type IExecuteFunctions = ExecuteFunctions.GetNodeParameterFn &
|
||||||
parentCallbackManager?: CallbackManager,
|
parentCallbackManager?: CallbackManager,
|
||||||
options?: {
|
options?: {
|
||||||
doNotWaitToFinish?: boolean;
|
doNotWaitToFinish?: boolean;
|
||||||
startMetadata?: ITaskMetadata;
|
parentExecution?: RelatedExecution;
|
||||||
},
|
},
|
||||||
): Promise<ExecuteWorkflowData>;
|
): Promise<ExecuteWorkflowData>;
|
||||||
getInputConnectionData(
|
getInputConnectionData(
|
||||||
|
@ -2283,8 +2283,8 @@ export interface ExecuteWorkflowOptions {
|
||||||
loadedRunData?: IWorkflowExecutionDataProcess;
|
loadedRunData?: IWorkflowExecutionDataProcess;
|
||||||
parentWorkflowSettings?: IWorkflowSettings;
|
parentWorkflowSettings?: IWorkflowSettings;
|
||||||
parentCallbackManager?: CallbackManager;
|
parentCallbackManager?: CallbackManager;
|
||||||
startMetadata?: ITaskMetadata;
|
|
||||||
doNotWaitToFinish?: boolean;
|
doNotWaitToFinish?: boolean;
|
||||||
|
parentExecution?: RelatedExecution;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type AiEvent =
|
export type AiEvent =
|
||||||
|
|
Loading…
Reference in a new issue