Automation Engine Script Guide > Ordered by Function > Activation Data > SYS_ACT_ME_NR

SYS_ACT_ME_NR

Script Function: Returns the run number (RunID) of the own object

Syntax

SYS_ACT_ME_NR()

Return code

Run number of the object in which this script function is called.

Comments

In the case that the task is restarted with the reference RunID, this script function supplies this reference RunID instead of the RunID of the execution. Always use SYS_ACT_RESTART_ME_NR to obtain the running number of the reactivated object.

Example

In this example, the RunID of a task is used in order to obtain parent information. If the task was started by a user, this user's name is printed in the activation report. If it was started by a task, the name of this task is printed.

:SET &RUNNR# = SYS_ACT_ME_NR() 
:
SET &PNAME# = GET_PARENT_NAME(, &RUNNR#, "ACT")
:
PRINT "Parent-Name: &PNAME#"

 

See also:

Script element Description

SYS_ACT_ME_NAME

Returns the name of the own object

SYS_ACT_ME_TYPE

Returns the object type of the own object

Script Elements - Activation Data

Sample Collection:
Retrieving Error Message and Number

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function