Script Statement: This statement is used to send messages to the userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management. who is logged on to the UserInterfaceThis is the Automation Engine's graphical user interface. [Formerly called the "Rich Client", "RichGUI" and "Dialog Client."].
:SEND_MSG Name, Department, Message
Syntax |
Description/Format |
---|---|
Name |
Name of the user who has logged on to the UserInterface and should receive the
message. The wildcard charactersThese are placeholders for characters when you specify filters. ? stands for exactly one character, * for any number of characters. "*" and "?" can be used. "*" stands for any character, "?" for exactly one. |
Department |
Department of the user who has logged on to the UserInterface and should receive
the message. The wildcard characters "*" and "?" can be used. "*" stands for any character, "?" for exactly one. |
Message |
Message that should be sent. |
This script statement can be used to send messages to users. These messages are then displayed in these users' Message Windows.
Because the message can only be supplied to users who are logged on to the UserInterface, Automic recommends using the script element SYS_USER_ALIVE in order to have states checked.
Error "20698" occurs if the indicated user does not exist. Reactions to this error can be defined using the script statement :ON_ERROR and analyzed using the script functions for error handling. Script processing continues but can also be canceled if necessary.
Sent messages are logged and listed in the system control's message category. The message type is "Information" and the message category is "Message".
Note that sent messages can only be displayed if the UserInterface option "Display error messages and warnings only" is not active.
You can use the privilege "View all messages from own clientA closed environment within an Automation Engine system where you can create and run objects. A client name consists of a 4-digit number that must be indicated when a user logs on to the Automation Engine system. Users and their rights are also defined in clients. A particular Automation Engine object type." in order to have messages displayed that are sent to other users.
User "Brown" from the "IT" departmentDepartment name to which the Automation Engine user belongs. has logged on to the UserInterface and is requested to start the backup routine. A Notification objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task starts if this user has not logged on.
:SET &RET# = SYS_USER_ALIVE("BROWN","IT")
:IF &RET# = "Y"
: SEND_MSG "BROWN","IT","Please start backup
routine!"
:ELSE
: SET &ACTOBJ# = ACTIVATE_UC_OBJECT(CALL,"DAY_SHIFT")
:ENDIF
In the following example, the user receives the same message as shown in the above example. A script function is used for the department and a script variable for the message.
:SET &MSG# = "Please start backup
routine!"
:SEND_MSG "BROWN",SYS_USER_DEP(),&MSG#
The next example uses wildcard characters in order to send the message to all users of the IT department .
:SEND_MSG "*","IT","Please start backup routine!"
See also:
Script element | Description |
---|---|
Checks whether a user has logged on to AE with a UserInterface. | |
SEND_MAIL | Sends an email to a user. |
Script Elements - Error Handling and Messages
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by function
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |