You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gcgj-dify-1.7.0/api/core/workflow/nodes
xuzijie1995 b13ae784a4 fix(workflow): Resolve streaming failure on conditional join points
Improves the robustness of the workflow engine's streaming output by fixing two core issues that caused streaming to fail in complex topologies where multiple conditional branches merge.

**1. Corrected Runtime State Management ("Pruning"):**

The primary bug was located in the `_remove_unreachable_nodes` method. Its aggressive recursive "pruning" algorithm incorrectly removed shared downstream nodes (including LLM and Answer) when handling conditional branches that led to a join point. This prematurely emptied the `rest_node_ids` list, causing the stream processor to fail its initial state check.

The fix replaces the recursive logic with a more conservative, non-recursive approach that only prunes the immediate first node of an unreachable branch. This ensures the integrity of the `rest_node_ids` list throughout the workflow execution.

**2. Improved Static Dependency Analysis:**

A secondary, underlying issue was found in the static dependency analysis (`_recursive_fetch_answer_dependencies`). It incorrectly identified all upstream, mutually exclusive `If/Else` nodes as parallel dependencies of the Answer node.

The fix enhances this analysis by adding "join point awareness". The upward trace now stops when it encounters a node with more than one incoming edge, correctly identifying the join point itself as the dependency rather than its upstream branches.

Together, these changes ensure that streaming output remains reliable and predictable, even in complex workflows with reusable, multi-input nodes.
10 months ago
..
agent fix: avoid using node_data.version for judgement tool node version (#22462) 10 months ago
answer fix(workflow): Resolve streaming failure on conditional join points 10 months ago
base refactor: decouple Node and NodeData (#22581) 10 months ago
code refactor: decouple Node and NodeData (#22581) 10 months ago
document_extractor refactor: decouple Node and NodeData (#22581) 10 months ago
end refactor: decouple Node and NodeData (#22581) 10 months ago
event fix: delete some dead code using vulture (#20999) 11 months ago
http_request refactor: decouple Node and NodeData (#22581) 10 months ago
if_else refactor: decouple Node and NodeData (#22581) 10 months ago
iteration refactor: decouple Node and NodeData (#22581) 10 months ago
knowledge_retrieval refactor: decouple Node and NodeData (#22581) 10 months ago
list_operator refactor: decouple Node and NodeData (#22581) 10 months ago
llm refactor: decouple Node and NodeData (#22581) 10 months ago
loop refactor: decouple Node and NodeData (#22581) 10 months ago
parameter_extractor refactor: decouple Node and NodeData (#22581) 10 months ago
question_classifier refactor: decouple Node and NodeData (#22581) 10 months ago
start refactor: decouple Node and NodeData (#22581) 10 months ago
template_transform refactor: decouple Node and NodeData (#22581) 10 months ago
tool fix: avoid using node_data.version for judgement tool node version (#22462) 10 months ago
variable_aggregator refactor: decouple Node and NodeData (#22581) 10 months ago
variable_assigner refactor: decouple Node and NodeData (#22581) 10 months ago
__init__.py feat/enhance the multi-modal support (#8818) 2 years ago
enums.py refactor: decouple Node and NodeData (#22581) 10 months ago
node_mapping.py fix: avoid using node_data.version for judgement tool node version (#22462) 10 months ago