AMTrigger.ServiceName

Syntax

%AMTrigger.ServiceName%

Supported trigger

Service

Type

String

Description

Returns the Service Name of the service that activated the trigger. A service can normally be identified by its unique Service Name, Service Display Name or Service File Name. The Service Name is usually a shortened name for a service as compared to the more detailed Service Display Name. The Service File Name (also known as path to executable) displays the full path to the executable file related to the service. For example, Automate Management Server 2024 has the following name properties (as illustrated below):

  • Service Name - AMManagement[NN]

  • Service Display Name - Automate 2024 Management Server

  • File Name - "C:\Program Files\Automate 2024\BPAS_MAN.exe"

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.

Displays attributes about the triggered service in a message dialog, including service name, service display name and service path and file name.

Copy
<AMSHOWDIALOG WINDOWTITLE="Triggered Service Attributes">The service name of the triggered service: %AMTrigger.ServiceName%
The service display name of the triggered service: %AMTrigger.ServiceDisplayName%
The path and file name of the triggered service: %AMTrigger.FileName%
</AMSHOWDIALOG>

Related Topics