mirror of
https://github.com/n8n-io/n8n.git
synced 2024-08-16 16:40:30 +03:00
feat: Collect sub-workflow IDs in node graph string (no-changelog) (#9939)
This commit is contained in:
parent
3293b2bee3
commit
058fa32ca3
@ -31,6 +31,7 @@ export const WEBHOOK_NODE_TYPE = 'n8n-nodes-base.webhook';
|
|||||||
export const MANUAL_TRIGGER_NODE_TYPE = 'n8n-nodes-base.manualTrigger';
|
export const MANUAL_TRIGGER_NODE_TYPE = 'n8n-nodes-base.manualTrigger';
|
||||||
export const ERROR_TRIGGER_NODE_TYPE = 'n8n-nodes-base.errorTrigger';
|
export const ERROR_TRIGGER_NODE_TYPE = 'n8n-nodes-base.errorTrigger';
|
||||||
export const START_NODE_TYPE = 'n8n-nodes-base.start';
|
export const START_NODE_TYPE = 'n8n-nodes-base.start';
|
||||||
|
export const EXECUTE_WORKFLOW_NODE_TYPE = 'n8n-nodes-base.executeWorkflow';
|
||||||
export const EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE = 'n8n-nodes-base.executeWorkflowTrigger';
|
export const EXECUTE_WORKFLOW_TRIGGER_NODE_TYPE = 'n8n-nodes-base.executeWorkflowTrigger';
|
||||||
export const CODE_NODE_TYPE = 'n8n-nodes-base.code';
|
export const CODE_NODE_TYPE = 'n8n-nodes-base.code';
|
||||||
export const FUNCTION_NODE_TYPE = 'n8n-nodes-base.function';
|
export const FUNCTION_NODE_TYPE = 'n8n-nodes-base.function';
|
||||||
|
@ -2348,6 +2348,7 @@ export interface INodeGraphItem {
|
|||||||
prompts?: IDataObject[] | IDataObject; //ai node's prompts, cloud only
|
prompts?: IDataObject[] | IDataObject; //ai node's prompts, cloud only
|
||||||
toolSettings?: IDataObject; //various langchain tool's settings
|
toolSettings?: IDataObject; //various langchain tool's settings
|
||||||
sql?: string; //merge node combineBySql, cloud only
|
sql?: string; //merge node combineBySql, cloud only
|
||||||
|
workflow_id?: string; //@n8n/n8n-nodes-langchain.toolWorkflow and n8n-nodes-base.executeWorkflow
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface INodeNameIndex {
|
export interface INodeNameIndex {
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
AGENT_LANGCHAIN_NODE_TYPE,
|
AGENT_LANGCHAIN_NODE_TYPE,
|
||||||
CHAIN_LLM_LANGCHAIN_NODE_TYPE,
|
CHAIN_LLM_LANGCHAIN_NODE_TYPE,
|
||||||
CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE,
|
CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE,
|
||||||
|
EXECUTE_WORKFLOW_NODE_TYPE,
|
||||||
HTTP_REQUEST_NODE_TYPE,
|
HTTP_REQUEST_NODE_TYPE,
|
||||||
HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE,
|
HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE,
|
||||||
LANGCHAIN_CUSTOM_TOOLS,
|
LANGCHAIN_CUSTOM_TOOLS,
|
||||||
@ -22,6 +23,7 @@ import {
|
|||||||
OPENAI_LANGCHAIN_NODE_TYPE,
|
OPENAI_LANGCHAIN_NODE_TYPE,
|
||||||
STICKY_NODE_TYPE,
|
STICKY_NODE_TYPE,
|
||||||
WEBHOOK_NODE_TYPE,
|
WEBHOOK_NODE_TYPE,
|
||||||
|
WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE,
|
||||||
} from './Constants';
|
} from './Constants';
|
||||||
|
|
||||||
export function getNodeTypeForName(workflow: IWorkflowBase, nodeName: string): INode | undefined {
|
export function getNodeTypeForName(workflow: IWorkflowBase, nodeName: string): INode | undefined {
|
||||||
@ -314,6 +316,13 @@ export function generateNodesGraph(
|
|||||||
}
|
}
|
||||||
} else if (node.type === WEBHOOK_NODE_TYPE) {
|
} else if (node.type === WEBHOOK_NODE_TYPE) {
|
||||||
webhookNodeNames.push(node.name);
|
webhookNodeNames.push(node.name);
|
||||||
|
} else if (
|
||||||
|
node.type === EXECUTE_WORKFLOW_NODE_TYPE ||
|
||||||
|
node.type === WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE
|
||||||
|
) {
|
||||||
|
if (node.parameters?.workflowId) {
|
||||||
|
nodeItem.workflow_id = node.parameters?.workflowId as string;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
try {
|
try {
|
||||||
const nodeType = nodeTypes.getByNameAndVersion(node.type, node.typeVersion);
|
const nodeType = nodeTypes.getByNameAndVersion(node.type, node.typeVersion);
|
||||||
|
Loading…
Reference in New Issue
Block a user