(self, node: Node)
| 213 | get_node(node.type, self.workflow_mode)(node, None, None) |
| 214 | |
| 215 | def is_valid_node(self, node: Node): |
| 216 | self.is_valid_node_params(node) |
| 217 | if node.type == 'condition-node': |
| 218 | branch_list = node.properties.get('node_data').get('branch') |
| 219 | for branch in branch_list: |
| 220 | source_anchor_id = f"{node.id}_{branch.get('id')}_right" |
| 221 | edge_list = [edge for edge in self.edges if edge.sourceAnchorId == source_anchor_id] |
| 222 | if len(edge_list) == 0: |
| 223 | raise AppApiException(500, |
| 224 | _('The branch {branch} of the {node} node needs to be connected').format( |
| 225 | node=node.properties.get("stepName"), branch=branch.get("type"))) |
| 226 | |
| 227 | else: |
| 228 | edge_list = [edge for edge in self.edges if edge.sourceNodeId == node.id] |
| 229 | if len(edge_list) == 0 and not end_nodes.__contains__(node.type): |
| 230 | raise AppApiException(500, _("{node} Nodes cannot be considered as end nodes").format( |
| 231 | node=node.properties.get("stepName"))) |
| 232 | |
| 233 | def is_valid_work_flow(self, up_node=None): |
| 234 | if up_node is None: |
no test coverage detected