MCPcopy Create free account
hub / github.com/OpenBMB/ChatDev / _process_edge_output

Method _process_edge_output

workflow/graph.py:396–441  ·  view source on GitHub ↗

Perform edge instantiation behavior. Edges with dynamic configuration still pass messages normally to the target node's input queue. Dynamic execution happens when the target node executes.

(
            self,
            edge_link: EdgeLink,
            source_result: Message,
            from_node: Node
    )

Source from the content-addressed store, hash-verified

394 edge_link.process_type = None
395
396 def _process_edge_output(
397 self,
398 edge_link: EdgeLink,
399 source_result: Message,
400 from_node: Node
401 ) -> None:
402 """Perform edge instantiation behavior.
403
404 Edges with dynamic configuration still pass messages normally to the target
405 node's input queue. Dynamic execution happens when the target node executes.
406 """
407 # All edges (including dynamic ones) use standard processing to pass messages
408 # Dynamic execution will happen in _execute_node when the target node runs
409
410 # Standard edge processing (no dynamic config)
411 manager = edge_link.condition_manager
412 if manager is None:
413 raise WorkflowExecutionError(
414 f"Edge {from_node.id}->{edge_link.target.id} is missing a condition manager"
415 )
416 try:
417 manager.process(
418 edge_link,
419 source_result,
420 from_node,
421 self.log_manager,
422 )
423 except Exception as exc: # pragma: no cover - defensive logging
424 error_msg = (
425 f"Edge manager failed for {from_node.id} -> {edge_link.target.id}: {exc}"
426 )
427 self.log_manager.error(
428 error_msg,
429 details={
430 "condition_type": edge_link.condition_type,
431 "condition_metadata": edge_link.condition_metadata,
432 },
433 )
434 logger = get_server_logger()
435 logger.log_exception(
436 exc,
437 error_msg,
438 condition_type=edge_link.condition_type,
439 condition_metadata=edge_link.condition_metadata,
440 )
441 raise WorkflowExecutionError(error_msg) from exc
442
443
444 def _get_dynamic_config_for_node(self, node: Node):

Callers 1

_execute_nodeMethod · 0.95

Calls 5

get_server_loggerFunction · 0.90
log_exceptionMethod · 0.80
processMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected