ScriptEigener Objekttyp in der Automation Engine Function: Supplies the run number (RunID"Kurzform für ""laufende Nummer"". Hierbei handelt es sich genauer um eine Zahl, welche die Durchführung einer Aufgabe eindeutig kennzeichnet. Die RunID kann zwischen 7 und 10 Stellen aufweisen. Sie wird von der Komponente Automation Engine vergeben.") of the superordinate task.
Syntax
SYS_ACT_PARENT_NR ([Activation type])
Syntax |
Description/Format |
---|---|
Activation type |
Allowed values: |
Return codes |
---|
RunID of the superordinate task |
Comments
This script function supplies the run number (RunID) of the superordinate task (parent). In the case of manual activation, this is the user's Session-ID.
If no activation type is indicated, this script function supplies the processor.
In order to facilitate that the name of a group may be retrieved, "Generate at Runtime" (Attributes tab) must be activated in the task using this script function. Otherwise, the name can only be retrieved for jobs in post process.
Examples
The first example checks whether the task runs in a group, workflow or schedule. If so, the run number (RunID) of this task is written in the activation protocol. If there is no superordinate task, the corresponding entry is made to the activation protocol.
:SET &NR#
= SYS_ACT_PARENT_NR()
:IF &NR# =
" "
: PRINT "No parent"
:ELSE
: PRINT "RunID of parent is
&NR#."
:ENDIF
The second example determines the Activator of a task. If it was activated by a task, the run number (RunID) of this task is shown in the activation protocol. In the case of manual activation, the protocol shows the RunID of the particular user session.
:SET &NR#
= SYS_ACT_PARENT_NR(ACT)
:PRINT "RunID of parent is &NR#."
See also:
Script element | Description |
---|---|
Supplies the name of a superordinate task. | |
SYS_ACT_PARENT_TYPE | Returns the object type of the superordinate task. |
Script Elements - Activation Data
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function