ROLLBACK_UC_OBJECT
Script function: Runs the rollback of a specific task
Syntax
ROLLBACK_UC_OBJECT (RunID)
ROLLBACK_UC_OBJECT ([Workflow RunID] , RunID2)
Syntax |
Description/Format |
---|---|
RunID |
The RunID of the task that should be rolled back. |
RunID2 |
The RunID of the task within the workflow to which the workflow should be rolled back. The first parameter is an optional parameter when you define this parameter. To roll the workflow back to the START object, 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. |
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 job and checks its return code. 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:
Script Elements - Data Sequences
About Scripts
Script Elements - Alphabetical Listing
Script Elements - Ordered by Function