Send task
You can send a task to the next stages with the function send_task
. When sending a task, you must define the two main components that define it: its type and its payload.
from abstra.tasks import send_task
send_task("approved", {
"name": "Michael Scott",
"company": "Dunder Mifflin",
})
By calling this function, this task will follow the workflow after this stage, on the transitions which support the specified task type.
Parameters
Parameter | Description | Type |
---|---|---|
type | The type of the task the stage is sending. This type is used to filter the transitions the task will follow. | str |
payload | Dictionary containing any useful information to be sent to the next stages. | dict |