After the parallel results are passed into the variable aggregator, only one result is displayed. #5703

Closed
opened 2026-02-21 18:12:14 -05:00 by yindo · 3 comments
Owner

Originally created by @yuhp-zts on GitHub (Sep 20, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.8.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

After the parallel results are passed into the variable aggregator, only one result is displayed.
The result of Code Executor 3 is missing in the diagram below
image

image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @yuhp-zts on GitHub (Sep 20, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.8.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce After the parallel results are passed into the variable aggregator, only one result is displayed. The result of Code Executor 3 is missing in the diagram below ![image](https://github.com/user-attachments/assets/0c4b41cb-3ed2-4951-a452-0a55fb88b76d) ![image](https://github.com/user-attachments/assets/6d004c9f-d005-4e47-ae4f-a795c58db592) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:12:14 -05:00
yindo closed this issue 2026-02-21 18:12:14 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Sep 20, 2024):

The reason only one result is displayed after the parallel results are passed into the variable aggregator in Dify version 0.8.0, and the result of Code Executor 3 is missing, is due to the configuration of the graph and the nodes involved in the iteration process.

In the test_run_parallel function, the graph configuration does not include a direct connection or node that would handle the output of Code Executor 3. The nodes and edges defined in the graph configuration do not account for a third code executor, which means its result is not processed or aggregated.

Here is the relevant part of the graph configuration:

graph_config = {
    "edges": [
        {
            "id": "start-source-pe-target",
            "source": "start",
            "target": "pe",
        },
        {
            "id": "iteration-1-source-answer-3-target",
            "source": "iteration-1",
            "target": "answer-3",
        },
        {
            "id": "iteration-start-source-tt-target",
            "source": "iteration-start",
            "target": "tt",
        },
        {
            "id": "iteration-start-source-tt-2-target",
            "source": "iteration-start",
            "target": "tt-2",
        },
        {
            "id": "tt-source-if-else-target",
            "source": "tt",
            "target": "if-else",
        },
        {
            "id": "tt-2-source-if-else-target",
            "source": "tt-2",
            "target": "if-else",
        },
        {
            "id": "if-else-true-answer-2-target",
            "source": "if-else",
            "sourceHandle": "true",
            "target": "answer-2",
        },
        {
            "id": "if-else-false-answer-4-target",
            "source": "if-else",
            "sourceHandle": "false",
            "target": "answer-4",
        },
        {
            "id": "pe-source-iteration-1-target",
            "source": "pe",
            "target": "iteration-1",
        },
    ],
    "nodes": [
        {"data": {"title": "Start", "type": "start", "variables": []}, "id": "start"},
        {
            "data": {
                "iterator_selector": ["pe", "list_output"],
                "output_selector": ["tt", "output"],
                "output_type": "array[string]",
                "startNodeType": "template-transform",
                "start_node_id": "iteration-start",
                "title": "iteration",
                "type": "iteration",
            },
            "id": "iteration-1",
        },
        {
            "data": {
                "answer": "{{#tt.output#}}",
                "iteration_id": "iteration-1",
                "title": "answer 2",
                "type": "answer",
            },
            "id": "answer-2",
        },
        {
            "data": {
                "iteration_id": "iteration-1",
                "title": "iteration-start",
                "type": "iteration-start",
            },
            "id": "iteration-start",
        },
        {
            "data": {
                "iteration_id": "iteration-1",
                "template": "{{ arg1 }} 123",
                "title": "template transform",
                "type": "template-transform",
                "variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}],
            },
            "id": "tt",
        },
        {
            "data": {
                "iteration_id": "iteration-1",
                "template": "{{ arg1 }} 321",
                "title": "template transform",
                "type": "template-transform",
                "variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}],
            },
            "id": "tt-2",
        },
        {
            "data": {"answer": "{{#iteration-1.output#}}88888", "title": "answer 3", "type": "answer"},
            "id": "answer-3",
        },
        {
            "data": {
                "conditions": [
                    {
                        "comparison_operator": "is",
                        "id": "1721916275284",
                        "value": "hi",
                        "variable_selector": ["sys", "query"],
                    }
                ],
                "iteration_id": "iteration-1",
                "logical_operator": "and",
                "title": "if",
                "type": "if-else",
            },
            "id": "if-else",
        },
        {
            "data": {"answer": "no hi", "iteration_id": "iteration-1", "title": "answer 4", "type": "answer"},
            "id": "answer-4",
        },
        {
            "data": {
                "instruction": "test1",
                "model": {
                    "completion_params": {"temperature": 0.7},
                    "mode": "chat",
                    "name": "gpt-4o",
                    "provider": "openai",
                },
                "parameters": [
                    {"description": "test", "name": "list_output", "required": False, "type": "array[string]"}
                ],
                "query": ["sys", "query"],
                "reasoning_mode": "prompt",
                "title": "pe",
                "type": "parameter-extractor",
            },
            "id": "pe",
        },
    ],
}

The graph configuration does not include a node or edge for a third code executor, which is why its result is missing [1].

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Sep 20, 2024): <!-- Answer --> The reason only one result is displayed after the parallel results are passed into the variable aggregator in Dify version 0.8.0, and the result of Code Executor 3 is missing, is due to the configuration of the graph and the nodes involved in the iteration process. In the `test_run_parallel` function, the graph configuration does not include a direct connection or node that would handle the output of Code Executor 3. The nodes and edges defined in the graph configuration do not account for a third code executor, which means its result is not processed or aggregated. Here is the relevant part of the graph configuration: ```python graph_config = { "edges": [ { "id": "start-source-pe-target", "source": "start", "target": "pe", }, { "id": "iteration-1-source-answer-3-target", "source": "iteration-1", "target": "answer-3", }, { "id": "iteration-start-source-tt-target", "source": "iteration-start", "target": "tt", }, { "id": "iteration-start-source-tt-2-target", "source": "iteration-start", "target": "tt-2", }, { "id": "tt-source-if-else-target", "source": "tt", "target": "if-else", }, { "id": "tt-2-source-if-else-target", "source": "tt-2", "target": "if-else", }, { "id": "if-else-true-answer-2-target", "source": "if-else", "sourceHandle": "true", "target": "answer-2", }, { "id": "if-else-false-answer-4-target", "source": "if-else", "sourceHandle": "false", "target": "answer-4", }, { "id": "pe-source-iteration-1-target", "source": "pe", "target": "iteration-1", }, ], "nodes": [ {"data": {"title": "Start", "type": "start", "variables": []}, "id": "start"}, { "data": { "iterator_selector": ["pe", "list_output"], "output_selector": ["tt", "output"], "output_type": "array[string]", "startNodeType": "template-transform", "start_node_id": "iteration-start", "title": "iteration", "type": "iteration", }, "id": "iteration-1", }, { "data": { "answer": "{{#tt.output#}}", "iteration_id": "iteration-1", "title": "answer 2", "type": "answer", }, "id": "answer-2", }, { "data": { "iteration_id": "iteration-1", "title": "iteration-start", "type": "iteration-start", }, "id": "iteration-start", }, { "data": { "iteration_id": "iteration-1", "template": "{{ arg1 }} 123", "title": "template transform", "type": "template-transform", "variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}], }, "id": "tt", }, { "data": { "iteration_id": "iteration-1", "template": "{{ arg1 }} 321", "title": "template transform", "type": "template-transform", "variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}], }, "id": "tt-2", }, { "data": {"answer": "{{#iteration-1.output#}}88888", "title": "answer 3", "type": "answer"}, "id": "answer-3", }, { "data": { "conditions": [ { "comparison_operator": "is", "id": "1721916275284", "value": "hi", "variable_selector": ["sys", "query"], } ], "iteration_id": "iteration-1", "logical_operator": "and", "title": "if", "type": "if-else", }, "id": "if-else", }, { "data": {"answer": "no hi", "iteration_id": "iteration-1", "title": "answer 4", "type": "answer"}, "id": "answer-4", }, { "data": { "instruction": "test1", "model": { "completion_params": {"temperature": 0.7}, "mode": "chat", "name": "gpt-4o", "provider": "openai", }, "parameters": [ {"description": "test", "name": "list_output", "required": False, "type": "array[string]"} ], "query": ["sys", "query"], "reasoning_mode": "prompt", "title": "pe", "type": "parameter-extractor", }, "id": "pe", }, ], } ``` The graph configuration does not include a node or edge for a third code executor, which is why its result is missing <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/tests/unit_tests/core/workflow/nodes/iteration/test_iteration.py)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@xrenaissance commented on GitHub (Sep 20, 2024):

I also had same issues on version 0.8.2

@xrenaissance commented on GitHub (Sep 20, 2024): I also had same issues on version 0.8.2
Author
Owner
@crazywoola commented on GitHub (Sep 21, 2024): Duplicated https://github.com/langgenius/dify/issues/8420 See https://github.com/langgenius/dify/issues/8420#issuecomment-2350899774
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5703