Process Trigger

See Also

Introduction to Triggers, Available Triggers, Using AMTrigger, Setting a Process Watcher Trigger

Description

Launches a task when the specified process starts, ends or stops responding. To indicate partial process names, use wildcard characters * and ?.

Practical Usage

This trigger is frequently used to monitor external applications for unexpected crashes. It can also be used to start a task when an external application starts.

Parameters

General Tab

Wait for process to

Specifies the process action to monitor. The available options are:

 

 

Process Name

Specifies the process to watch. The provided combination list box accepts manual text entry or the process can be selected from the drop-down list of open processes. The folder button can be used to navigate to the desired application as well. Either a filename or a full path and filename may be entered. Wildcard characters * and ? can be used to indicate partial process names. For example, entering e*.exe will watch for all processes starting with the letter e.

Behavior Tab

Trigger on startup if condition is true

If enabled, the system will act upon conditions that already exist upon startup of the current trigger. For example, if the Notepad window is already open on the desktop, a newly created Window trigger set to monitor for the existence of a Notepad window will trigger the task as a result. If disabled, the trigger will ignore the open Notepad window upon startup.

Trigger after the condition has been met 'X' times.

If enabled, specifies how many times the trigger condition must be met before the task is started (disabled by default). This parameter is available in all triggers except the Schedule Trigger.

AMTrigger Parameters

When this trigger is activated, it automatically passes the "AMTrigger" object to the task. AMTrigger can be used within a task to determine whether or not the task was started by a trigger, which trigger started the task, and other trigger related properties. For more details, see Using AMTrigger.

Common AMTrigger Fields

Every instance of AMTrigger populates a list of common fields which are detailed in the table below.

Name

Data Type

Return Value

AMTrigger.Trigger

String

Returns the name of the event or condition that triggered the task. Each event or condition contains a unique name. For this trigger, the value is always AMPROCESSTRIGGER.

AMTrigger.TaskName

String

Returns the name of the managed task that the trigger was attached to. Useful to determine the responsible task when two managed tasks point to the same AML file.

AMTrigger.TriggerredDateTime

String

Returns the date and time when the trigger occurred.

AMTrigger.TriggeredOn

String

Returns the machine name where the trigger occurred.

AMTrigger.WasLocked

Boolean

If the workstation was locked when the trigger occurred, the value returned is 1. Otherwise, it will be 0.

AMTrigger.WasLoggedOff

Boolean

If the workstation was logged off when the trigger occurred, the value returned is 1. Otherwise, it will be 0.

AMTrigger.AML

String

Returns a verbose set of information about the triggered event or condition in AML (AutoMate Markup Language) format.

 

Specific AMTrigger Fields

The AMTrigger fields described below are exclusive only to the Process trigger.

Name

Data Type

Return Value

AMTrigger.Action

Text

Returns the action that activated the trigger. The available return values are:

  • START - The trigger was set to wait for the process to start.

  • END - The trigger was set to wait for the process to end.

  • HUNG - The trigger was set to wait for the process to stop responding.

AMTrigger.Exename

Text

Returns the filename of the process that activated the trigger, including full path and filename information.

AMTrigger.Filename

Text

Returns the filename of the process that activated the trigger excluding path information.

AMTrigger.ProcessID

Number

Returns the process ID of the process that activated the trigger. A process ID is a number automatically assigned to a process by the system. The process ID can be used by other actions in AutoMate to specify an instance of a process or application.

 

NOTE: A full list of AMTrigger objects exclusive to each trigger can be viewed from the Expression Builder by expanding Objects -> Triggers and selecting the desired trigger.

See Also

Setting a Process Watcher Trigger

About Triggers

All Available Triggers

Using AMTrigger

Using AMCondition