AMTask

Description

When a task object executes within a workflow, an AutoMate dataset uniquely named AMTask is automatically created. This dataset returns a collection of task related data and can be used to determine specific characteristics regarding the previously executed task (i.e. name, output, Agent name, etc.). AMTask is a standard AutoMate dataset and can be used much like the datasets created by the SQL Query and Get E-Mail activities. The data in this dataset is laid out like a database table, which has a unique name and consists of columns and rows. The columns consist of pre-defined units of data, such as one item in a database or personnel data about one member of a customer list. The rows contain the actual data for the columns. For example, using a Message Dialog activity with the Message to Display field entered with:

%AMTask.Name%

would display a message dialog during task execution showing the name of the task that executed. For more details regarding datasets, see About Datasets.

Parameters

Every instance of AMTask is populated with the fields listed in the table below. For more details regarding a specific dataset, click its associated link.

Name

Type

Return Value

AMTask.AgentID

String

Returns the unique ID of the agent that the previous task executed on.

AMTask.AgentName

String

Returns the assigned name of the agent that the previous task executed on.

AMTask.AML

String

Returns information about the steps ran by the previous task displayed in AML (Automation Markup Language) format. The AML code would look similar to how they appear in the Task Builder's Steps panel.

AMTask.ID

String

Returns the unique ID of the previous task that executed.

AMTask.Name

String

Returns the assigned name of the previous task that executed.

AMTask.Path

String

Returns the repository path to the task that executed, including reference of any folders or subfolders that it is contained in.

AMTask.Result

Boolean

Returns the execution result of the task. Success returns 1. Failure returns 2. Incomplete returns 0.