mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00: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:
committed by
GitHub
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;
|
||||
|
||||
Reference in New Issue
Block a user