mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08: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 ERROR_TRIGGER_NODE_TYPE = 'n8n-nodes-base.errorTrigger';
|
||||
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 CODE_NODE_TYPE = 'n8n-nodes-base.code';
|
||||
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
|
||||
toolSettings?: IDataObject; //various langchain tool's settings
|
||||
sql?: string; //merge node combineBySql, cloud only
|
||||
workflow_id?: string; //@n8n/n8n-nodes-langchain.toolWorkflow and n8n-nodes-base.executeWorkflow
|
||||
}
|
||||
|
||||
export interface INodeNameIndex {
|
||||
|
|
|
@ -15,6 +15,7 @@ import {
|
|||
AGENT_LANGCHAIN_NODE_TYPE,
|
||||
CHAIN_LLM_LANGCHAIN_NODE_TYPE,
|
||||
CHAIN_SUMMARIZATION_LANGCHAIN_NODE_TYPE,
|
||||
EXECUTE_WORKFLOW_NODE_TYPE,
|
||||
HTTP_REQUEST_NODE_TYPE,
|
||||
HTTP_REQUEST_TOOL_LANGCHAIN_NODE_TYPE,
|
||||
LANGCHAIN_CUSTOM_TOOLS,
|
||||
|
@ -22,6 +23,7 @@ import {
|
|||
OPENAI_LANGCHAIN_NODE_TYPE,
|
||||
STICKY_NODE_TYPE,
|
||||
WEBHOOK_NODE_TYPE,
|
||||
WORKFLOW_TOOL_LANGCHAIN_NODE_TYPE,
|
||||
} from './Constants';
|
||||
|
||||
export function getNodeTypeForName(workflow: IWorkflowBase, nodeName: string): INode | undefined {
|
||||
|
@ -314,6 +316,13 @@ export function generateNodesGraph(
|
|||
}
|
||||
} else if (node.type === WEBHOOK_NODE_TYPE) {
|
||||
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 {
|
||||
try {
|
||||
const nodeType = nodeTypes.getByNameAndVersion(node.type, node.typeVersion);
|
||||
|
|
Loading…
Reference in a new issue