Script Function: Use selection criteria in order to retrieve a listShows entities in a grid view of XML Variable objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task values and provide the result for further processing in the form of an internal list (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_VAR_XML(Variable, Key, Value)
Return code |
---|
Reference to the data sequence of the Variable object. |
This script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… read the values of an XML Variable object. You limit the values that should be read by using the parameters Key and Value. The input is case sensitive.
Value refers to the content of a value column. Column determines the number of the particular value column that should be searched. The first value column is automatically used if you do not define a column. Static variables include 5 value columns. The column number of dynamic variables is not limited and depends on the data source and the settings that are defined in the Variable object.
The script function PREP_PROCESS_VAR_XML may only be used with the Variable object XML, which provides only one value column.
The return codeThe value that represents the result of tasks and script functions. of this script function is a data sequence reference. It is passed on to the script statements :PROCESS and :ENDPROCESS as a start parameter. If you use it in combination with the script function GET_PROCESS_LINE, you can now access each of the Variable object's individual lines.
No error message is output if the Variable object does not include the searched values. The data sequence that is defined between :PROCESS and :ENDPROCESS is not processed in this case.
Names of VARA objects that include a variable must be specified in quotation marks. Otherwise, an error message is displayed.
No new value can be assigned to the script variable that includes the data sequence reference. The data sequence must be discarded by using the script statement CLOSE_PROCESS, and then the variable can be re-used.
In this example, the value of the data sequence lines represented by the script variables &VALUE# and &GB# are read, which in turn read out the values "A/B" of the key called "KEY01" of the Variable object XML, called "VARA.XML":
:SET &HND# = PREP_PROCESS_VAR_XML(VARA.XML, "KEY01", "A/B")
:PROCESS &HND#
: SET &GB# = GET_PROCESS_LINE(&HND#,1)
: SET &VALUE# = GET_PROCESS_LINE(&HND#,2)
: PRINT "&GB# &WERT#"
:ENDPROCESS
See also:
Script element | Description |
---|---|
Discards an unnecessary data sequence. |
|
Loop for the line-by-line processing of a data sequence such as a sequential file or a command result. |
|
This is used to retrieve content from the current line of a data sequence. |
|
PREP_PROCESS_VAR | Use selection criteria in order to retrieve a list of Variable object values and provide the result for further processing in the form of an internal list (data sequence). |
Script Elements - Data Sequences
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 |