mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
feat(editor): Allow jumping into sub-workflow with shortkey (#15200)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import get from 'lodash/get';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
|
||||
import { EXECUTE_WORKFLOW_NODE_TYPE } from './Constants';
|
||||
import { ApplicationError } from './errors/application.error';
|
||||
import { NodeConnectionTypes } from './Interfaces';
|
||||
import type {
|
||||
@@ -39,6 +40,7 @@ import type {
|
||||
import { validateFilterParameter } from './NodeParameters/FilterParameter';
|
||||
import {
|
||||
isFilterValue,
|
||||
isResourceLocatorValue,
|
||||
isResourceMapperValue,
|
||||
isValidResourceLocatorParameterValue,
|
||||
} from './type-guards';
|
||||
@@ -1562,3 +1564,17 @@ export function isExecutable(workflow: Workflow, node: INode, nodeTypeData: INod
|
||||
isTriggerNode(nodeTypeData)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to retrieve the ID of a subworkflow from a execute workflow node.
|
||||
*/
|
||||
export function getSubworkflowId(node: INode): string | undefined {
|
||||
if (
|
||||
node &&
|
||||
node.type === EXECUTE_WORKFLOW_NODE_TYPE &&
|
||||
isResourceLocatorValue(node.parameters.workflowId)
|
||||
) {
|
||||
return node.parameters.workflowId.value as string;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user