Planning
Contents
Planning Overview
Planning is the process of preparing and setting up processing tasks based on a scenario definition. This activity involves several key steps to ensure tasks are scheduled and executed correctly.
Steps in the Planning Process
- Waiting for a Planning Event - A planning event is triggered based on the scenario planning mode setting. This event can be one of the following types
- Time-based
- File-based
- Other types (as defined in Scenario)
- Retrieving Processing Parameter Values - User-defined parameters (refer to Parameter) are evaluated. Specifically, parameters whose values are defined by database queries will be evaluated. Only those parameters that are used by the scenario tasks will be evaluated. Parameters that are not part of the scenario will not be considered during this step.
- Scheduling Tasks for Execution - All valid tasks (see Task for task validity) are scheduled to be executed as part of the resulting Processing. These tasks are queued and await execution. No tasks will begin until the planning activity is complete.
- Notifying Operators - If the "Start scenario" operator is selected, a notification will be sent to the designated operators, informing them that the scenario has been triggered.
Time-Based Planning
In scenarios set to Daily Planning Mode, time-based events act as the primary driver for planning. This mode uses the following conditions to trigger planning events:
- Completion of Previous Instances: - The current planning event will only trigger if all previous instances (dates) of the scenario have completed.
- Date evaluation:
- If the scenario schedule base is set to "Previous run", it will attempt to trigger the next instance for the day following the last completed one. This mode does not allow "holes" in processing dates. For example if the processing is paused for a week, then the next planning will occur for the day following, e.g. 6 days ago.
- If the scenario schedule base is set to "Calendar/realtime", it will attempt to trigger for the current day. This mode allows date "holes" in processing, meaning if the processing is paused for a week, the planning is based on the Calendar day leaving a 6-day "hole" in processed dates.
- Holiday Considerations: - Planning will take into account holidays based on internal calendar information. (See Calendar for more details.) and the "Workdays only" flag
- Lag Settings: - The Lag setting defines a delay between the current processing and its execution. For example, a Lag setting of 1 means that processing scheduled for 2nd January 2025 will start no sooner than 3rd January 2025.
- Scenario Validity Dates: - The scenario's validity period is taken into account. If the scenario has defined validity dates, planning will only proceed within that period.
- Time constraint:
- If defined "Not before" field, planning will be delayed to match start time condition
- If defined "Not after" field, planning will not start if the time is after the time set; will wait till midnight
File-Based Planning
In scenarios set to File-based Planning Mode, planning is started when a file matching a specified mask is stored at a specified location (folder). On scenario, the following fields must be set:
- Base directory: - Directory, where the files are being checked. It is a local directory or a directory mounted to the local filesystem (local relatively to the Dafne Executor component).
- File name regexp: - Regular expression to match filename in the defined location. File name must contain the date of processing for planning. For this purpose regular expression named groups are used. Group names are "year", "month" and "day", optionally "iteration". For example to match a file with name data_20240101_i1.xml the following expression can be used: data_(?<year>20[0-9]{2})(?<month>[01][0-9])(?<day>[0-3][0-9])_(?<iteration>i[0-9]{0,12}).xml