SYS_ACT_PARENT_NR

Script Function: Supplies the run number (RunID) of the superordinate task.

Syntax

SYS_ACT_PARENT_NR ([Activation type])

Syntax

Description/Format

Activation type

Allowed values:

ACT = Activator
PRC = Processor (default value)


Return codes

RunID of the superordinate task
Session ID in the case of manual activation (only for activation type ACT)
" " - There is no superordinate task (only for activation type PRC)

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

SYS_ACT_PARENT_NAME

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