Task - Run

Declaration

<AMTASK ACTIVITY="trigger" MANAGEDTASK="text" PASSWORD="text (encrypted)" />

Related Topics   

Description

Starts a managed task as if it were triggered. All managed task properties will be utilized, 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 will 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)
  • MANAGEDTASK="Task2"
  • MANAGEDTASK="Foldername\Task2" 
Specifies the name of the managed task to trigger. The task must exist in the current machine's task list at runtime or the step will fail. 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's Security properties) this parameter indicates the password that should be used to allow it to run.

Description

Error Causes

On Error

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

This sample task runs a password protected managed task.

Copy
<AMTASK ACTIVITY="trigger" MANAGEDTASK="Samples\About - Sample Tasks" PASSWORD="AM5TlLKHdLIehZxRiool8/lCA==aME" />