How To Dispatch Tasks And Workflows
TIP
Using Zenaton makes it unnecessary to install, operate and maintain additional infrastructure to asynchronously process and monitor tasks (such as a queuing system). Of course, using Zenaton makes sense only for tasks we want to process asynchronously.
# How To Dispatch A Task
Zenaton lets you dispatch tasks - not only workflows.
Let's assume that a task (eg. "SendWelcomeEmail") contains a unique call to an API. Using Zenaton, this task will be automatically managed and monitored up to its completion. From the Zenaton dashboard you can check that the processing was successful, and in case of error, Zenaton will ensure that your task will be retried according to your retry strategy.
Dispatching a standalone task can be done:
- using Zenaton SDK from a node.js application
- using Zenaton API from an application in another language
- from a 3rd party service
- from a workflow
# How To Dispatch A Workflow
When we dispatch a workflow, Zenaton will maintain its state and orchestrate its execution, through specialized internal tasks called "decisions". A decision is a special processing of the file describing the workflow in order to determine what to do next. As tasks, decisions are actually processed on our servers where a Zenaton Agent is installed.
Dispatching a workflow can be done:
- using Zenaton SDK from a node.js application
- using Zenaton API from an application in another language
- from a 3rd party service
- from a workflow