Logical Date

Date and time play an important role for the execution of tasks. Usually, the actual date and time are used. In some situations, it is required to specify a particular point of time instead of the current one. This particular point in time is referred to as the logical date. It becomes effective when the calendar conditions are checked.

The logical date and the real date  do no depend on each other. The logical date is used as a comparison date for checking the calendar conditions. The real date is used as a reference to the time conditions of workflows (task properties such as the earliest and latest runtime, runtime monitoring).

The logical date includes a date and a time. Only the date is important for the calendar check. The time is used to handle date changes that can result from time zone or time differences (Daylight Saving Time).

The logical date complies with the task's activation time if no particular date is specified. Exception: Workflow"Ermöglicht das Hinzufügen, Anordnen, Verknüpfen, Definition von Eigenschaften und Entfernen von Aufgaben eines Workflows. Ein eigener Objekttyp in der Automation Engine. [Früher ""AblaufPlan"" und ""JobPlan"" gennant.]" tasks always use the top workflow's activation time as their logical date.

Note that each task has a logical date even if it has not explicitly been set.

In Schedules, the logical date defines the start of the period. This is relevant for Schedules whose period comprises of several days and the individual tasks should be scheduled at particular days beginning at the period's starting time (see ScheduleStartet in periodischen Abständen aktivierbare Objekte. Auch ein eigener Objekttyp in der Automation Engine. properties - start time).
For example: You have created a Schedule with a period of 7 days. These days should represent the 7 days of a week. Therefore, the Schedule must start on a Monday. The activation time is only irrelevant if you activate the Schedule with a logical date that corresponds to a Monday. 

In Schedule tasks, the logical date is the time at which the tasks are scheduled or started in the Schedule.

The calendar conditions of Event objects are always checked against the current date and time. This means that the logical date does not affect events.

In restarts, the logical date corresponds to the reference execution. In restarted workflows, it is passed on to all subordinate tasks as in normal activations.

You can use the logical date for:

The following script functions are available for retrieving date and time:

Script Function

Description

SYS_LDATE

Returns the logical date.

SYS_TIMESTAMP_PHYSICAL

Provides the current date and time.

SYS_TIME_PHYSICAL

Determines the current time of the day.

SYS_DATE_PHYSICAL

Determines the current date.

SYS_TIME

Returns the current time of day at the beginning of script processing.

SYS_DATE

Returns the current date at the beginning of script processing.

CALE_LOOK_AHEAD

Returns the next date based on calendar conditions.

Pay special attention if you specify that either the current or the logical date should be considered in script elements which refer to time. This could result in adverse effects especially when tasks are restarted.

Examples

The following example explains how the logical date is best used:

The workflow JOBP.LOGDATE includes two tasks: JOB01 and JOB02. A calendar has been specified in the properties of JOB02. Therefore, this task can only start on Saturdays. Activating the workflow on a different day of the week has the effect that the workflow blocks. In order to execute the task and the workflow successfully, you need to use a logical date.

Execute the corresponding workflow using the Once option and define a point in time (a Saturday) as the logical date (such as 05/08/2010). This specified logical date will then be used for the calendar checks which are required for this workflow's tasks and the task JOB02 can be executed without problems.

See also:

Calendars and Calendar conditions
Workflow properties - Calendar

Schedule properties - Calendar

Real Date