: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 Considerations
Keep the following rules, notes, and behaviors in mind when using this script statement:
- 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.
- :SET_CONDITION only works with Workflows and tasks in Workflows.
More Information:
- Configuring the Time Properties of a Task in a Workflow
- Configuring the Dependencies of a Task in a Workflow
- Executing Objects: Generating Task at Activation Time vs Generating Task at Runtime
Syntax
:SET_CONDITION Condition [= Value]
Parameters
| Parameter | Description | Format | Allowed Values |
|---|---|---|---|
| Condition | Specifies whether to set the earliest start time of the Workflow or of the task in the Workflow. | Script literal or script variable |
|
| Value | Earliest start time in DD/HH:MM format. | Script literal or script variable | Default value: 00/00:00 |
Tip: Use GET_CONDITION to retrieve the earliest start time of a Workflow or a task in a Workflow.
Examples
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: