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 the 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
| Parameter | Description | Format |
|---|---|---|
| Name | Name of the user | Script literal or script variable |
| Department | Department of the user | Script literal or script variable |
Important Considerations
-
You can only check users of your own client.
-
Users who are logged on through a utility or the Call Interface cannot be identified.
-
The name and department together identify the user. For more information, see Defining Users .
Return Codes
| Return Value | Condition |
|---|---|
| Y | The user is logged on to the Automic Web Interface |
| N | The user is not logged on to the Automic Web Interface, or the User object does not exist in the current client |
Examples
The following script in a Notification object checks whether 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: