Task - Start subtask
Declaration
<AMTASK TASKFILE="text" PASSWORD="text (encrypted)" /> or <AMTASK MANAGEDTASK="text" TASKID="text" PASSWORD="text (encrypted)" />
Description
Starts another task using the task name specified. When the subtask starts, the parent task will wait for it to complete before continuing. Variables from the parent task are available to the newly started subtask. This activity supports starting both managed and unmanaged (or external) tasks. More on managed and unmanaged tasks
Practical usage
Used to start a secondary task (also known as a child task or subtask) from a "parent" task. Especially useful for code reuse so the same code does not have to be written over and over again. Rather, one task (usually an unmanaged/external task) can be created and called repeatedly.
Parameters
General
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Run a task file | Text | No | (Empty) | TASKFILE=C:\Temp\Task1.aml | If selected, this parameter specifies the .AML file that points to an unmanaged or external task to run. |
Start a managed task | Text |
No |
(Empty) |
|
If
selected, this parameter specifies the name of the managed task to run. The task
must exist in the current machine's default managed task location
at runtime or the step will fail. NOTE: Later moving the task to another folder or modifying the task
name or parent folder name can break this linkage once created. |
Password (Optional) | Text | No | (Empty) | PASSWORD="text (encrypted)" | If the task is password protected, this parameter indicates the password to use to decrypt it so that it can run. |
Examples
- Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
- To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.
Description
This sample task starts a password protected managed task.
<AMTASK MANAGEDTASK="Task2" TASKID="" PASSWORD="AM5bwW+fU0fZizbr96fgvkkbQ==aME" />