Skip to content

Commit 4ab9a22

Browse files
author
drowl87
committed
refactor DynamicNode to rename 'disableWait' parameter to 'doNotWaitToFinish' for clarity
1 parent 0db850d commit 4ab9a22

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

nodes/DynamicNode/DynamicNode.node.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ export class DynamicNode implements INodeType {
3737
},
3838
{
3939
displayName: 'Disable Waiting for Child Workflow(s) to Finish?',
40-
name: 'disableWait',
40+
name: 'doNotWaitToFinish',
4141
type: 'boolean',
4242
default: false,
43-
description: 'Advanced: if enabled, parent will not wait for results and outputs may be empty.',
43+
description: 'Advanced: If enabled, parent will not wait for results and outputs may be empty.',
4444
},
4545
],
4646
};
4747

4848
async execute(this: IExecuteFunctions): Promise<INodeExecutionData[][]> {
4949
const inputItems = this.getInputData();
5050
const executeIndividually = this.getNodeParameter('executeIndividually', 0) as boolean;
51-
const disableWait = this.getNodeParameter('disableWait', 0) as boolean;
51+
const doNotWaitToFinish = this.getNodeParameter('doNotWaitToFinish', 0) as boolean;
5252

5353
const rawParam = this.getNodeParameter('nodeJson', 0) as any;
5454
let raw: any;
@@ -101,11 +101,11 @@ export class DynamicNode implements INodeType {
101101
executionId: workflowProxy.$execution.id,
102102
workflowId: workflowProxy.$workflow.id,
103103
},
104-
disableWait,
104+
doNotWaitToFinish,
105105
},
106106
);
107107

108-
if (!disableWait && execResult) {
108+
if (!doNotWaitToFinish && execResult) {
109109
if (Array.isArray(execResult)) {
110110
const flattened = execResult
111111
.flat()
@@ -133,6 +133,7 @@ export class DynamicNode implements INodeType {
133133
}
134134
}
135135
} else {
136+
// Run one sub-workflow with all items
136137
const template = JSON.parse(JSON.stringify(subWorkflowTemplate));
137138
const nodeClone = JSON.parse(JSON.stringify(baseNode));
138139

@@ -156,11 +157,11 @@ export class DynamicNode implements INodeType {
156157
executionId: workflowProxy.$execution.id,
157158
workflowId: workflowProxy.$workflow.id,
158159
},
159-
disableWait,
160+
doNotWaitToFinish,
160161
},
161162
);
162163

163-
if (!disableWait && execResult) {
164+
if (!doNotWaitToFinish && execResult) {
164165
if (Array.isArray(execResult)) {
165166
const flattened = execResult
166167
.flat()

0 commit comments

Comments
 (0)