From 8e58bb4cda9a1277f085041daf34b2b7cfbccb1e Mon Sep 17 00:00:00 2001 From: Ivan Atanasov Date: Thu, 21 Nov 2024 14:21:07 +0100 Subject: [PATCH] modify execute workflow parameters --- .../ExecuteWorkflow/ExecuteWorkflow.node.ts | 27 +++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts b/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts index 52e80655f9ae6..1c0938a21f855 100644 --- a/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts +++ b/packages/nodes-base/nodes/ExecuteWorkflow/ExecuteWorkflow.node.ts @@ -6,8 +6,9 @@ import type { INodeType, INodeTypeDescription, } from 'n8n-workflow'; -import { generatePairedItemData } from '../../utils/utilities'; + import { getWorkflowInfo } from './GenericFunctions'; +import { generatePairedItemData } from '../../utils/utilities'; export class ExecuteWorkflow implements INodeType { description: INodeTypeDescription = { @@ -16,7 +17,7 @@ export class ExecuteWorkflow implements INodeType { icon: 'fa:sign-in-alt', iconColor: 'orange-red', group: ['transform'], - version: [1, 1.1], + version: [1, 1.1, 1.2], subtitle: '={{"Workflow: " + $parameter["workflowId"]}}', description: 'Execute another workflow', defaults: { @@ -67,6 +68,27 @@ export class ExecuteWorkflow implements INodeType { ], default: 'database', description: 'Where to get the workflow to execute from', + displayOptions: { show: { '@version': [{ _cnd: { lte: 1.1 } }] } }, + }, + { + displayName: 'Source', + name: 'source', + type: 'options', + options: [ + { + name: 'Database', + value: 'database', + description: 'Load the workflow from the database by ID', + }, + { + name: 'Define Below', + value: 'parameter', + description: 'Pass the JSON code of a workflow', + }, + ], + default: 'database', + description: 'Where to get the workflow to execute from', + displayOptions: { show: { '@version': [{ _cnd: { gte: 1.2 } }] } }, }, // ---------------------------------- @@ -163,6 +185,7 @@ export class ExecuteWorkflow implements INodeType { name: 'executeWorkflowNotice', type: 'notice', default: '', + displayOptions: { show: { '@version': [{ _cnd: { lte: 1.1 } }] } }, }, { displayName: 'Mode',