Script Function: It uses filter criteria in order to retrieve the reportA report provides more detailed information about a task's execution or a component. lines of executable objects and provides the result for further processing in the form of an internal listShows entities in a grid view (data sequenceAn internal listing of Console outputs or lines of Variable objects, etc. The lines of a data sequence can be accessed by using a PROCESS loop or the script element GET_PROCESS_LINE. The script elements PREP_PROCESS* generate data sequences.).
PREP_PROCESS_REPORT([Object type , [RunID], [Report type], [Filter] [, "COL=Definition1], [Definition2]")
Syntax |
Description/Format |
---|---|
Object type |
The short form of the 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 that belongs to the executable objects. You can also edit the 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 which this scriptA particular Automation Engine object type. functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… is used. The short form is CLT in this case. Format: AE name, script literal or script variable This is an optional parameter because the object type can be clearly assigned through 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 . (compatible to version 2.6xx). |
RunID |
The RunID of the taskAn executable object that is running. Tasks are also referred to as activities. whose report should be processed. You can activate the Generate at runtimeThe duration of a task's execution. It refers to the period between a task's start and end. It does not include its activation period (see also: activation and start). option in the Attributes tab if you want to analyze the report of a different task. Client reports do not require a RunID in order to be specified. |
Report type |
The abbreviation for the report type. |
Filter |
The definition of a filter condition for the content of a line (case-insensitive). For the filter definition, you can use the wildcard charactersThese are placeholders for characters when you specify filters. ? stands for exactly one character, * for any number of characters. "*" and "?". "*" serves as a placeholder for any number of characters (even none) and "?" represents exactly one character. You can also use these wildcard characters repeatedly. Format: script literal or script variable |
Definition1 |
This parameter determines whether the lines of the data sequence will be subdivided into columns. Allowed values: NONE(default value), LENGTH, DELIMITER NONE = No subdivision |
Definition2 |
This parameter determines the column sizes and names (optional), or the delimiter. Allowed values: LENGTH_TAB and DELIMITER
|
Return Code |
---|
Reference to the data sequence of the report |
This script function provides the report contents of executable objects for further processing with AE Script. The report is read from the AE databaseA database is an organized collection of data including relevant data structures. and prepared as data sequence.
If you access a task's report by using this script function, the parameters RunID and Repor Type can be omitted because the script function itself retrieves the RunID. Note that you must set the comma that belongs to the parameter. By default, the jobAn Automation Engine object type for a process that runs on a target system. report (REP) is used for jobs and the activation report (ACT) for other tasks.
The job report of the task itself can be analyzed in the Post Process tab. Depending on the result, the definitive end of the job can be specified using the script statement :MODIFY_STATE.
The script function waits if a task is accessed that has already ended but whose report is still incomplete.
By default, this script function reads the entire line of the report. Structured access is also possible provided that the line is subdivided into columns. The following rules apply:
GET_PROCESS_LINE can be used to access particular columns.
The report is saved in the same language in which the Automation EngineThis component drives an Automation Engine system and consists of different types of server processes. logging is made.
The return codeThe value that represents the result of tasks and script functions. of this script function is a data sequence reference. It is given to the script statements :PROCESS and :ENDPROCESS as start parameters. In combination with the script function GET_PROCESS_LINE, each individual line of the data sequence and its columns can now be processed.
No error occurs if the data sequence does not contain the required content. The processing of the data sequence that is defined between :PROCESS and :ENDPROCESS does just not take place.
No new value can be assigned to the script variable containing the data sequence reference. The data sequence must be discarded with the script statement CLOSE_PROCESS first and then the variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. can be re-used.
The script statement causes all the script's open transactions to be written to the AE database.
The first example searches for all lines of a job report in which the drive C: appears. All lines are output in the activation protocol.
:SET &HND# = PREP_PROCESS_REPORT("JOBS",, "REP", "*C:\*")
:PROCESS &HND#
: SET &RET# = GET_PROCESS_LINE(&HND#)
: PRINT &RET#
:ENDPROCESS
The second example is based on a job which requested file names for processing from 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.. The file names are stored in the activation report. The file names can be read if a quotation is used as a delimiter. They are output in the activation protocol.
:SET &RUNNR# = GET_UC_OBJECT_NR("MM.DAY")
:SET &HND# = PREP_PROCESS_REPORT(, &RUNNR#,
"ACT",,"COL=DELIMITER",
"DELIMITER=*'*")
:PROCESS &HND#
: SET &RET# = GET_PROCESS_LINE(&HND#,1)
: PRINT &RET#
:ENDPROCESS
In the third example, a job's report is analyzed in its Post Process tab. This allows you to find out whether an error occurred while a file was copied under Windows. You can easily call the script function by using the Filter parameter. The preceding commas stand for the object type, the RunID and the report type JJR1 of the task itself.
:SET &HND# = PREP_PROCESS_REPORT(,,,"*file not found*")
:PROCESS &HND#
: SEND_MSG BU,BU,"Error occurred
while copying."
: MODIFY_STATE RETCODE=50
:ENDPROCESS
See also:
Script Element | Description |
---|---|
Discards an unnecessary data sequence. |
|
Loop for line by line processing of a data sequence - a sequential file or a command result, for example |
|
This is used to retrieve content from the current line of a data sequence. |
Script Elements - Data Sequences
Sample Collection
Setting End Status depending on Report Content
Calling an MBean
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 |