Automation Engine Script Guide > Ordered by Function > Event Handling > GET_WIN_EVENT

GET_WIN_EVENT

Script Function: Determines entries in the Windows system, security and applicationAn application is a software which helps a user to fulfill specific tasks. In the context of ARA see also: Application entity. logs if an eventAction that is triggered if particular conditions apply. It can be an Automation Engine object type or an entry in a Policy Orchestrator EventBase. occurs.

Syntax

GET_WIN_EVENT(Keyword, [Index])

Syntax

Description/Format

Keyword

Name of the field whose contents should be determined for this event.
Format: AE name or script variable.

CATEGORY - category of event
EVENT_ID
- Event IDFirst RunID of FileSystem and Console Events in the Automation Engine. Both Event types require communication between the AE component and an Agent. They communicate via the first RunID. Otherwise, Event identification is no longer possible after the first log change.
INSERT - a
ccesses one specific variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. message part
INSERT_COUNT
- determines the number of variable message parts
SOURCE
- source of the event
TIMESTAMP
- date and time
TYPE
- type of the event
USER
- 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.

Index

Access to the variable message parts in the Description field of the event details.
Format of Index: scriptA particular Automation Engine object type. literal, number or script variableA placeholder for a value within a script.. Default value: "1"

Can only be used in connection with the keyword INSERT (INSERT, Index).

Comments

This script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… is used in a "Console" event for Windows. With this event type the Windows event display can be monitored. This event occurs if an entry in the system, security or application protocol corresponds to the specifications made in the Detail tab. The processing steps from the ! Process tab are then processed. GET_WIN_EVENT in combination with a keyword can now be used to access specific information concerning this entry.

If TYPE is used as keyword, this script function supplies the following return codes: "I" for information, "W" for warning, "E" for error, "S" for success audit and "F" for failure audit.

Message texts in Microsoft Windows consist of static and variable parts. This script function delivers only the variable message parts. With INSERT_COUNT being the keyword, the number of the variable message parts can be specified. With INSERT being the keyword and the specification of Index, a particular variable message part is accessed. Index can only be specified with INSERT (optionally). Without Index, the function returns the first variable message part.

Examples

In the example shown below, the first the number of the variable message parts in the "Description" field of the event's details is determined. The number is stored in the script variable "&COUNT". Afterwards, a processing loop runs in which the second and third variable message part (keyword INSERT) are written to the activation reportA report provides more detailed information about a task's execution or a component..

:SET &COUNT# = GET_WIN_EVENT("INSERT_COUNT")
:
SET &IDX# = 1
:
WHILE &IDX# <= &COUNT#
:  
SET &INSERT# = GET_WIN_EVENT("INSERT", &IDX#)
:   
SET &HELP# = FORMAT(&IDX#, "000")
:   
PRINT "INSERT[&HELP#] = '&INSERT#'"
:   
SET &IDX# = ADD(&IDX#, 1)
:
ENDWHILE

This could be the entire message of the event's details: The user "00432233778822#0001" has established a connection with "T-Online" using the adapterAdapters are our application integrations such as Informatica or Business Objects for example. "AVMISDN1". The variable message parts are logged to the activation report with the following lines:
 

20010117/193135.000 - U0020408 INSERT[002] = 'T-Online'
20010117/193135.000 - U0020408 INSERT[003] = 'AVMISDN1'

 

See also:

Script Elements - Event Handling

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