<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dafne.bi-services.sk/index.php?action=history&amp;feed=atom&amp;title=Scenario</id>
	<title>Scenario - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dafne.bi-services.sk/index.php?action=history&amp;feed=atom&amp;title=Scenario"/>
	<link rel="alternate" type="text/html" href="https://wiki.dafne.bi-services.sk/index.php?title=Scenario&amp;action=history"/>
	<updated>2026-10-23T19:26:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.4</generator>
	<entry>
		<id>https://wiki.dafne.bi-services.sk/index.php?title=Scenario&amp;diff=78&amp;oldid=prev</id>
		<title>Dafne: Documentation import</title>
		<link rel="alternate" type="text/html" href="https://wiki.dafne.bi-services.sk/index.php?title=Scenario&amp;diff=78&amp;oldid=prev"/>
		<updated>2026-08-06T13:36:48Z</updated>

		<summary type="html">&lt;p&gt;Documentation import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A &amp;#039;&amp;#039;&amp;#039;scenario&amp;#039;&amp;#039;&amp;#039; is a set of related tasks planned together by a common event — for example the availability of source data, or the completion of a system close. It is the unit of [[Planning]]: tasks are always planned one scenario at a time.&lt;br /&gt;
&lt;br /&gt;
A scenario should contain all the tasks that are processed in sequence with one another. Typical practice is to make the warehouse load one scenario, intra-day and near-real-time work a separate scenario, and database or server maintenance a third. Tasks that have nothing to do with each other do not belong in the same scenario, because they would then be forced to share a planning event.&lt;br /&gt;
&lt;br /&gt;
Each [[Group]] belongs to exactly one scenario, and therefore so does each [[Task]].&lt;br /&gt;
&lt;br /&gt;
== Planning modes ==&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;planning type&amp;#039;&amp;#039;&amp;#039; determines what triggers the scenario.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Planning types&lt;br /&gt;
! Type !! Trigger&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Standard daily&amp;#039;&amp;#039;&amp;#039; || Simple planning on a daily basis.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;File-based&amp;#039;&amp;#039;&amp;#039; || The processing date and iteration are parsed from a file name matching a regular expression in a defined folder.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;SQL defined&amp;#039;&amp;#039;&amp;#039; || Advanced planning driven by an SQL statement that returns the dataset currently available.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;REST polling&amp;#039;&amp;#039;&amp;#039; || Periodic polling of a REST endpoint for a starting event, such as data availability or file arrival.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Manual&amp;#039;&amp;#039;&amp;#039; || Planning only on request, from the GUI or through the REST API.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The modes themselves, and the fields each one uses, are described in [[Planning]].&lt;br /&gt;
&lt;br /&gt;
== Attributes ==&lt;br /&gt;
&lt;br /&gt;
=== General ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Attribute !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Name&amp;#039;&amp;#039;&amp;#039; || Unique name of the scenario.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039; || Free text.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Enabled&amp;#039;&amp;#039;&amp;#039; || Whether the scenario is planned. Disabling stops further instances being planned; instances already planned run to completion.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Connection&amp;#039;&amp;#039;&amp;#039; || The connection used to run the planning query. Required for SQL-based planning; only database-type providers are allowed.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Validity and time window ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Attribute !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Valid from&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;Valid to&amp;#039;&amp;#039;&amp;#039; || The period in which the scenario may be planned at all.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Not before&amp;#039;&amp;#039;&amp;#039; || Planning is delayed until this time of day.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Not after&amp;#039;&amp;#039;&amp;#039; || Planning does not start after this time; it waits until midnight.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
These are the generic constraints and apply to &amp;#039;&amp;#039;&amp;#039;all&amp;#039;&amp;#039;&amp;#039; planning modes.&lt;br /&gt;
&lt;br /&gt;
=== Daily planning ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Attribute !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Schedule base&amp;#039;&amp;#039;&amp;#039; || Determines which date is planned next. &amp;#039;&amp;#039;Previous run&amp;#039;&amp;#039; plans the day following the last completed one, leaving no gaps. &amp;#039;&amp;#039;Calendar/realtime&amp;#039;&amp;#039; plans the current day, which allows gaps. This setting decides how the scenario behaves after an interruption — see [[Recovery after an outage]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Workdays only&amp;#039;&amp;#039;&amp;#039; || Planning skips non-working days according to the [[Calendar]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Lag&amp;#039;&amp;#039;&amp;#039; || A delay in days between the processing date and its execution. A lag of 1 means processing for 2 January starts no earlier than 3 January.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Iteration prefix&amp;#039;&amp;#039;&amp;#039; || Used as the iteration code for daily planning.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Concurrency and load ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Attribute !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Max parallel&amp;#039;&amp;#039;&amp;#039; || The maximum number of instances of this scenario that may be active at once — in other words, how many processing dates may run concurrently. See [[Parallelism]].&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Parallel limit&amp;#039;&amp;#039;&amp;#039; || The maximum number of tasks running simultaneously within the scenario.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Load limit&amp;#039;&amp;#039;&amp;#039; || The maximum combined weight of tasks running within the scenario. See [[Resource management]].&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== SQL-based planning ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Attribute !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Query&amp;#039;&amp;#039;&amp;#039; || The SQL statement evaluated to decide whether to plan. Only the first row of the result is used.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Polling frequency&amp;#039;&amp;#039;&amp;#039; || Interval in minutes between evaluations of the query.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Check type&amp;#039;&amp;#039;&amp;#039; || Whether planned dates must follow an order — see below.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The query result is read positionally:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;date&amp;#039;&amp;#039;&amp;#039; — mandatory. A native date type, a &amp;#039;&amp;#039;YYYY-MM-DD&amp;#039;&amp;#039; string, or a numeric &amp;#039;&amp;#039;YYYYMMDD&amp;#039;&amp;#039;.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;iteration&amp;#039;&amp;#039;&amp;#039; — optional. Distinguishes intra-day or special runs from the standard daily run.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;name&amp;#039;&amp;#039;&amp;#039; — optional. When present, it replaces the default &amp;#039;&amp;#039;scenario/date/iteration&amp;#039;&amp;#039; label shown in the GUI.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Check types&lt;br /&gt;
! Type !! Constraint&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;None&amp;#039;&amp;#039;&amp;#039; || No constraint on date or iteration. Any combination returned is planned unless it is already in progress.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Date&amp;#039;&amp;#039;&amp;#039; || The new processing date cannot be earlier than the latest processing date of the same scenario.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Iteration&amp;#039;&amp;#039;&amp;#039; || As Date, and within the same date the iteration code cannot be lower than the highest iteration code already used for that scenario.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The query may contain [[Placeholders|placeholders]].&lt;br /&gt;
&lt;br /&gt;
=== File-based planning ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Attribute !! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Base directory&amp;#039;&amp;#039;&amp;#039; || The directory checked for files. Local to the Dafne executor, or mounted into its filesystem.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;File name regexp&amp;#039;&amp;#039;&amp;#039; || A regular expression matching the file name. Named groups &amp;#039;&amp;#039;year&amp;#039;&amp;#039;, &amp;#039;&amp;#039;month&amp;#039;&amp;#039;, &amp;#039;&amp;#039;day&amp;#039;&amp;#039; and optionally &amp;#039;&amp;#039;iteration&amp;#039;&amp;#039; supply the processing date.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Notification ===&lt;br /&gt;
Operators may be assigned to be notified when the scenario starts and when it finishes. See [[Operator]].&lt;br /&gt;
&lt;br /&gt;
== Placeholders available in the planning query ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Placeholder !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%scenarioid%&amp;lt;/code&amp;gt; || Scenario ID&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%scenarioname%&amp;lt;/code&amp;gt; || Scenario name&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%maxdate%&amp;lt;/code&amp;gt; || Latest finished processing date. Defaults to 1970-01-01 on the first run.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%maxprocessingID%&amp;lt;/code&amp;gt; || ID of the last finished processing. Defaults to 0 on the first run.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%maxIteration%&amp;lt;/code&amp;gt; || Iteration code of the last finished processing.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%maxIterationAll%&amp;lt;/code&amp;gt; || Iteration code of the last &amp;#039;&amp;#039;&amp;#039;started&amp;#039;&amp;#039;&amp;#039; processing.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%maxProcessingName%&amp;lt;/code&amp;gt; || Name of the last finished processing.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;%maxProcessingStatus%&amp;lt;/code&amp;gt; || Status of the last started processing. Defaults to &amp;#039;&amp;#039;F&amp;#039;&amp;#039; on the first run.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note the distinction between &amp;lt;code&amp;gt;%maxIteration%&amp;lt;/code&amp;gt;, which refers to the last &amp;#039;&amp;#039;&amp;#039;finished&amp;#039;&amp;#039;&amp;#039; processing, and &amp;lt;code&amp;gt;%maxIterationAll%&amp;lt;/code&amp;gt;, which refers to the last &amp;#039;&amp;#039;&amp;#039;started&amp;#039;&amp;#039;&amp;#039; one. Using the wrong one is a common cause of a scenario either re-planning a date or refusing to plan the next.&lt;br /&gt;
&lt;br /&gt;
See [[Placeholders]] for the general syntax.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[Planning]]&lt;br /&gt;
* [[Processing]]&lt;br /&gt;
* [[Group]]&lt;br /&gt;
* [[Parallelism]]&lt;/div&gt;</summary>
		<author><name>Dafne</name></author>
		
	</entry>
</feed>