Script Statement: Assigns a value to a script variableA placeholder for a value within a script. and stores it in the activation reportA report provides more detailed information about a task's execution or a component..
:RSET Script variable = [Value]
Syntax |
Description/Format |
---|---|
The name of the script variable to which a value should be assigned. A script variable's name for the :PSET and :RSET scriptA particular Automation Engine object type. statements is limited to 31 alphanumeric characters (in most other cases script variable names are limited to 32 characters), including the special characters "$", "_", "@", "§" and "#". German Umlauts are not allowed. The first character must not be a number. Variables within the script must always specified with a leading "&" following the variable name! Format: script variable |
|
Value |
The value that should be assigned. |
This script statement stores the value that it assigns to a script variable in the activation report. The following line is written to the activation report:
YYYY-MM-DD HH:MM:SS - U0020206 Variable '&VAR#' was stored with the value 'VALUE'.
You can use the script elements :RSET and :READ to store values of script variables in the report.
The stored value can then be used in various ways.
You ca restartA restart refers to the repetition of an object's execution. This action differs from a new start in some parts. tasks with this stored value. No value assignment (which is part of the script statement) takes place if you restart a taskAn executable object that is running. Tasks are also referred to as activities.. Activation is canceled when the relevant script variable cannot be found. The value that has last been assigned is used when the script variable has been stored several times and no warning message is displayed.
A different way of using this script statement is to pass the content of a jobAn Automation Engine object type for a process that runs on a target system.'s script variable from Process to Post Process. In the Process tab, the value is assigned to the script variable. In the Post Process tab, the script statement is called again. No value is assigned this time but the script variable then contains the script value which has last been stored in the activation report.
Note that the data types "signed" and "float" will automatically be converted to "string" when the value of a script variable is stored to 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). report using the script element :RSET. Data type "unsigned" will not be converted.
Using :RSET in the script of 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."] generates an objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task variable that will also be passed on to subordinate workflow tasks (provided that this option is activated in the childA subordinate task (such as a task that runs in a workflow). tasks). An overlap of the object variable's name with the name of the workflow task can cause an error when the subordinate workflow tasks are generated (see : script variable- syntax). Make sure that variable names always end with a special character in order to avoid overlaps.
When you assign :SET and :RSET statements the same script variable with different values, their values will be set by those :SET and :RSET statements when the job is executed. However, if the job is restarted, the values of both variables will be set by the :SET statement. This is because :RSET statements automatically create object values and :SET statements automatically save the value for a restart. This is a change in behavior from v8, where :RSET statements did not create object values.
The following example accesses a script variable whose value is already set in the Process tab in the Post Process tab.
Process tab:
:RSET &TEXT# = "test"
:SET &NUMBER# = 1
:RSET &NUMBER# = ADD(&NUMBER#,1)
Post Process tab:
:RSET &TEXT#
:RSET &NUMBER#
:PRINT &TEXT#
:PRINT &NUMBER#
The values "test" and "2" are transferred to the Post Process tab and written to the activation report.
See also:
Script element | Description |
---|---|
Assigns a value to an object variable. |
|
This assigns a value to a script variable. |
|
:SET_SCRIPT_VAR | Sets the values of script variables by indirect access. |
Script Elements - Script Structure and Processing
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 |