Script Statement: Defines script variables and arrays as object variables.
:PUB[LISH] Variable Name, [Object Variable], [Scope]
The name of the script variable or script array (including a & character).
A script variable's name is limited to 32 alphanumeric 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
In arrays, you must additionally use empty brackets  at the end of the name.
The new name of the object variable (without a leading & character).
For arrays, the empty index brackets  at the end of the variable name must not be specified!
This determines the validity range of the variable.
Allowed values: TASK, WORKFLOW or TOP
The script statement :PUBLISH converts a script variable or a script array to an object variable and, if required, it passes it on to the superordinate task.
If you define the parameter Object Variable, the system creates a new object variable with this name and the value of the script variable. An existing object variable of the same name will be overwritten and the script variable remains unchanged in this case.
Note that the specified script variable or the array must already exist. Otherwise, a runtime error will occur.
When you specify a script array, the empty elements at the end of the array will not be used in or removed from the object variable regardless if the script variable is converted or when a new object variable is created.
Performance losses can be the result of using a script array that includes numerous elements (10000 or more).
This script statement is similar to the script element :PSET. The difference is that the specified scripting variable must exist and that you can also use arrays.
By using the parameter Scope, you can specify the tasks in which the object variable should be used. The variable can be passed on to the parent workflow, the top workflow or only be used within its own task.
The following example stores the object name in a script variable and passes it on to the superordinate workflow using :PUBLISH.
:SET &CHILD# = SYS_ACT_ME_NAME()
The second example creates a script array and fills it with the values of a Variable object. The array and the passed on to the top workflow as the new object variable.
:DEFINE &ARRAY#, string, 5
:FILL &ARRAY# = GET_VAR(VARA.TEST, KEY1)
:PUBLISH &ARRAY#, VARA_ARRAY#, "TOP"
Stores several values to a script array.
|GET_PUBLISHED_VALUE||Retrieves the value or PromptSet variable of a certain task.|
Script Elements - Activation Data
Script Elements - Alphabetical Listing
Script Elements - Ordered by Functions