Script Function: Stores a certain 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..
SAVE_PROCESS(Data sequence reference)
Syntax |
Description/Format |
---|---|
Data sequence |
The reference to the data sequence that should be stored. |
Return Code |
---|
The term under which the data sequence is stored. |
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,… stores a certain data sequence for the activityAn activity (or task) is an entity that can be planned, assigned to a user or a team and tracked with respect to their plan and state (started, cancelled, suspended, completed). in the AE databaseA database is an organized collection of data including relevant data structures.. This ensures that other tasks can access this data sequence.
The return codeThe value that represents the result of tasks and script functions. is a term that is composed of the name of the data sequence's reference. To use stored data sequences in other tasks, you must load them with the script element LOAD_PROCESS by specifying this term.
You can load stored data sequences as often as you like from any tasks of your choice.
Note that SAVE_PROCESS stores the data sequence but it does not close it. This means that you still need to use the script element CLOSE_PROCESS.
The data sequences remain available until the statistical records of the tasks that have been used to store them will be reorganized.
The two Script objects SCRI.TEST.DS1 and SCRI.TEST.DS2 will be processed in a workflowAn object of the Automation Engine that can include several executable objects and which runs them in a specified order. [Formerly called "ProcessFlow" and "JobPlan."] one after the other.
The first taskAn executable object that is running. Tasks are also referred to as activities. SCRI.TEST.DS1 creates a new data sequence and stores it to the AE database. The 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 . of the task and the internal name of the stored data sequence are made available to the workflow by using object variablesPlaceholder for values that are stored in an object's "Variables & Prompts" tab/section.. Finally, the data sequence is closed by using the following script:
:SET &HND# = PREP_PROCESS_VAR(VARA.DB)
:PSET &HND_KEY# = SAVE_PROCESS(&HND#)
:PSET &RUNID# = SYS_ACT_ME_NR()
:CLOSE_PROCESS &HND#
The second task SCRI.TEST.DS2 inherits the workflow's object variables. This information is used to load the data sequence, read its content and write it to the activation protocol.
:SET &HND# = LOAD_PROCESS(&RUNID#,&HND_KEY#)
:PROCESS &HND#
: SET &LINE# = GET_PROCESS_LINE(&HND#,2)
: P &LINE#
:ENDPROCESS
:CLOSE_PROCESS &HND#
See also:
Script Element | Description |
---|---|
Discards a data sequence within a script. |
|
The definition of a loop for the line by line processing of a data sequence such as the content of a sequential file or the text result of a command. |
|
CREATE_PROCESS | Creates a new data sequence. |
Returns the content of the current line of a data sequence. |
|
LOAD_PROCESS | Loads a stored 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 |