Script Function: Retrieves the value or PromptSet variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type. of a certain taskAn executable object that is running. Tasks are also referred to as activities..
GET_PUBLISHED_VALUE(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 ., Variable Name)
Syntax |
Description/Format |
---|---|
RunID | The running number (RunID) of the task. Format: script literal or script variable |
Variable Name |
The name of an objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task or PromptSet variable of the specified task (without a leading & character). In arrays, you must additionally used empty brackets [] at the end of the name. |
Return codes |
---|
The value of the object or PromptSet variable. |
You can use 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,… together with :SET and :FILL. The script statement :SET can read the value of a regular object or PromptSet variable or of an individual PromptSet array element and :FILL can read a complete PromptSet array.
You can only define PromptSet variables as arrays in checklist and checkbox elements.
The following example activates an object and then reads its object variable &VARIABLE1#.
:SET &RUNID# = ACTIVATE_UC_OBJECT(&OBJ#,WAIT)
:SET &VAR# = GET_PUBLISHED_VALUE(&RUNID#,VARIABLE1#)
:PRINT "&&VARIABLE1# = &VAR#"
The second example reads the PromptSet variable &CHECKLIST1# that has been defined as an array. Only the value of the first array element is read here.
:SET &RUNID# = ACTIVATE_UC_OBJECT(&OBJ#,WAIT)
:SET &VAR# = GET_PUBLISHED_VALUE(&RUNID#,CHECKLIST1#[1])
:PRINT "&&CHECKLIST1#[1] = &VAR#"
The following scenario retrieves the activated task's complete PromptSet array. Then, the individual PromptSet elements are output in the activation reportA report provides more detailed information about a task's execution or a component.. If the PromptSet array exceeds the size of the script array, the system only stores the elements that fit in.
:DEFINE &ARRAY#, string, 10
:SET &RUNID# = ACTIVATE_UC_OBJECT(&OBJ#,WAIT)
:FILL &ARRAY# = GET_PUBLISHED_VALUE(&RUNID#,CHECKLIST1#[])
:SET &LEN# = LENGTH(&ARRAY#[])
:SET &VAR# = 1
:WHILE &VAR# LE &LEN#
:PRINT "&&ARRAY#[&VAR#] = &ARRAY#[&VAR#]"
:SET &VAR# = &VAR# + 1
:ENDWHILE
See also:
Script element | Description |
---|---|
Stores several values to a script array. |
|
:PUBLISH | Defines script variables and arrays as object variablesPlaceholder for values that are stored in an object's "Variables & Prompts" tab/section.. |
Script Elements - Activation Data
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Functions
Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support |
Copyright © 2016 Automic Software GmbH |