Bases: object
The base abstract class of all flow implementations.
A flow is a structure that defines relationships between tasks. You can add tasks and other flows (as subflows) to the flow, and the flow provides a way to implicitly or explicitly define how they are interdependent. Exact structure of the relationships is defined by concrete implementation, while this class defines common interface and adds human-readable (not necessary unique) name.
NOTE(harlowja): if a flow is placed in another flow as a subflow, a desired way to compose flows together, then it is valid and permissible that during compilation the subflow & parent flow may be flattened into a new flow.
The associated flow retry controller.
This retry controller object will affect & control how (and if) this flow and its contained components retry when execution is underway and a failure occurs.
Iterates over dependency links between children of the flow.
Bases: taskflow.flow.Flow
Linear flow pattern.
A linear (potentially nested) flow of tasks/flows that can be applied in order as one unit and rolled back as one unit using the reverse order that the tasks/flows have been applied in.
Bases: taskflow.flow.Flow
Unordered flow pattern.
A unordered (potentially nested) flow of tasks/flows that can be executed in any order as one unit and rolled back as one unit.
Bases: taskflow.flow.Flow
Graph flow pattern.
Contained flows/tasks will be executed according to their dependencies which will be resolved by using the flows/tasks provides and requires mappings or by following manually created dependency links.
From dependencies a directed graph is built. If it has edge A -> B, this means B depends on A (and that the execution of B must wait until A has finished executing, on reverting this means that the reverting of A must wait until B has finished reverting).
Note: cyclic dependencies are not allowed.
Link existing node u as a runtime dependency of existing node v.
Note that if the addition of these edges creates a cyclic graph then a DependencyFailure will be raised and the provided changes will be discarded. If the nodes that are being requested to link do not exist in this graph than a ValueError will be raised.
Parameters: |
|
---|
Adds a given task/tasks/flow/flows to this flow.
Note that if the addition of these nodes (and any edges) creates a cyclic graph then a DependencyFailure will be raised and the applied changes will be discarded.
Parameters: |
|
---|
Bases: taskflow.patterns.graph_flow.Flow
Graph flow with a target.
Adds possibility to execute a flow up to certain graph node (task or subflow).
Set target for the flow.
Any node(s) (tasks or subflows) not needed for the target node will not be executed.
Adds a given task/tasks/flow/flows to this flow.
Note that if the addition of these nodes (and any edges) creates a cyclic graph then a DependencyFailure will be raised and the applied changes will be discarded.
Parameters: |
|
---|
Link existing node u as a runtime dependency of existing node v.
Note that if the addition of these edges creates a cyclic graph then a DependencyFailure will be raised and the provided changes will be discarded. If the nodes that are being requested to link do not exist in this graph than a ValueError will be raised.
Parameters: |
|
---|
Bases: taskflow.utils.misc.StrEnum
Enumeration of decider(s) area of influence.
Default decider depth that affects all successor atoms (including ones that are in successor nested flows).
Decider depth that affects all successor tasks in the same flow (it will not affect tasks/retries that are in successor nested flows).
Warning
While using this kind we are allowed to execute successors of things that have been ignored (for example nested flows and the tasks they contain), this may result in symbol lookup errors during running, user beware.
Decider depth that affects only next successor tasks (and does not traverse past one level of successor tasks).
Warning
While using this kind we are allowed to execute successors of things that have been ignored (for example nested flows and the tasks they contain), this may result in symbol lookup errors during running, user beware.
Decider depth that affects only targeted atom (and does not traverse into any level of successor atoms).
Warning
While using this kind we are allowed to execute successors of things that have been ignored (for example nested flows and the tasks they contain), this may result in symbol lookup errors during running, user beware.