langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
46.36k stars 6.54k forks source link

0.8.3 parallel Workflow run failed #8731

Open huangyafei opened 2 hours ago

huangyafei commented 2 hours ago

Self Checks

Dify version

0.8.3

Cloud or Self Hosted

Cloud, Self Hosted (Docker)

Steps to reproduce

I have found a similar Issue https://github.com/langgenius/dify/issues/8355# and a related PR https://github.com/langgenius/dify/pull/8378. But, this PR only fixed the problem within if/else nodes.

Currently, I'm encountering a new issue:

Case 1

Screen Shot 2024-09-24 at 22 09 01

DSL:

app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: Test Workflow
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
    opening_statement: ''
    retriever_resource:
      enabled: false
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727144308127-source-1727145030743-target
      selected: false
      source: '1727144308127'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148810092-source-1727148873972-target
      selected: false
      source: '1727148810092'
      sourceHandle: source
      target: '1727148873972'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148590580-source-1727145030743-target
      selected: false
      source: '1727148590580'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148681332-source-1727145030743-target
      selected: false
      source: '1727148681332'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148740287-source-1727145030743-target
      selected: false
      source: '1727148740287'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727145030743-source-1727172656753-target
      selected: false
      source: '1727145030743'
      sourceHandle: source
      target: '1727172656753'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148873972-source-1727172656753-target
      selected: false
      source: '1727148873972'
      sourceHandle: source
      target: '1727172656753'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1727172656753-source-1727149196020-target
      selected: false
      source: '1727172656753'
      sourceHandle: source
      target: '1727149196020'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727144308127-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727144308127'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148590580-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148590580'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148681332-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148681332'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148740287-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148740287'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148810092-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148810092'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: test1
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test1
        - label: test2
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test2
        - label: test2
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test3
      height: 142
      id: '1727142281355'
      position:
        x: 108.96174071985862
        y: 344.318673344686
      positionAbsolute:
        x: 108.96174071985862
        y: 344.318673344686
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 6fc4d2d3-6195-48e2-a8e8-b50b476ae586
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '1'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727144308127'
      position:
        x: 618.0908948235066
        y: 3.9787359408662155
      positionAbsolute:
        x: 618.0908948235066
        y: 3.9787359408662155
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: a91d2fac-f89c-44ed-9d96-5479fd1d92d3
          role: system
          text: '{{#1727142281355.test1#}}

            {{#1727144308127.text#}}

            {{#1727148590580.text#}}

            {{#1727148681332.text#}}

            {{#1727148740287.text#}}'
        selected: false
        title: A
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727145030743'
      position:
        x: 939.241283086283
        y: 270.6495585970275
      positionAbsolute:
        x: 939.241283086283
        y: 270.6495585970275
      selected: true
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 9334a19b-8c0f-488b-9b2b-4917684e26aa
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '2'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148590580'
      position:
        x: 618.0908948235066
        y: 138.1527613772792
      positionAbsolute:
        x: 618.0908948235066
        y: 138.1527613772792
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 2b95102d-5014-4d56-8b1d-f9b45a4e4012
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '3'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148681332'
      position:
        x: 618.0908948235066
        y: 275.9787359408662
      positionAbsolute:
        x: 618.0908948235066
        y: 275.9787359408662
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 6e289ffe-f1f8-418e-b5dd-746100d3d57d
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '4'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148740287'
      position:
        x: 618.0908948235066
        y: 433.9787359408662
      positionAbsolute:
        x: 618.0908948235066
        y: 433.9787359408662
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: f301340a-c6a0-4d66-8d4a-ef6edb5cb021
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '5'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148810092'
      position:
        x: 618.0908948235066
        y: 591.9787359408663
      positionAbsolute:
        x: 618.0908948235066
        y: 591.9787359408663
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 2870bb25-f9b7-4bde-80a8-bcf2d0724cbc
          role: system
          text: '{{#1727142281355.test2#}}

            {{#1727148810092.text#}}'
        selected: false
        title: B
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148873972'
      position:
        x: 939.241283086283
        y: 566.4133478867913
      positionAbsolute:
        x: 939.241283086283
        y: 566.4133478867913
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1727172656753'
          - text
          variable: text
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1727149196020'
      position:
        x: 1756.4116013408475
        y: 426.6748376865183
      positionAbsolute:
        x: 1756.4116013408475
        y: 426.6748376865183
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o-mini
          provider: openai
        prompt_template:
        - id: cde9e3d4-b80f-427e-ac80-630742578ac4
          role: system
          text: '{{#1727145030743.text#}}

            {{#1727148873972.text#}}'
        selected: false
        title: LLM 8
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727172656753'
      position:
        x: 1392.9711973004144
        y: 411.24959999322414
      positionAbsolute:
        x: 1392.9711973004144
        y: 411.24959999322414
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: -62.80515725984003
      y: 48.04103264536778
      zoom: 0.678929337056967

Case 2

Screen Shot 2024-09-24 at 22 10 25

DSL:

app:
  description: ''
  icon: 🤖
  icon_background: '#FFEAD5'
  mode: workflow
  name: Test Workflow
  use_icon_as_answer_icon: false
kind: app
version: 0.1.2
workflow:
  conversation_variables: []
  environment_variables: []
  features:
    file_upload:
      image:
        enabled: false
        number_limits: 3
        transfer_methods:
        - local_file
        - remote_url
    opening_statement: ''
    retriever_resource:
      enabled: false
    sensitive_word_avoidance:
      enabled: false
    speech_to_text:
      enabled: false
    suggested_questions: []
    suggested_questions_after_answer:
      enabled: false
    text_to_speech:
      enabled: false
      language: ''
      voice: ''
  graph:
    edges:
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727144308127-source-1727145030743-target
      selected: false
      source: '1727144308127'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148810092-source-1727148873972-target
      selected: false
      source: '1727148810092'
      sourceHandle: source
      target: '1727148873972'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148590580-source-1727145030743-target
      selected: false
      source: '1727148590580'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148681332-source-1727145030743-target
      selected: false
      source: '1727148681332'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148740287-source-1727145030743-target
      selected: false
      source: '1727148740287'
      sourceHandle: source
      target: '1727145030743'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727145030743-source-1727172656753-target
      selected: false
      source: '1727145030743'
      sourceHandle: source
      target: '1727172656753'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: llm
      id: 1727148873972-source-1727172656753-target
      selected: false
      source: '1727148873972'
      sourceHandle: source
      target: '1727172656753'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: llm
        targetType: end
      id: 1727172656753-source-1727149196020-target
      selected: false
      source: '1727172656753'
      sourceHandle: source
      target: '1727149196020'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727144308127-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727144308127'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148590580-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148590580'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148681332-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148681332'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148740287-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148740287'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: llm
      id: 1727142281355-source-1727148810092-target
      selected: false
      source: '1727142281355'
      sourceHandle: source
      target: '1727148810092'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: start
        targetType: template-transform
      id: 1727142281355-source-1727186987344-target
      source: '1727142281355'
      sourceHandle: source
      target: '1727186987344'
      targetHandle: target
      type: custom
      zIndex: 0
    - data:
        isInIteration: false
        sourceType: template-transform
        targetType: llm
      id: 1727186987344-source-1727148873972-target
      source: '1727186987344'
      sourceHandle: source
      target: '1727148873972'
      targetHandle: target
      type: custom
      zIndex: 0
    nodes:
    - data:
        desc: ''
        selected: false
        title: 开始
        type: start
        variables:
        - label: test1
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test1
        - label: test2
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test2
        - label: test2
          max_length: 5000
          options: []
          required: true
          type: paragraph
          variable: test3
      height: 142
      id: '1727142281355'
      position:
        x: 108.96174071985862
        y: 344.318673344686
      positionAbsolute:
        x: 108.96174071985862
        y: 344.318673344686
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 6fc4d2d3-6195-48e2-a8e8-b50b476ae586
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '1'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727144308127'
      position:
        x: 618.0908948235066
        y: 3.9787359408662155
      positionAbsolute:
        x: 618.0908948235066
        y: 3.9787359408662155
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: a91d2fac-f89c-44ed-9d96-5479fd1d92d3
          role: system
          text: '{{#1727142281355.test1#}}

            {{#1727144308127.text#}}

            {{#1727148590580.text#}}

            {{#1727148681332.text#}}

            {{#1727148740287.text#}}'
        selected: false
        title: A
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727145030743'
      position:
        x: 939.241283086283
        y: 270.6495585970275
      positionAbsolute:
        x: 939.241283086283
        y: 270.6495585970275
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 9334a19b-8c0f-488b-9b2b-4917684e26aa
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '2'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148590580'
      position:
        x: 618.0908948235066
        y: 138.1527613772792
      positionAbsolute:
        x: 618.0908948235066
        y: 138.1527613772792
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 2b95102d-5014-4d56-8b1d-f9b45a4e4012
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '3'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148681332'
      position:
        x: 618.0908948235066
        y: 275.9787359408662
      positionAbsolute:
        x: 618.0908948235066
        y: 275.9787359408662
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 6e289ffe-f1f8-418e-b5dd-746100d3d57d
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '4'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148740287'
      position:
        x: 618.0908948235066
        y: 433.9787359408662
      positionAbsolute:
        x: 618.0908948235066
        y: 433.9787359408662
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: f301340a-c6a0-4d66-8d4a-ef6edb5cb021
          role: system
          text: '{{#1727142281355.test1#}}'
        selected: false
        title: '5'
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148810092'
      position:
        x: 618.0908948235066
        y: 591.9787359408663
      positionAbsolute:
        x: 618.0908948235066
        y: 591.9787359408663
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o
          provider: openai
        prompt_template:
        - id: 2870bb25-f9b7-4bde-80a8-bcf2d0724cbc
          role: system
          text: '{{#1727142281355.test2#}}

            {{#1727148810092.text#}}'
        selected: false
        title: B
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727148873972'
      position:
        x: 939.241283086283
        y: 566.4133478867913
      positionAbsolute:
        x: 939.241283086283
        y: 566.4133478867913
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        outputs:
        - value_selector:
          - '1727172656753'
          - text
          variable: text
        selected: false
        title: 结束
        type: end
      height: 90
      id: '1727149196020'
      position:
        x: 1756.4116013408475
        y: 426.6748376865183
      positionAbsolute:
        x: 1756.4116013408475
        y: 426.6748376865183
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        context:
          enabled: false
          variable_selector: []
        desc: ''
        model:
          completion_params:
            temperature: 0.7
          mode: chat
          name: gpt-4o-mini
          provider: openai
        prompt_template:
        - id: cde9e3d4-b80f-427e-ac80-630742578ac4
          role: system
          text: '{{#1727145030743.text#}}

            {{#1727148873972.text#}}'
        selected: false
        title: LLM 8
        type: llm
        variables: []
        vision:
          configs:
            detail: high
          enabled: true
      height: 98
      id: '1727172656753'
      position:
        x: 1392.9711973004144
        y: 411.24959999322414
      positionAbsolute:
        x: 1392.9711973004144
        y: 411.24959999322414
      selected: false
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    - data:
        desc: ''
        selected: false
        template: '{{ arg1 }}'
        title: 模板转换
        type: template-transform
        variables:
        - value_selector:
          - sys
          - user_id
          variable: arg1
      height: 54
      id: '1727186987344'
      position:
        x: 618.0908948235066
        y: 728.9787359408663
      positionAbsolute:
        x: 618.0908948235066
        y: 728.9787359408663
      sourcePosition: right
      targetPosition: left
      type: custom
      width: 244
    viewport:
      x: -74.7201100837608
      y: 23.395580759163863
      zoom: 0.6770495523729501

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

dosubot[bot] commented 2 hours ago

I found a similar issue and discussion that might be relevant to your problem:

  1. Error in item: Invalid variable (open) - This discussion addresses a similar issue with variables not being found.
  2. This is a major issue with parallel execution in the workflow (open) - This discussion talks about issues with parallel execution in workflows.

The issue you're encountering with the parallel workflow run failing in Dify version 0.8.3 is likely due to the query variable not being properly initialized or passed to the nodes that require it. Specifically, the nodes tt and tt-2 use the query variable in their template, but there is no evidence that this variable is being set or passed correctly during the test execution.

Here is the relevant part of the code where the query variable is expected:

{
    "data": {
        "template": "{{ arg1 }} 123",
        "title": "template transform",
        "type": "template-transform",
        "variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}],
    },
    "id": "tt",
},
{
    "data": {
        "template": "{{ arg1 }} 321",
        "title": "template transform",
        "type": "template-transform",
        "variables": [{"value_selector": ["sys", "query"], "variable": "arg1"}],
    },
    "id": "tt-2",
}

To fix this issue, ensure that the query variable is properly initialized in the VariablePool when the GraphEngine is instantiated. For example:

variable_pool = VariablePool(
    system_variables={
        SystemVariableKey.QUERY: "your query here",
        SystemVariableKey.FILES: [],
        SystemVariableKey.CONVERSATION_ID: "abababa",
        SystemVariableKey.USER_ID: "aaa",
    },
    user_inputs={"query": "your query here"},
)

Make sure to replace "your query here" with the actual query you want to test with. This should ensure that the query variable is available to all nodes that require it, preventing the variable not found error [1][2].

To continue talking to Dosu, mention @dosu.