Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Wait For Sub-Workflow Completion" = false causes execution to not run #13830

Open
Fank opened this issue Mar 11, 2025 · 5 comments
Open

"Wait For Sub-Workflow Completion" = false causes execution to not run #13830

Fank opened this issue Mar 11, 2025 · 5 comments
Labels
in linear Issue or PR has been created in Linear for internal review Needs Feedback Waiting for further input or clarification.

Comments

@Fank
Copy link

Fank commented Mar 11, 2025

Bug Description

The main workflow:

Image

When following setting is set:

Image

Causes the execution on the subworkflow to not run:

Image

This also caused following error on the worker node:

Worker started execution 8511 (job 625)
Cannot read properties of undefined (reading 'data')
Worker finished execution 8511 (job 625)

When I change it to:

Image

Then the executions runs perfectly fine:

Image

Debug info

core

  • n8nVersion: 1.82.1
  • platform: docker (self-hosted)
  • nodeJsVersion: 20.18.3
  • database: postgres
  • executionMode: scaling
  • concurrency: -1
  • license: enterprise (production)
  • consumerId: 03176d77-824f-4ef2-83db-39f7bc022c2f

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: s3

pruning

  • enabled: true
  • maxAge: 336 hours
  • maxCount: 10000 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/134.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-03-11T13:29:21.206Z

To Reproduce

  1. Build multiple workflows
  2. call a sub workflow
  3. disable "Wait For Sub-Workflow Completion"
  4. call the same workflow again.

Expected behavior

That the execution runs like as it would wait.

Operating System

docker (self-hosted)

n8n Version

1.82.1

Node.js Version

20.18.3

Database

PostgreSQL

Execution mode

queue

@Joffcom
Copy link
Member

Joffcom commented Mar 11, 2025

Hey @Fank,

We have created an internal ticket to look into this which we will be tracking as "GHC-1147"

@Joffcom Joffcom added the in linear Issue or PR has been created in Linear for internal review label Mar 11, 2025
@Joffcom
Copy link
Member

Joffcom commented Mar 11, 2025

Hey @Fank,

I am not able to reproduce this, Below is an example workflow can you give it a run and see if it gives you the same issue?

{
  "nodes": [
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        0,
        0
      ],
      "id": "bf2644fd-ea1e-4b0e-96a1-aff0e17ff63a",
      "name": "When clicking ‘Test workflow’"
    },
    {
      "parameters": {
        "category": "randomData",
        "randomDataCount": 5
      },
      "type": "n8n-nodes-base.debugHelper",
      "typeVersion": 1,
      "position": [
        220,
        0
      ],
      "id": "3187ba41-138f-4054-96b2-587cd2261832",
      "name": "DebugHelper"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "={{ $workflow.id }}",
          "mode": "id"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        420,
        0
      ],
      "id": "5eb929d3-6dbf-480d-96a1-056ed2ddbd1a",
      "name": "Execute Workflow"
    },
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        40,
        220
      ],
      "id": "3cddb133-9ce2-4641-a204-76a2edd3f321",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "b9f2d025-5934-4e03-b4d4-f532327279c4",
              "name": "return",
              "value": "={{ $json.uid }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        220,
        220
      ],
      "id": "92a2ed88-a556-4e4b-bee1-295bc3f78fb8",
      "name": "Edit Fields"
    }
  ],
  "connections": {
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "DebugHelper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DebugHelper": {
      "main": [
        [
          {
            "node": "Execute Workflow",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "meta": {
    "instanceId": "13e13da6cec5a381aed49d0af7a257d6f48570c94beda6a35bc51d7a1388f782"
  }
}

@Joffcom Joffcom added the Needs Feedback Waiting for further input or clarification. label Mar 11, 2025
@Fank
Copy link
Author

Fank commented Mar 12, 2025

I tried to build a reproduction as well, it is not easily reproduceable, but its there.
In the workflow I am hitting that issue, its 100% reproduceable but its quite a complex workflow design.

@Joffcom Joffcom removed the Needs Feedback Waiting for further input or clarification. label Mar 12, 2025
@Fank
Copy link
Author

Fank commented Mar 12, 2025

This is workflow EMzNZ9O3lhWZgUyq:
Image

Workflow JSON
{
  "name": "Jira Webhook",
  "nodes": [
    {
      "parameters": {
        "events": [
          "comment_created",
          "comment_deleted",
          "comment_updated",
          "jira:issue_created",
          "jira:issue_deleted",
          "jira:issue_updated",
          "worklog_created",
          "worklog_deleted",
          "worklog_updated"
        ],
        "additionalFields": {
          "filter": "Project IN (DPIS, ESD, SD)"
        }
      },
      "type": "n8n-nodes-base.jiraTrigger",
      "typeVersion": 1.1,
      "position": [
        -540,
        -160
      ],
      "id": "74469f4f-7a87-45eb-924c-d2d6f5cd5809",
      "name": "Jira Trigger",
      "webhookId": "3c80bd33-a3ad-4806-b50a-98c6ccafcdfa",
      "credentials": {
        "jiraSoftwareCloudApi": {
          "id": "ZmNLmHXGmduvRcjQ",
          "name": "Jira SW Cloud"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "46cff509-a968-4c1c-b75a-d85aab53d264",
              "leftValue": "={{ $json.issue.fields.project.key }}",
              "rightValue": "=ESD",
              "operator": {
                "type": "string",
                "operation": "equals"
              }
            },
            {
              "id": "02c76045-fcd0-4b52-81b6-5030c387ee07",
              "leftValue": "={{ $json.issue.fields.project.key }}",
              "rightValue": "DPIS",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "or"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        80,
        -160
      ],
      "id": "1ffca4fd-2d45-4d0c-a6b9-77d7ecc41d53",
      "name": "DPIS, ESD"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "0179b75d-2a3d-4d9f-8c2f-7f86002220c4",
              "leftValue": "={{ $json.issue.fields.project.key }}",
              "rightValue": "SD",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        80,
        -380
      ],
      "id": "0e65ba0b-6acb-40bd-9526-062bdddbf071",
      "name": "SD"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "0ZHlllWAOOJWli1S",
          "mode": "list",
          "cachedResultName": "Service Desk — Company Phone Entry"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": true
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        300,
        -380
      ],
      "id": "0f84e3c3-b2c0-456f-baf6-412d1d0c7368",
      "name": "SD Project",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "129bb964-679f-48cc-ae03-52bfd1e21d81",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "jira:issue_created",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Issue created"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "3ed462ba-ee9b-4d87-aa7d-2e5416059d6f",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "jira:issue_updated",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Issue updated"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "a2ae942e-3fc1-4386-9027-e01934915528",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "jira:issue_deleted",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Issue deleted"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "worklog_created",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    },
                    "id": "697e7199-73c5-4c60-aebd-e03150a19b6f"
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Worklog created"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "71a336fa-1f7b-4319-b1ea-c73a6734e14d",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "worklog_updated",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Worklog updated"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "a170a91a-d0e8-470c-adca-7348f2699ddf",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "worklog_deleted",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Worklog deleted"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "05d6fd96-065f-41c1-b144-cfab342cbd68",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "comment_created",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Comment created"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "7c612702-f59e-4e3d-b0db-7524850a9d5e",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "comment_updated",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Comment updated"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "243f4930-27cd-4dfb-a13a-f57e4ea8ee79",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "comment_deleted",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "Comment deleted"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -320,
        -160
      ],
      "id": "f269cbf2-df9b-4a3c-a95d-1b4d24df8358",
      "name": "Event type"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "j5rJXn5aj73va2Ov",
          "mode": "list",
          "cachedResultName": "Jira — Issues ESD, DPIS sub"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": true
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        300,
        -160
      ],
      "id": "e4fe010e-0a11-4cce-9555-8e896ce437b6",
      "name": "Service Records - Issue Trigger",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "EWww2TZak18KeQvC",
          "mode": "list",
          "cachedResultName": "Service Records — Service Records - Worklog Trigger"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {
          "waitForSubWorkflow": false
        }
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        300,
        60
      ],
      "id": "315d5977-e5a9-4860-814f-9907ab684715",
      "name": "Service Records - Worklogs Trigger",
      "onError": "continueErrorOutput"
    },
    {
      "parameters": {
        "dataToSave": {
          "values": [
            {
              "key": "webhookEvent",
              "value": "={{ $json.webhookEvent }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executionData",
      "typeVersion": 1,
      "position": [
        -320,
        -340
      ],
      "id": "a01c6210-03c8-418b-9251-c3b9bb60c903",
      "name": "Execution Data"
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict",
            "version": 2
          },
          "conditions": [
            {
              "id": "df7aafb5-d05a-4405-b452-4c6ea6522795",
              "leftValue": "={{ $json.issue.fields.project.key }}",
              "rightValue": "NX",
              "operator": {
                "type": "string",
                "operation": "equals",
                "name": "filter.operator.equals"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.filter",
      "typeVersion": 2.2,
      "position": [
        80,
        320
      ],
      "id": "3c0c64b9-f5f3-41a6-921d-984612cb277a",
      "name": "NX"
    },
    {
      "parameters": {
        "dataToSave": {
          "values": [
            {
              "key": "worklogId",
              "value": "={{ $json.worklog.id }}"
            },
            {
              "key": "issueId",
              "value": "={{ $json.worklog.issueId }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executionData",
      "typeVersion": 1,
      "position": [
        80,
        160
      ],
      "id": "8f9754b5-75fd-42d6-8730-4afc1449bc49",
      "name": "Worklog Data"
    }
  ],
  "pinData": {},
  "connections": {
    "Jira Trigger": {
      "main": [
        [
          {
            "node": "Event type",
            "type": "main",
            "index": 0
          },
          {
            "node": "Execution Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DPIS, ESD": {
      "main": [
        [
          {
            "node": "Service Records - Issue Trigger",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "SD": {
      "main": [
        [
          {
            "node": "SD Project",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Event type": {
      "main": [
        [
          {
            "node": "DPIS, ESD",
            "type": "main",
            "index": 0
          },
          {
            "node": "SD",
            "type": "main",
            "index": 0
          },
          {
            "node": "NX",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "DPIS, ESD",
            "type": "main",
            "index": 0
          },
          {
            "node": "SD",
            "type": "main",
            "index": 0
          },
          {
            "node": "NX",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "DPIS, ESD",
            "type": "main",
            "index": 0
          },
          {
            "node": "SD",
            "type": "main",
            "index": 0
          },
          {
            "node": "NX",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Service Records - Worklogs Trigger",
            "type": "main",
            "index": 0
          },
          {
            "node": "Worklog Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Service Records - Worklogs Trigger",
            "type": "main",
            "index": 0
          },
          {
            "node": "Worklog Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Service Records - Worklogs Trigger",
            "type": "main",
            "index": 0
          },
          {
            "node": "Worklog Data",
            "type": "main",
            "index": 0
          }
        ],
        [],
        [],
        []
      ]
    },
    "Service Records - Issue Trigger": {
      "main": [
        []
      ]
    }
  },
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "6c2f1151-d403-40d0-8ee6-60f81641b214",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "94a4722c99e67331d954b7292a159d350b5424049db5ee23fe2d0df7fe09b001"
  },
  "id": "EMzNZ9O3lhWZgUyq",
  "tags": [
    {
      "createdAt": "2025-03-01T03:16:54.271Z",
      "updatedAt": "2025-03-01T03:16:54.271Z",
      "id": "07YEkYqLCE32kVY9",
      "name": "jira"
    },
    {
      "createdAt": "2025-03-01T08:55:32.491Z",
      "updatedAt": "2025-03-01T08:55:32.491Z",
      "id": "WbgzWMvUFxrZyPDK",
      "name": "issue"
    },
    {
      "createdAt": "2025-03-01T03:22:01.644Z",
      "updatedAt": "2025-03-01T03:22:18.311Z",
      "id": "95tzxYPMUq45Ngyn",
      "name": "worklog"
    }
  ]
}

This is workflow EWww2TZak18KeQvC:
Image

Workflow JSON
{
  "name": "Service Records - Worklog Trigger",
  "nodes": [
    {
      "parameters": {
        "inputSource": "passthrough"
      },
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "typeVersion": 1.1,
      "position": [
        -700,
        -60
      ],
      "id": "2429771f-7226-4c15-a947-9d91b44ee95e",
      "name": "When Executed by Another Workflow"
    },
    {
      "parameters": {
        "rules": {
          "values": [
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "worklog_created",
                    "operator": {
                      "type": "string",
                      "operation": "equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "worklog_created"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "71a336fa-1f7b-4319-b1ea-c73a6734e14d",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "worklog_updated",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "worklog_updated"
            },
            {
              "conditions": {
                "options": {
                  "caseSensitive": true,
                  "leftValue": "",
                  "typeValidation": "strict",
                  "version": 2
                },
                "conditions": [
                  {
                    "id": "a170a91a-d0e8-470c-adca-7348f2699ddf",
                    "leftValue": "={{ $json.webhookEvent }}",
                    "rightValue": "worklog_deleted",
                    "operator": {
                      "type": "string",
                      "operation": "equals",
                      "name": "filter.operator.equals"
                    }
                  }
                ],
                "combinator": "and"
              },
              "renameOutput": true,
              "outputKey": "worklog_deleted"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.switch",
      "typeVersion": 3.2,
      "position": [
        -460,
        -60
      ],
      "id": "96306f18-1dd5-4b66-bdfc-6a291faafe9a",
      "name": "Worklogs Switch"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "nq73682Xx8OoFWyy",
          "mode": "list",
          "cachedResultName": "Service Records — Worklogs"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        240,
        -160
      ],
      "id": "d1af4f55-f352-4b45-bb54-60f50390cc46",
      "name": "Create or update Worklog"
    },
    {
      "parameters": {
        "dataToSave": {
          "values": [
            {
              "key": "event",
              "value": "={{ $json.webhookEvent }}"
            },
            {
              "key": "worklogID",
              "value": "={{ $json.worklog.id }}"
            },
            {
              "key": "issueID",
              "value": "={{ $json.worklog.issueId }}"
            }
          ]
        }
      },
      "type": "n8n-nodes-base.executionData",
      "typeVersion": 1,
      "position": [
        -460,
        -240
      ],
      "id": "3ec76b46-44d9-4295-bbfc-1db914506b50",
      "name": "Execution Data"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "7QxOJGSNArwD6BGh",
          "mode": "list",
          "cachedResultName": "Service Records — Add default tempo category & set tempo property"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        -200,
        -160
      ],
      "id": "7fd35df4-6d0c-4c3e-987e-04ad895f527c",
      "name": "Tempo"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "yqWjU69TJmPu6EVD",
          "mode": "list",
          "cachedResultName": "Service Records — Add jira category"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        20,
        -160
      ],
      "id": "16bd5c43-0011-4e99-8662-0a01879d0eb1",
      "name": "Add jira category"
    },
    {
      "parameters": {
        "workflowId": {
          "__rl": true,
          "value": "J8IWdkIoc9pncnXH",
          "mode": "list",
          "cachedResultName": "Service Records — ServiceRecord BillingAccountTransactions"
        },
        "workflowInputs": {
          "mappingMode": "defineBelow",
          "value": {},
          "matchingColumns": [],
          "schema": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": true
        },
        "mode": "each",
        "options": {}
      },
      "type": "n8n-nodes-base.executeWorkflow",
      "typeVersion": 1.2,
      "position": [
        0,
        120
      ],
      "id": "904eacbf-4181-44f2-af19-6858c5dd6bb9",
      "name": "BillingAccountTransactions",
      "notesInFlow": true,
      "notes": "Update trigger for objects depending on the changed worklog"
    },
    {
      "parameters": {
        "method": "DELETE",
        "url": "={{$vars.url}}/v0/jira/import/worklogs/{{ $json.worklog.id }}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -200,
        120
      ],
      "id": "2c8956e5-d50e-4405-bd09-f3a738481190",
      "name": "Import worklog delete"
    }
  ],
  "pinData": {},
  "connections": {
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Worklogs Switch",
            "type": "main",
            "index": 0
          },
          {
            "node": "Execution Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Worklogs Switch": {
      "main": [
        [
          {
            "node": "Tempo",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Tempo",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Import worklog delete",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Tempo": {
      "main": [
        [
          {
            "node": "Add jira category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add jira category": {
      "main": [
        [
          {
            "node": "Create or update Worklog",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Import worklog delete": {
      "main": [
        [
          {
            "node": "BillingAccountTransactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "callerPolicy": "any"
  },
  "versionId": "0144e6bd-5c1a-4a8a-a450-50a9d01430fa",
  "meta": {
    "instanceId": "94a4722c99e67331d954b7292a159d350b5424049db5ee23fe2d0df7fe09b001"
  },
  "id": "EWww2TZak18KeQvC",
  "tags": [
    {
      "createdAt": "2025-03-01T03:16:54.271Z",
      "updatedAt": "2025-03-01T03:16:54.271Z",
      "id": "07YEkYqLCE32kVY9",
      "name": "jira"
    },
    {
      "createdAt": "2025-03-01T03:22:01.644Z",
      "updatedAt": "2025-03-01T03:22:18.311Z",
      "id": "95tzxYPMUq45Ngyn",
      "name": "worklog"
    }
  ]
}

Debug log:

2025-03-12T03:49:54.832Z | info  | Worker started execution 9195 (job 862) {"scopes":["scaling"],"executionId":"9195","jobId":"862","file":"job-processor.js","function":"processJob"}
2025-03-12T03:49:54.873Z | debug | No codex available for: stickyNote {"file":"directory-loader.js","function":"addCodex"}
2025-03-12T03:49:54.874Z | debug | Started Redis cluster client cache(n8n) {"scopes":["redis","scaling"],"type":"cache(n8n)","clusterNodes":[...],"file":"redis-client.service.js","function":"createClusterClient"}
2025-03-12T03:49:54.887Z | debug | Workflow execution started {"workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.891Z | debug | Start processing node "Jira Trigger" {"node":"Jira Trigger","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.892Z | debug | Running node "Jira Trigger" started {"node":"Jira Trigger","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.892Z | debug | Running node "Jira Trigger" finished successfully {"node":"Jira Trigger","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.893Z | debug | Start processing node "Execution Data" {"node":"Execution Data","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.893Z | debug | Running node "Execution Data" started {"node":"Execution Data","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.909Z | debug | Running node "Execution Data" finished successfully {"node":"Execution Data","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.910Z | debug | Start processing node "Event type" {"node":"Event type","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.910Z | debug | Running node "Event type" started {"node":"Event type","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.915Z | debug | Running node "Event type" finished successfully {"node":"Event type","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.915Z | debug | Start processing node "Service Records - Worklogs Trigger" {"node":"Service Records - Worklogs Trigger","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.916Z | debug | Running node "Service Records - Worklogs Trigger" started {"node":"Service Records - Worklogs Trigger","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.938Z | debug | Execution added {"executionId":"9196","file":"active-executions.js","function":"add"}
2025-03-12T03:49:54.945Z | debug | Running node "Service Records - Worklogs Trigger" finished successfully {"node":"Service Records - Worklogs Trigger","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.946Z | debug | Start processing node "Worklog Data" {"node":"Worklog Data","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.946Z | debug | Running node "Worklog Data" started {"node":"Worklog Data","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.954Z | debug | Running node "Worklog Data" finished successfully {"node":"Worklog Data","workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.955Z | debug | Workflow execution finished successfully {"workflowId":"EMzNZ9O3lhWZgUyq","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.955Z | debug | Executing hook (hookFunctionsSaveWorker) {"executionId":"9195","workflowId":"EMzNZ9O3lhWZgUyq","file":"execution-lifecycle-hooks.js"}
2025-03-12T03:49:54.956Z | debug | Save execution data to database for execution ID 9195 {"executionId":"9195","workflowId":"EMzNZ9O3lhWZgUyq","finished":true,"stoppedAt":"2025-03-12T03:49:54.955Z","file":"shared-hook-functions.js","function":"updateExistingExecution"}
2025-03-12T03:49:54.975Z | debug | Workflow execution started {"workflowId":"EWww2TZak18KeQvC","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.976Z | debug | Start processing node "When Executed by Another Workflow" {"node":"When Executed by Another Workflow","workflowId":"EWww2TZak18KeQvC","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.976Z | debug | Running node "When Executed by Another Workflow" started {"node":"When Executed by Another Workflow","workflowId":"EWww2TZak18KeQvC","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.976Z | debug | Running node "When Executed by Another Workflow" finished successfully {"node":"When Executed by Another Workflow","workflowId":"EWww2TZak18KeQvC","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.976Z | debug | Workflow execution finished successfully {"workflowId":"EWww2TZak18KeQvC","file":"LoggerProxy.js","function":"exports.debug"}
2025-03-12T03:49:54.977Z | debug | Executing hook (hookFunctionsSave) {"executionId":"9196","workflowId":"EWww2TZak18KeQvC","file":"execution-lifecycle-hooks.js"}
2025-03-12T03:49:54.977Z | debug | Save execution data to database for execution ID 9196 {"executionId":"9196","workflowId":"EWww2TZak18KeQvC","finished":true,"stoppedAt":"2025-03-12T03:49:54.976Z","file":"shared-hook-functions.js","function":"updateExistingExecution"}
2025-03-12T03:49:54.988Z | debug | Execution finalized {"executionId":"9196","file":"active-executions.js","function":"finalizeExecution"}
2025-03-12T03:49:54.989Z | debug | Execution removed {"executionId":"9196","file":"active-executions.js"}
2025-03-12T03:49:54.990Z | error | Cannot read properties of undefined (reading 'data') {"file":"error-reporter.js","function":"defaultReport"}
2025-03-12T03:49:54.996Z | info  | Worker finished execution 9195 (job 862) {"scopes":["scaling"],"executionId":"9195","jobId":"862","file":"job-processor.js","function":"processJob"}

It looks like it enters the When Executed by Another Workflow node in the sub workflow and then immediatly stops the execution with success.

@Joffcom
Copy link
Member

Joffcom commented Mar 12, 2025

Hey @Fank,

Even running that workflow I just can't reproduce it, I can see the error in the log where something is undefined but I am not sure what it is.

Do you happen to have the example trigger data that causes it and does it always fail?

@Joffcom Joffcom added the Needs Feedback Waiting for further input or clarification. label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in linear Issue or PR has been created in Linear for internal review Needs Feedback Waiting for further input or clarification.
Projects
None yet
Development

No branches or pull requests

2 participants