Examples of Notification Object Scripting

Retrieving the user who has started the object plus the corresponding department

:ADD_ATT can be used to add this user as a receiver. Therefore, you can also process CALL.ALARM objects even without specifying a receiver.

!Get Operator

:set &userid# = SYS_USER_NAME

:set &dep# = SYS_USER_DEP

:ADD_ATT OPERATOR, '&userid#/&dep#'

!

Retrieving the name, RunID, status and return code of the task that triggered the Notification object

!Get Script

:read &UC_CAUSE_NAME,,

:read &UC_CAUSE_NR,,

:read &UC_CAUSE_STATE,,

:read &UC_CAUSE_RETCODE,,

!

:set &nl# = UC_CRLF ()

!

Retrieving the name, RunID and object type of the superordinate task that has activated the Notification object

Additionally, the Automation Engine system name, Client number, time and date of activation as well as the language are queried. The script element GET_MSG_TEXT() supplies the status text of the task that triggered the Notification object.

:set &parentname# = SYS_ACT_PARENT_NAME('ACT')

:set &parentnr# = SYS_ACT_PARENT_NR('ACT')

:set &parenttyp# = SYS_ACT_PARENT_TYP('ACT')

:set &system# = GET_UC_SYSTEM_NAME

:set &client# = SYS_ACT_CLIENT

:set &date# = SYS_DATE_PHYSICAL()

:set &time# = SYS_TIME_PHYSICAL("HH:MM:SS")

:set &lang# = SYS_USER_LANGUAGE

:set &statustext# = get_msg_txt(&UC_CAUSE_STATE,'')

!

After a language check, the retrieved information is written to the message text in German, English or French using the script element :PUT_ATT or :PUT_ATT_APPEND

See also: