mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(core): Make getExecutionId
available on all nodes types (#5990)
fixes https://community.n8n.io/t/this-getexecutionid-in-custom-node-development-not-available-anymore/25259/1
This commit is contained in:
parent
026d0bc909
commit
c42820e82e
|
@ -2020,6 +2020,7 @@ const getCommonWorkflowFunctions = (
|
|||
additionalData: IWorkflowExecuteAdditionalData,
|
||||
): Omit<FunctionsBase, 'getCredentials'> => ({
|
||||
logger: Logger,
|
||||
getExecutionId: () => additionalData.executionId!,
|
||||
getNode: () => deepCopy(node),
|
||||
getWorkflow: () => ({
|
||||
id: workflow.id,
|
||||
|
@ -2325,7 +2326,6 @@ export function getExecuteFunctions(
|
|||
getContext(type: string): IContextObject {
|
||||
return NodeHelpers.getContext(runExecutionData, type, node);
|
||||
},
|
||||
getExecutionId: () => additionalData.executionId!,
|
||||
getInputData: (inputIndex = 0, inputName = 'main') => {
|
||||
if (!inputData.hasOwnProperty(inputName)) {
|
||||
// Return empty array because else it would throw error when nothing is connected to input
|
||||
|
|
|
@ -719,6 +719,7 @@ export interface RequestHelperFunctions {
|
|||
export interface FunctionsBase {
|
||||
logger: ILogger;
|
||||
getCredentials(type: string, itemIndex?: number): Promise<ICredentialDataDecryptedObject>;
|
||||
getExecutionId(): string;
|
||||
getNode(): INode;
|
||||
getWorkflow(): IWorkflowMetadata;
|
||||
getWorkflowStaticData(type: string): IDataObject;
|
||||
|
|
Loading…
Reference in a new issue