Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Make getExecutionId available on all nodes types #5990

Merged
merged 1 commit into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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