Automation Engine Script Guide > Ordered by Function > Activation Data > SYS_ACT_RESTART_COUNT

SYS_ACT_RESTART_COUNT

Script function: Supplies the number of restarts that were made for workflow tasks using the action RESTART TASK (Postconditions).

Syntax

SYS_ACT_RESTART_COUNT()

Return code

Number of restarts

Comments

This script element retrieves the number of times a task has already been restarted within a workflow using the action RESTART TASK. You can define this action in the task properties of the Postconditions tab.

This value can also be retrieved using the predefined variable &$RESTART_COUNT#.

Example

The following example queries the number of times that the workflow task has been restarted and writes the corresponding information to the activation report.

:SET &RCOUNT# = SYS_ACT_RESTART_COUNT()
:
IF &RCOUNT# = 0
:
PRINT "The task has not yet been restarted."
:
ELSE
:
PRINT "Number of restarts: &RCOUNT#"
:
ENDIF

 

See also:

Script Element Description

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