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

SYS_ACT_RESTART_ME_NR

Script Function: Returns 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 an objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task activated in restartA restart refers to the repetition of an object's execution. This action differs from a new start in some parts. mode.

Syntax

SYS_ACT_RESTART_ME_NR()

Return code

Run number of the object in which this scriptA particular Automation Engine object type.functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… is called.

Comments

This script function also returns the RunID of the current taskAn executable object that is running. Tasks are also referred to as activities. when it was activated normally. Thus, it can be used without previous checking for the activation type (normal or restart) being necessary. Please bear in mind that  SYS_ACT_ME_NR reacts differently to activation from restart mode.

Example

In the following example, the run number (RunID) of a task is written in the activation reportA report provides more detailed information about a task's execution or a component.. Additional information shows whether the task was activated normally or in restart mode.

:SET &RUNNR# = SYS_ACT_RESTART_ME_NR()
:
IF SYS_ACT_RESTART = "Y"
:   
PRINT "Job with RunID &RUNNR# processed in restart mode."
:
ELSE
:   
PRINT "Job with RunID &RUNNR# processed normally."
:
ENDIF

 

See also:

Script element Description

:RESTART

This is used to set restart points in an executable object.

SYS_ACT_RESTART

Determines if the object was activated in restart mode.

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