Asynchronous Worker Task Chaining
Task Chaining allows you to create a task to be run after another task completes.
Table of Contents
Defining a Task Chain
1. Create an AsyncSchedule record to act as a template
For security purposes, you're not able to start any arbitrary task, instead you must define an AsyncSchedule to act as a template.
2. Create an AsyncTaskChain record in the Customer database
The AsyncTaskChain identifies the AsyncSchedule record and gives the task a name that you can reference in the starting task.
The TaskChain plug-in on form 1378 (EditSchedule Task) allowsyou to perform this actionin ClientTrack. You must have Integrationaccess to view/edit this setting.
3. If you want to be able to start the task from another customerenvironment, create an AsyncTaskChainAccess record
For example, if you want to run a task in training, then run a task in production, you must grantaccess to the training environment.
4. Set the async-TaskChain parameter in the firsttask
The value of the parameter is JSON-formatted data in the following format:
{
"customerId": "Target environment", // optional - used for cross-environment requests
"name": "Name of the AsyncTaskChain record",
"params": [ // A list of parameters to set in the target task
{
"name": "Name of the parameter to set",
"value": "The value to set it to",
"encrypt": true //optional - set to true to encrypt the value
}
]
}
The value can be a dynamic value.Dynamic values will load the value from the source task's Output, the sourcetask's own parameters, or global parameters such as @UserID@ or @DATE@. It also supports the special value @FileToken@ that can be used in cross- environment task chains to allow the target environment to access the file produced by the source environment.
The TaskChain plug-in on form 1378 (Edit Schedule Task) allows you to configure this action via the "Run another task" parameter in ClientTrack. You must have Integration access to view/edit this setting.
Standard Outputs
- FileName [fortasks that generated a file and stored it on the file server]- the name of the file produced
- FTP-URL [fortasks that generated a file and uploaded it to an FTP server]- the URL of the file on the FTP server
- ImageID[for tasks that generated a file and stored it in the FileUpload table]- the ID of the file
Sharing a Schedule so it can be run by another task
Configuring a task to run another task
Configuring the task to run