SYS_USER_ALIVE

Use the SYS_USER_ALIVE script function to check whether a particular user is logged on to the Automation Engine through the Automic Web Interface.

Tip: Use the :ON_ERROR script statement to define action to take if the user is not available. For more information, see Script Elements for Error Handling.

Syntax

SYS_USER_ALIVE (Name, Department)

Parameters

  • SYS_USER_ALIVE
    Checks if the user is logged on

  • Name
    Name of the user
    Format: script literal or script variable

  • Department
    Department of the user
    Format: script literal or script variable

Notes:

  • You can only check users of your own client.
  • Users who are logged on via a utility or Call Interface cannot be identified.
  • The name and department identify the user. For more information, see Users (USER).

Return Codes

The script function as the following return codes:

  • Y
    The user is logged in the Automic Web Interface
  • N
    The is not logged in to the Automic Web Interface, or the User object does not exist in the current client

Example

The following script in a Notification object checks if User1 is logged on. If so, the script adds that user as a recipient of the notification. If the user is not logged on, the script adds User2 as a recipient instead.

:IF SYS_USER_ALIVE("USER1", "DEV")="Y"
:
ADD_ATT RECIPIENT,"USER1/DEV"
:
ELSE
:
ADD_ATT RECIPIENT,"USER2/DEV"

:ENDIF

See also: