Skip to content

Commit

Permalink
fix(core): Make getExecutionId available on all nodes types (#5990)
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Apr 20, 2023
1 parent a243154 commit 8373aab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/NodeExecuteFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2020,6 +2020,7 @@ const getCommonWorkflowFunctions = (
additionalData: IWorkflowExecuteAdditionalData,
): Omit<FunctionsBase, 'getCredentials'> => ({
logger: Logger,
getExecutionId: () => additionalData.executionId!,
getNode: () => deepCopy(node),
getWorkflow: () => ({
id: workflow.id,
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/workflow/src/Interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8373aab

Please sign in to comment.