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

SYS_ACT_TOP_NR

Script Function: Supplies the run number (RunIDShort for "run number". It is a number that provides unique information about a task's execution. The RunID can include 7 to 10 digits. It is assigned by the Automation Engine component .) of the top workflowAn object of the Automation Engine that can include several executable objects and which runs them in a specified order. [Formerly called "ProcessFlow" and "JobPlan."]

Syntax

SYS_ACT_TOP_NR()

Return codes

RunID of the top workflow
" " - The taskAn executable object that is running. Tasks are also referred to as activities. was not activated by a workflow.

Example

In the following example, the return codes of the two scriptA particular Automation Engine object type. 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 userIn the Automation Engine, a user is an instance of a User object, and generally the user is a specific person who works with Automic products. The User object is assigned a user ID and then a set of access rights to various parts of the Automation Engine system and product suite. These access rights come in the form of Automation Engine authorizations and privileges, Decision user roles and EventBase rights and ARA web application object rights. You can manage all these centrally in the ECC user management functions. See also, Unified user management..

: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

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH