Calculating and tracking deadlines (Fristen)
This article explains how MobilityManager calculates the Fristen (deadlines) for a Strafmandat (penalty notice) using country- and violation-specific rule versions, and how the system tracks those deadlines automatically afterwards.
Calculate deadlines for a mandate
Run the calculate-deadlines action on a mandate to produce two dates from the violation date:
- Objection deadline (respond-by) — the last day to lodge an Einspruch (objection).
- Payment deadline (escalate-by) — the date used to drive reminders and escalation.
Calculation requires the strafmandate:view permission. The dates are computed from the violation date (or the creation date if no violation date is set) plus the day counts defined by the applicable rule.
How rule versions are chosen
The calculation is deterministic and driven by published rule sets, not guesswork:
- The mandate's country code and violation type are read from its core detail.
- The system finds the active rule-set version for the Strafmandate module and that country (the most recently published active version).
- Within that version it looks up the deadline rule matching the violation type, which supplies the objection-day and hearing-day counts.
- A deadline snapshot is stored, stamped with the exact rule version that produced it, so you always know which rules a given deadline was based on.
Note: Recalculating does not overwrite history — each run stores a new snapshot, and the latest one is used for tracking. Earlier snapshots remain for audit.
When calculation needs manual review
If the mandate has no country code, or no active rule version or matching rule exists, the system records a manual-review snapshot instead of inventing a date. The result is flagged as requiring manual review with the message "Deadline calculation failed due to missing calendar configuration" (error code DEADLINE_CALCULATION_FAILED). Complete the country and violation details, or publish the missing rule set, then recalculate.
Reading urgency
Each calculated deadline carries an urgency label based on days remaining:
| Label | Meaning |
|---|---|
| overdue | The deadline has already passed. |
| critical | Two days or fewer remain. |
| warning | Seven days or fewer remain. |
| normal | More than a week remains. |
| manual-review | No deadline could be calculated. |
Automatic deadline tracking
A scheduled background worker watches the latest deadline snapshots and acts without you having to poll:
- Reminders — for open or in-progress mandates whose payment deadline falls within the lead window (14 days by default), it posts a reminder entry to the timeline, at most once per day per mandate.
- Escalation — it moves mandates to escalated when there has been no response after an Anhörung dispatch, or when a mandate has shown no activity beyond the stale threshold.
- At-risk alerts — when a deadline is within the final hour, it raises an operational at-risk alert and notes it on the timeline.
Tip: These worker actions all appear on the mandate timeline with a system actor, so you can distinguish automated reminders and escalations from manual changes.
Related
- The mandate status workflow and transitions
- Start an objection (Einspruch) workflow
- The mandate timeline