SYS_ACT_ME_NR

Use the SYS_ACT_ME_NR script function to retrieve the RunID of the current task (the task that calls the script). You can use the RunID to identify a particular task, for example in notifications to users.

Note: If the task is restarted with the reference RunID, the script function returns the reference RunID instead of the RunID of the execution. For more information, see Executing Objects - Recurring.

Tip: Use SYS_ACT_RESTART_ME_NR to return the RunID of the reactivated object. For more information, see SYS_ACT_RESTART_ME_NR

Syntax

SYS_ACT_ME_NR ()

Example

The following script retrieves the RunID of a task, and uses the RunID to obtain information about the parent task.

:SET &RUNNR# = SYS_ACT_ME_NR() 
:
SET &PNAME# = GET_PARENT_NAME(, &RUNNR#, "ACT")
:
PRINT "Started by: &PNAME#"

The script prints the name of the parent in the activation report of the task. If the task was started by a user, the user name is printed, and if the task was started by another task, then the parent task name is printed.

See also:

seealso

Script Elements for Handling Tasks

Script Elements for Workflows and Tasks in Workflows