How to control the execution of tasks
Task dependency using `assert like` helpers
If a task depends on another task value, or state value, or metadata value you can use assert like helpers. Execution will be stopped if such assert are triggered. Instead of a value, a message of why the task didn't return a value will be present in the task result:
Available helpers are:
When an assert fails, it actually raises a TaskConformityError.
Exceptions
You can manually control the execution of task by raising workflow specific exceptions:
TaskConformityError
To prevent a task from returning a value, a TaskConformityError
with an error message can be raised. This is used to notify a reason of why a task couldn't be analysed properly.
DataConformityError
To prevent a task from returning a value, a DataConformityError
with an error message can be raised. This is used to notify there is Data Conformity related error.
WIP, don't use this for now. Or warn us if you would want to.