Process Condition

See Also

Setting a Process Condition, About Conditions, All Available Conditions, Using AMTrigger, Using AMCondition

Description

Launches a task when the specified process starts, ends or stops responding. It can also be used in the middle of the workfow to wait for a particular process to start/stop or used as a conditional object and determine  the course of the workflow depending on the state of a particular process. To indicate partial process names, use wildcard characters * and ?.

Practical Usage

Frequently used to monitor external applications for unexpected crashes. Process condition is also 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.

 

AMTrigger Parameters

When this condition is used to trigger the start of a task, 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, when the trigger was activated and other trigger related properties.

Common AMTrigger Fields

 

Every instance of AMTrigger populates a list of common fields which are described 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 AMPROCESSCONDITION.

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.

 

Exclusive AMTrigger Fields

 

The AMTrigger fields described in the table below are specific only to the Process Condition.

 

Name

Data Type

Return Value

AMTrigger.Action

Text

Returns the action that activated the condition. 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 condition, including full path and filename information.

AMTrigger.Filename

Text

Returns the filename of the process that activated the condition, excluding path information.

AMTrigger.ProcessID

Number

Returns the process ID of the process that activated the condition. 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.

AMCondition Parameters

When this condition is used in the middle of a workflow (as opposed to triggering condition) it automatically passes the AMCondition object to the task.

Common AMCondition Fields

Each condition contains its own set of unique AMCondition values. Therefore, the total number of fields that AMConditon creates during runtime and what they are called depend largely on the condition that was activated. However, every instance of AMCondition is populated with the following general fields:

Name

Data Type

Return Value

AMCondition.Agent

String

Returns the name of the agent where the condition activated.

AMCondition.DateTime

String

Returns the date and time of when the condition occurred.

AMCondition.Name
 

String

Returns the name of the activated condition. Each condition contains a unique name. For example, if the File condition was initiated, the value returned would be . See the help topic for each condition to determine that object's unique name.

AMCondition.Result
 

String

Returns the result of the activated condition (True or False).

AMCondition.WasLocked

Boolean

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

AMCondition.WasLoggedOff

Boolean

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

AMCondition.AML

String

Returns verbose data about the activated condition in AutoMate Markup Language (AML) format.

 

Exclusive AMCondition Fields

 

The AMCondition fields described in the table below are specific only to the Process condition.

 

Name

Data Type

Return Value

 
AMCondition.Action

Text

Specifies the type of wait that the condition used.

The available returns are:

  • START: The condition was set to wait for the process to start.

  • END: The condition was set to wait for the process to end.

  • HUNG: The condition was set to wait for the process to stop responding

 
AMCondition.Exename

Text

Returns the filename of the process that activated the condition including path and filename information.

AMTrigger.Filename

Text

Returns the filename of the process that activated the condition without path information.

 
AMTrigger.ProcessID

 

Text

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

 

.