MCPcopy Create free account
hub / github.com/1Panel-dev/MaxKB / new_instance

Method new_instance

apps/application/flow/common.py:188–194  ·  view source on GitHub ↗
(flow_obj: Dict, workflow_mode: WorkflowMode = WorkflowMode.APPLICATION)

Source from the content-addressed store, hash-verified

186
187 @staticmethod
188 def new_instance(flow_obj: Dict, workflow_mode: WorkflowMode = WorkflowMode.APPLICATION):
189 nodes = flow_obj.get('nodes')
190 edges = flow_obj.get('edges')
191 nodes = [Node(node.get('id'), node.get('type'), **node)
192 for node in nodes]
193 edges = [Edge(edge.get('id'), edge.get('type'), **edge) for edge in edges]
194 return Workflow(nodes, edges, workflow_mode)
195
196 def get_start_node(self):
197 return self.get_node('start-node')

Callers 8

debugMethod · 0.45
executeMethod · 0.45
actionMethod · 0.45
upload_documentMethod · 0.45
innerFunction · 0.45
publishMethod · 0.45

Calls 4

EdgeClass · 0.85
WorkflowClass · 0.85
NodeClass · 0.70
getMethod · 0.45

Tested by

no test coverage detected