RERUN_UC_OBJECT

Use the RERUN_UC_OBJECT script function to continue a Workflow that has been rolled back. The function reruns all child tasks with the following statuses in the Workflow:

  • ENDED_ROLLBACKED
  • ENDED_ROLLBACK_EMPTY
  • Waiting for rollback

Syntax

RERUN_UC_OBJECT (RunID)

Parameters

Parameter Description Format
RunID RunID of the Workflow that has been rolled back. Script variable, number without quotation marks, or script literal

Important Considerations

Keep the following rules and limitations in mind when using this script function:

  • You can only rerun Workflows that have been rolled back.
  • You cannot rerun a Workflow that has already ended.

More Information:

Return Codes

The script function returns the following codes:

  • 12113: The specified task is not a Workflow.
  • 11011: No object with the specified RunID could be found.

Examples

The following example checks the status of a Job. If the status is 1904 (ENDED_ROLLBACKED), the script retrieves the RunID of the parent Workflow and reruns it:

:SET &RET# = GET_UC_OBJECT_STATUS(, &RUNID#"STATUS")

:IF &RET# = 1904

  :SET &PARENT# = GET_PARENT_NR(&RUNID#)

  :SET &RB# = RERUN_UC_OBJECT(&PARENT#)

:ENDIF

See also: