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,
|
additionalData: IWorkflowExecuteAdditionalData,
|
||||||
): Omit<FunctionsBase, 'getCredentials'> => ({
|
): Omit<FunctionsBase, 'getCredentials'> => ({
|
||||||
logger: Logger,
|
logger: Logger,
|
||||||
|
getExecutionId: () => additionalData.executionId!,
|
||||||
getNode: () => deepCopy(node),
|
getNode: () => deepCopy(node),
|
||||||
getWorkflow: () => ({
|
getWorkflow: () => ({
|
||||||
id: workflow.id,
|
id: workflow.id,
|
||||||
@@ -2325,7 +2326,6 @@ export function getExecuteFunctions(
|
|||||||
getContext(type: string): IContextObject {
|
getContext(type: string): IContextObject {
|
||||||
return NodeHelpers.getContext(runExecutionData, type, node);
|
return NodeHelpers.getContext(runExecutionData, type, node);
|
||||||
},
|
},
|
||||||
getExecutionId: () => additionalData.executionId!,
|
|
||||||
getInputData: (inputIndex = 0, inputName = 'main') => {
|
getInputData: (inputIndex = 0, inputName = 'main') => {
|
||||||
if (!inputData.hasOwnProperty(inputName)) {
|
if (!inputData.hasOwnProperty(inputName)) {
|
||||||
// Return empty array because else it would throw error when nothing is connected to input
|
// 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 {
|
export interface FunctionsBase {
|
||||||
logger: ILogger;
|
logger: ILogger;
|
||||||
getCredentials(type: string, itemIndex?: number): Promise<ICredentialDataDecryptedObject>;
|
getCredentials(type: string, itemIndex?: number): Promise<ICredentialDataDecryptedObject>;
|
||||||
|
getExecutionId(): string;
|
||||||
getNode(): INode;
|
getNode(): INode;
|
||||||
getWorkflow(): IWorkflowMetadata;
|
getWorkflow(): IWorkflowMetadata;
|
||||||
getWorkflowStaticData(type: string): IDataObject;
|
getWorkflowStaticData(type: string): IDataObject;
|
||||||
|
|||||||
Reference in New Issue
Block a user