Subtask¶
flowtask.components.SubTask
¶
SubTask
¶
Bases: FlowComponent
SubTask
Overview
The SubTask class is a component for executing a specified task as a sub-task within a workflow.
It allows passing configurations and parameters, including conditional steps, to dynamically manage
and execute the named task in the specified program.
.. table:: Properties
:widths: auto
+----------------+----------+-----------+---------------------------------------------------------------+
| Name | Required | Summary |
+----------------+----------+-----------+---------------------------------------------------------------+
| task | Yes | The name of the task to execute as a sub-task. |
+----------------+----------+-----------+---------------------------------------------------------------+
| program | Yes | The name of the program under which the task is defined. |
+----------------+----------+-----------+---------------------------------------------------------------+
| ignore_steps | No | List of steps to ignore during the sub-task execution. |
+----------------+----------+-----------+---------------------------------------------------------------+
| run_only | No | List of specific steps to run, ignoring others. |
+----------------+----------+-----------+---------------------------------------------------------------+
| conditions | No | Dictionary of conditions to apply to the sub-task execution. |
+----------------+----------+-----------+---------------------------------------------------------------+
Returns
This component executes the specified task and returns the task’s output or state upon completion.
If the task encounters an error or lacks data, an appropriate exception is raised. The component tracks
task and program details in the metrics, and logs the state of the task if debugging is enabled.
Example:
```yaml
SubTask:
task: forms
program: banco_chile
```