How to add a subTask to an already running Task? I have a plugin which creates a task every time a specify form is submited. Now I want to create a WrapperTask and run each of those tasks as a subTask:



I know that I can create a sub-task within the WrapperTask by using $this-&gt;runSubTask, but how can I add a subTask to an already running WrapperTask from outside (the service for example)? Or at least send a new settings-array to an already running Task?

Example:


User submits form
Service creates WrapperTask
Service adds subTask to WrapperTask
Nothing happens for some time
User submits form again
Service checks if WrapperTask is still running, and adds subTask


.

If that's not possible, can I at least show them visually as subtasks of my plugin in the task-list?
Sub-tasks can only be initiated by the parent task, and they will only visually look like a sub-task if they are actually sub-tasks.

It’s also not possible to change the settings of an already-running task, at least without manually checking for new settings in your task.

So, your parent task’s getStep() function would need to do its own checking to see if it should be running a sub-task, somehow, and then conditionally call $this-&gt;runSubTask().