:SET_CONDITION
Use the :SET_CONDITION script statement to define the earliest start time of a Workflow, or of a task within a Workflow. The earliest start time that you set with this script statement applies only to the current execution of the task or Workflow. The script statement does not modify earliest start time settings in the task properties, or in the START node of the Workflow.
Important! Do not use :SET_CONDITION if the task or Workflow that calls the script is generated at runtime. When generated at runtime, the task or Workflow has already started when the script is processed, so setting an earliest start time cannot work.
More Information:
Syntax
:SET_CONDITION Condition [= Value]
Parameters
-
:SET_CONDITION
Defines the earliest start time of a Workflow or a task in a Workflow, for the current execution -
Condition
Specifies whether to set the earliest start time of the Workflow or of the task in the Workflow
Format: script literal or script variable
Allowed values:- EARLIEST_START_TIME
Earliest start time of the task that contains the script - JOBP_EARLIEST_START_TIME
Earliest start time of the Workflow
Important! Only use this parameter in the script of a Workflow when the Workflow itself has a parent Workflow. The script function sets the earliest start time of the parent Workflow. An error occurs if there is no parent Workflow.
- EARLIEST_START_TIME
-
Value
Earliest start time in DD/HH:MM format
Format: script literal or script variable
Default value: 00/00:00
Note: :SET_CONDITION only works with Workflows and tasks in Workflows.
Tip: Use GET_CONDITION to retrieve the earliest start time of a Workflow or a task in a Workflow.
Example
A task runs in a Workflow. Both the task and the Workflow are generated at activation time. The task contains the following script, where the first line of the script sets the earliest start time of the task itself. The second line sets the earliest start time of the Workflow. The script retrieves and prints both times in the activation report of the task.
:SET_CONDITION "EARLIEST_START_TIME"="00/10:19"
:SET_CONDITION "JOBP_EARLIEST_START_TIME"="00/10:18"
:SET &RETJOBS# = GET_CONDITION ("EARLIEST_START_TIME")
:SET &RETJOBP# = GET_CONDITION ("JOBP_EARLIEST_START_TIME")
:PRINT "New earliest start time of the task:", &RETJOBS#
:PRINT "New earliest start time of the workflow:", &RETJOBP#
See also: