(allActions: WorkflowAction[], action?: WorkflowAction)
| 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( |
no outgoing calls
no test coverage detected