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

ROLLBACK_UC_OBJECT

Script functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,…: Runs the rollback of a specific taskAn executable object that is running. Tasks are also referred to as activities.

Syntax

ROLLBACK_UC_OBJECT(RunID)
ROLLBACK_UC_OBJECT([Workflow RunID], RunID2)

Syntax

Description/Format

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 .

The RunID of the task that should be rolled back.
Format: script variable, number without quotations or scriptA particular Automation Engine object type. literal

RunID2

The RunID of the task within the 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."] to which the workflow should be rolled back.
Format: script variableA placeholder for a value within a script., number without inverted commas or script literal

The first parameter is an optional parameter when you define this parameter.

To roll the workflow back to the START objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task, you must use the keyword START (without inverted commas (fpr the RunID2. The workflow's RunID is required in this case.

Workflow RunID The RunID of the workflow that should be rolled back to the task RunID2.
Format: script variable, number without inverted commas or script literal.

Return code

11121 - Task with the specified RunID could not be found.
12108 - Rollback for the task not possible. Rollback is not activated in the object.
12107 - Rollback not possible during the task statusThis represents the condition of a task (such as active, blocked, generating)..
20282 - Runtime error: Object not found.

Comments

This script element processes the rollback actions of the specified task. The processed actions depend on the object's rollback definition (Rollback Tab).

You can only roll back ended workflow tasks and only when their rollback function is enabled.

When the specified task is a workflow, all its subordinate tasks will also be rolled back.

You can also decide to roll back to a particular task within a workflow. Use the RunID of this workflow task for the second parameter RunID2. In the first parameter, you can optionally specify the RunID of the workflow in which the task runs.
To roll the workflow back to the START object, you must use the keyword START for the RunID2. In this case, you must specify the workflow's RunID.

Further information concerning the execution of backups and rollbacks is in the corresponding document.

Examples

The following example activates a jobAn Automation Engine object type for a process that runs on a target system. and checks its return codeThe value that represents the result of tasks and script functions.. The rollback starts when the task ends abnormally.

:SET &ACT# = ACTIVATE_UC_OBJECT(JOBS.TEST,WAIT)
:SET &RET# = GET_UC_OBJECT_STATUS(, &ACT#, "RETCODE")

:IF &RET# > 0
: SET &RB# = ROLLBACK_UC_OBJECT(&ACT#)
:ENDIF

 

See also:

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