aeat.application.workflow._deadline_stage module¶
Deadline resolution helpers for the workflow engine.
The deadline stage projects the active TaxpayerProfile through the
domain deadline engine and selects one ModeloDeadline from the computed
Schedule. It keeps workflow verification and filing gates aligned with
the shared compute_obligation_schedule() producer
used by state projections.
See also
WorkflowEngineComposition root that calls these helpers from the
COMPUTING_DEADLINESstage.WorkflowPurposePurpose enum that decides whether a missing or late filing-window obligation aborts the run or remains informational context.
build_pending_obligations()Projection-side consumer of the same deadline schedule producer.
domain.deadlinesDomain schedule authority that emits the
ScheduleandModeloDeadlinerecords selected here.
- resolve_deadline_stage_obligation(deadline_engine, profile, *, target_modelo, target_period, today, purpose)[source]¶
Return the obligation the workflow deadline stage should evaluate.
- Parameters:
deadline_engine (
DeadlineEngineProtocol) – Deadline engine implementation that produces aSchedule.profile (
TaxpayerProfile) – TheTaxpayerProfileused to compute obligations.target_modelo (
str|None) – Optional exact modelo filter for a work-unit target.target_period (
Period|None) – Optional exactPeriodfilter for a work-unit target.today (
date) – Reference date for deadline status classification.purpose (
WorkflowPurpose) – Workflow purpose controlling late-local-file fallback behavior.
- Return type:
- Returns:
The selected
ModeloDeadline, orNonewhen no matching obligation exists.