ROLLBACK_UC_OBJECT
Use the ROLLBACK_UC_OBJECT script function to roll back an active task. You can roll back the following types of tasks:
- A whole Workflow, including all tasks within the Workflow
- Part of a Workflow, rolling back until a specific task earlier in the Workflow
- An individual task
Important!
- Enable rollback and define rollback actions in the object definition of any tasks that you want to roll back. ROLLBACK_UC_OBJECT processes the rollback actions that are specified for the task.
- Rolling back is only possible for tasks that have not been deactivated.
More Information:
Tip: Use RERUN_UC_OBJECT to rerun tasks that have been rolled back.
Syntax
ROLLBACK_UC_OBJECT (RunID)
ROLLBACK_UC_OBJECT ([Workflow RunID], RunID2)
ROLLBACK_UC_OBJECT (Workflow RunID, START)
Parameters
- 
                                                ROLLBACK_UC_OBJECT 
 Rolls back the task
- 
                                                RunID 
 RunID of the task to roll back
 Format: script variable, number without quotations, or script literal
- 
                                                Workflow RunID 
 RunID of the Workflow when you want to roll back part of a Workflow until the task with RunID2
 Note: The parameter is optional when you roll back part of a Workflow, and required when you roll back all the way to the START box.
 Format: script variable, number without quotation marks, or script literal
- 
                                                RunID2 
 RunID of the task that you want to roll back to within the Workflow
 Format: script variable, number without quotation marks, or script literal
 Note: Specify the Workflow RunID and the START keyword without quotation marks to roll back to the START box.
Return Codes
- 11121
                                                
 No task was found with the specified RunID.
- 12108
                                                
 Rollback is not possible for the task: rollback is not enabled in the object definition.
- 12107
                                                
 Rollback is not possible for task because of the current task status.
- 20282
                                                
 Runtime error: Object not found.
Example
The following example activates a Job, and rolls back the task when the Job 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: