Task - Run
Declaration
<AMTASK ACTIVITY="trigger" MANAGEDTASK="text" PASSWORD="text (encrypted)" />
Overview
Starts a managed task as if it were triggered. All managed task properties are used, such as Logon, Priority, and Security settings.
Practical usage
Causes another task to execute as if it was started by a trigger. When a task is triggered, all of the parameters in the properties of the triggered task are applied.
IMPORTANT: Only use this
activity if the started task is allowed to
run asynchronously (that is, execution of the parent does not wait
for the subtask to complete) and other managed task properties
such as Error Handling and Logging are applied. This is
not the primary means for starting a synchronous subtask (a much
more common scenario). To start a subtask, use the Start
subtask activity instead. This activity contains much greater
capability in terms of error handling and passing variables to
subtasks.
Parameters
General
| Property | Type | Required | Default | Markup | Description |
|---|---|---|---|---|---|
| Managed task to trigger | Text | Yes | (Empty) |
|
Specifies the name of the managed task to trigger. The task must exist in the current machine task list at runtime or the step fails. For more information, see Managed Tasks vs. Unmanaged Tasks. |
| Run Password (optional) | Text | No | (Empty) | PASSWORD="text (encrypted)" | If the task is password protected (as specified in the managed task Security properties) this parameter indicates the password that allows it to run. |
Example
NOTE:
- 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
The following sample task runs a password protected managed task:
Copy
<AMTASK ACTIVITY="trigger" MANAGEDTASK="Samples\About - Sample Tasks" PASSWORD="AM5TlLKHdLIehZxRiool8/lCA==aME" />