MCPcopy Create free account
hub / github.com/chainjet/platform / getActionTree

Method getActionTree

apps/api/src/compiler/compiler.service.ts:87–103  ·  view source on GitHub ↗
(allActions: WorkflowAction[], action?: WorkflowAction)

Source from the content-addressed store, hash-verified

85 }
86
87 private getActionTree(allActions: WorkflowAction[], action?: WorkflowAction): WorkflowAction[] {
88 if (!action) {
89 return []
90 }
91 if (!action.nextActions || action.nextActions.length === 0) {
92 return [action]
93 }
94 return [
95 action,
96 ...action.nextActions.flatMap((next) =>
97 this.getActionTree(
98 allActions,
99 allActions.find((a) => a._id.toString() === next.action._id.toString()),
100 ),
101 ),
102 ]
103 }
104
105 private async getTemplate(workflowAction: WorkflowAction, allActions: WorkflowAction[], usedVars: VarEvm[]) {
106 const integrationAction = await this.integrationActionService.findById(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected