The CALL.ALARM objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task is a ready-for-use notificationAn Automation Engine object type used to send messages to users and user groups. [Formerly called "CallOperator."] that writes particular data to a message text by using a scriptA particular Automation Engine object type..
When you create a new Notification object, you can choose between two different types: STANDARD and ALARM.
Both types are notifications and differ from each in that the ALARM-type notification already includes a ready-for-use AE Script that reads data and outputs it in the message text. 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 executes this object is automatically specified as the receiver. Type "Alert" and "High" priority are always specified in ALARM notifications.
A complete AE Script ensures that the CALL.ALARM object can be executed immediately after it has been created because the receiver is automatically the user who has started the Notification object. Dynamic values, such as the name of the causing taskAn executable object that is running. Tasks are also referred to as activities., its RunIDShort for "run number". It is a number that provides unique information about a task's execution. The RunID can include 7 to 10 digits. It is assigned by the Automation Engine component ., etc. are retrieved and output in the message text. The script outputs the message text in the required language.
Examples:
Retrieving the user who has started the object plus the corresponding departmentDepartment name to which the Automation Engine user belongs..
: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, statusThis represents the condition of a task (such as active, blocked, generating). and return codeThe value that represents the result of tasks and script functions. of the task that triggered the Notification object. Additional information is available here: Notification - Execution.
!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 typeAn individual object is provided for the individual activities: There are User, UserGroup, Notification, Cockpit, CodeTable, Documentation, Event, Agent, FileTransfer, Group, Include, Job, Workflow, Calendar, Login, Client, RemoteTaskManager, Schedule, Script, Server, Sync, Variable and TimeZone objects of the superordinate taskThere are various ways of activating objects. The originator of the activation is referred to as the superordinate task (parent). that has activated the Notification object. Additionally, the AE system nameName of the Automation Engine instance to which a user is connected., 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. number, time and date of activation, and the language are queried. The script element GET_MSG_TEXT() supplies the status text of the task that caused the notification to start.
: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.
:if &lang# = 'E'
!: put_att SUBJECT = "Alarm:'&UC_CAUSE_NAME' RunID:'&UC_CAUSE_NR' Client:'&client#'
: set &date# = conv_date(&date#,"MM/DD/YYYY")
: PUT_ATT CALL_TEXT = "An error occurred! &nl# &nl#"
: put_att_append CALL_TEXT = "AE system: &system# &nl#"
: put_att_append CALL_TEXT = "Client: &client# &nl#"
: put_att_append CALL_TEXT = "Object: &UC_CAUSE_NAME &nl#"
: put_att_append CALL_TEXT = "Run#: &UC_CAUSE_NR &nl#"
: put_att_append CALL_TEXT = "State Text: &statustext# (&UC_CAUSE_STATE) &nl#"
: put_att_append CALL_TEXT = "Retcode: &UC_CAUSE_RETCODE &nl#"
: put_att_append CALL_TEXT = "Date/Time: &date# &time# &nl# &nl#"
: put_att_append CALL_TEXT = "Parent of this object (if available): &nl# &nl#"
: put_att_append CALL_TEXT = "Parent: &parentname# &nl#"
: put_att_append CALL_TEXT = "Type: &parenttyp# &nl#"
: put_att_append CALL_TEXT = "Run#: &parentnr# &nl#"
:endif
:if &lang# = 'D'
!: put_att SUBJECT = "Alarm:'&UC_CAUSE_NAME' RunID:'&UC_CAUSE_NR' Client:'&client#'
: set &date# = conv_date(&date#,"MM/DD/YYYY")
: PUT_ATT CALL_TEXT = "Ein Fehler ist aufgetreten! &nl# &nl#"
: put_att_append CALL_TEXT = "AE system: &system# &nl#"
: put_att_append CALL_TEXT = "Mandant: &client# &nl#"
: put_att_append CALL_TEXT = "Objekt: &UC_CAUSE_NAME &nl#"
: put_att_append CALL_TEXT = "Run#: &UC_CAUSE_NR &nl#"
: put_att_append CALL_TEXT = "Status: &statustext# (&UC_CAUSE_STATE) &nl#"
: put_att_append CALL_TEXT = "Retcode: &UC_CAUSE_RETCODE &nl#"
: put_att_append CALL_TEXT = "Datum/Zeit: &date# &time# &nl# &nl#"
: put_att_append CALL_TEXT = "Parent dieses Objektes (wenn vorhanden): &nl# &nl#"
: put_att_append CALL_TEXT = "Parent: &parentname# &nl#"
: put_att_append CALL_TEXT = "Typ: &parenttyp# &nl#"
: put_att_append CALL_TEXT = "Run#: &parentnr# &nl#"
:endif
:if &lang# = 'F'
!: put_att SUBJECT = "Alarm:'&UC_CAUSE_NAME' RunID:'&UC_CAUSE_NR' Client:'&client#'
: set &date# = conv_date(&date#,"MM/DD/YYYY")
: PUT_ATT CALL_TEXT = "Une erreur s'est produite! &nl# &nl#"
: put_att_append CALL_TEXT = "AE system: &system# &nl#"
: put_att_append CALL_TEXT = "Client: &client# &nl#"
: put_att_append CALL_TEXT = "Objet: &UC_CAUSE_NAME &nl#"
: put_att_append CALL_TEXT = "Run#: &UC_CAUSE_NR &nl#"
: put_att_append CALL_TEXT = "Statut: &statustext# (&UC_CAUSE_STATE) &nl#"
: put_att_append CALL_TEXT = "Retcode: &UC_CAUSE_RETCODE &nl#"
: put_att_append CALL_TEXT = "Date/Heure: &date# &time# &nl# &nl#"
: put_att_append CALL_TEXT = "Parent de cet objet (si disponible): &nl# &nl#"
: put_att_append CALL_TEXT = "Parent: &parentname# &nl#"
: put_att_append CALL_TEXT = "Type: &parenttyp# &nl#"
: put_att_append CALL_TEXT = "Run#: &parentnr# &nl#"
:endif
See also:
Getting Started - Notifications
Notification - Execution
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |