Using Execute Workflow with Run once with all items and Wait For Sub-Workflow Completion

Describe the problem/error/question

I tried running a workflow with a dynamic list of people, for each of these person there should be a Sub-Workflow to have an user interaction (review). And the workflow should wait until all of them have answered, before going on.

My exspected behaviour is that Wait For Sub-Workflow waits on all workflows to complete.

If the first Sub-Workflow is done, the Execute Workflow step moves on and does not wait for all of them to finish.

Please share your workflow

This is my input json:
[
{ “user”: “Alice”, “task”: “Review A” },
{ “user”: “Bob”, “task”: “Review B” },
{ “user”: “Charlie”, “task”: “Review C” }
]

The main workflow:

The Sub-Workflow:

Information on your n8n setup

  • n8n version: 1.102.0
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system:

It probably doesn’t matter whether you set the execute-workflow node to run-once with all items or not. n8n’s behavior either way is for the calling workflow to send the entire list of items to the sub-workflow, as an array, in a single call.

One way you might be able to break it up into individual calls is to use a webhook trigger in the sub-workflow instead, and use an http request node to call the (production) webhook url. You may still have challenges trying to run multiple sub-processes in parallel and also waiting for all of them to be done.

I created a template titled Pattern for Parallel Sub-Workflow Execution Followed by Wait-For-All Loop that shows the closest approximation of that I’ve been able to imagine, but it still has some potential issues with timing (race conditions, timeouts, etc.) that could make it unreliable.