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->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?