SYS_ACT_TOP_NR

Script Function: Supplies the run number (RunID) of the top workflow

Syntax

SYS_ACT_TOP_NR ()

Return codes

RunID of the top workflow
" " - The task was not activated by a workflow.

Example

In the following example, the return codes of the two script functions are compared in order to determine whether the task was activated without a workflow, within a workflow, or within the framework of several nested workflows. The corresponding message will then be sent to a user.

:SET &TNR# = SYS_ACT_TOP_NR()
:
SET &PNR# = SYS_ACT_PARENT_NR()

:
IF &TNR#    = &PNR#
:   
IF &TNR# = " "
:      
SEND_MSG ADMIN,AE,"Task does not run in a workflow."
:   
ELSE
:     
 SEND_MSG ADMIN,AE,"Task runs in the workflow with RunID &TNR#. No superordinate workflows."
:   
ENDIF
:
ELSE
:   
SEND_MSG ADMIN,AE,"RunID of the superordinate workflow: &TNR#."
:
ENDIF

See also:

Script element Description

SYS_ACT_TOP_NAME

Supplies the name of the top workflow

Script Elements - Activation Data

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by function