feat(editor): Allow jumping into sub-workflow with shortkey (#15200)

This commit is contained in:
Ricardo Espinoza
2025-05-12 07:24:36 -04:00
committed by GitHub
parent 8b467e3f56
commit e2b9ada4b5
20 changed files with 523 additions and 51 deletions

View File

@@ -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;
}