Automation Engine Script Guide > Ordered by Function > Activate Objects > RESTART_UC_OBJECT

RESTART_UC_OBJECT

Script Function: Repeats the execution of a taskAn executable object that is running. Tasks are also referred to as activities..

Syntax

RESTART_UC_OBJECT (Object Name, Reference RunID, [Restart Point], [Flags], [Queue])

Syntax

Description/Format

Object Name

Name of the objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task.
Format: script literal, script variable or script function

Reference 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 .

RunID to which the restartA restart refers to the repetition of an object's execution. This action differs from a new start in some parts. refers, or the keyword LAST for the task's last execution.
Format: scriptA particular Automation Engine object type. literal, number, script variableA placeholder for a value within a script. or script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…

You cannot repeat a task that has already been restarted because traces would become very difficult. Therefore, the RunID must refer to an original execution. The latest original execution is used in combination with the keyword LAST.

Restart Point

Point in the script from which execution should be restarted.
Format: AE name, script literal, number, script variableIt stores or retrieves values dynamically at runtime. An individual Automation Engine object type.

This parameter can only be specified if you have specified restart points using :RESTART in the task that should be repeated.

The complete script is processed if this parameter is not used.

Flags

Instructions for the task execution.
Format: script literal or script variable 

Allowed values:
GEN_JCL = Supplies the generated JCL in the activation reportA report provides more detailed information about a task's execution or a component..
ORIGINAL_SCRIPT = Supplies the original script in the activation report.
VAR_MOD = Supplies the modification of variables in the activation report.
ATT_MOD = Supplies the modification of attributes in the activation report.
ATT_DIALOG = Activates the Attribute Dialog.
MAN_RELEASE = Waits for manual releaseReleases combine a set of activities and a set of packages as well as other release artifacts under a timeline (a plan including milestones and phases), which can be planned, baselined and tracked..
KEEP_STARTTYPE = Keeps the start type.
ONLY_ABENDED = Only repeats the subordinated tasks that were canceled.

You can specify several flags that must be separated by commas. The whole term must be written in inverted commas if these flags are named and no script variables are used.

The allowed values refer to the options that are also available for manual restarts in the dialog "Execute...".

Queue

Specification of a particular Queue object that should be used for restarting the task.

The task automatically starts in the Client Queue (CLIENT_QUEUE) if no queueA particular Automation Engine (AE) object type. In AE, a queue determines the maximum number of concurrent tasks, their priorities and the order in which tasks should be executed. In ARA, queues are containers for workflow executions that should be executed at a certain time one after another. has been specified.


Return code

"0" - Task restart was successful.
"20628" - The object does not exist.
"7014" - The reference RunID does not exist.
"20346" - The restart point does not exist. 
"20380" - The script element :EXIT has ended script processing in the restarted execution.
"20385" - The object is a Schedule.
"7015" - Restarting a restarted execution is not allowed.

Comments

This script function can be used to restart tasks that have already been executed.

A task can also repeat itself if this script function is called in Post Process. Note that this can result in an infinite loop.

Note that choosing one of the four test options as Flags ("GEN_JCL", "ORIGINAL_SCRIPT", "VAR_MOD" or "ATT_MOD") results in the jobAn Automation Engine object type for a process that runs on a target system. being aborted with :STOP. This is because the default value "N" (=No) is used as answer for the question "Do you want to start this job?".

To execute a restart with one or all of the four test options as flags successfully, please use the UserInterfaceThis is the Automation Engine's graphical user interface. [Formerly called the "Rich Client", "RichGUI" and "Dialog Client."], as described in the section "Execution with Options".

The RunID of the task that should be re-executed is assigned to this script function with the parameter Reference RunID. The key word LAST can also be used in order to restart a task's latest execution.

You can also specify a restart point that should be considered when the task is re-executed. The task starts but it is processed from the specified restart point. Flags are also optional and affect the task's execution.

The script statement :ON_ERROR can be used to determine the reaction to errors. They can then be analyzed using the script functions for error handling. Script processing continues but can also be canceled if necessary.

 This script statement has the effect that all the script's open transactions are written to the AE databaseA database is an organized collection of data including relevant data structures..

Examples

The following example repeats a job's the last execution. The generated JCL and the modification of variables are output in an activation log. The job waits in the Activity Window until it is manually released.

:SET &RET# = RESTART_UC_OBJECT ("JOBS.SYSTEM.CHECK",LAST,,"GEN_JCL,VAR_MOD,MAN_RELEASE")

 

See also:

Script element Description
:GENERATE

Controls the processing of script lines during the execution of a script.

:ON_ERROR

Determines the reaction to certain errors and messages of script elements.

:RESTART

Sets restart points in an executable object.

SYS_ACT_RESTART

Retrieves whether the object has been activated in restart mode.

SYS_ACT_RESTART_ME_NR

Returns the run number (RunID) of an object that has been activated in restart mode.

SYS_LAST_RESTART_POINT

Supplies the name of the previous restart point in the script.

SYS_LAST_RESTART_TEXT

Supplies the text of the previous restart point as defined in the script.

SYS_RESTART_POINT

Supplies the restart point from which the object is executed.

Script Elements - Activate Objects

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