ores.reporting.report_definition

Table of Contents

The persistent template for a report. Describes what to run, when to run it, and how to handle concurrent executions. Type-specific configuration (e.g. risk parameters) lives in a separate table keyed by report_definition_id.

Lifecycle is managed through the report_definition_lifecycle FSM machine. fsm_state_id points to the current state in ores_dq_fsm_states_tbl.

scheduler_job_id links to ores_scheduler_job_definitions_tbl.id and is set by the scheduler service when the definition is activated (state: active). It is cleared when the definition is suspended or archived.

Flags

Primary key

UUID uniquely identifying this report definition.

Natural keys

name

Unique name for the report definition within a party.

std::string(faker::word::noun()) + "_report"

Columns

party_id

Party that owns this report definition.

ctx.generate_uuid()

description

Human-readable description of the report.

std::string(faker::lorem::sentence())

report_type

Report type code (FK to ores_reporting_report_types_tbl).

std::string("risk")

fsm_state_id

Current FSM state (FK to ores_dq_fsm_states_tbl). Null until first activation.

std::nullopt

schedule_expression

Validated cron expression driving report recurrence.

std::string("0 6 * * 1")

concurrency_policy

Concurrency policy code (FK to ores_reporting_concurrency_policies_tbl).

std::string("skip")

scheduler_job_id

Scheduler job UUID (FK to ores_scheduler_job_definitions_tbl). Present only when status is active.

std::nullopt

SQL

Flags

C++

Flags

Repository

Domain includes

#include <optional>
#include <string>
#include <boost/uuid/uuid.hpp>

Entity includes

#include <optional>
#include <string>
#include "sqlgen/Timestamp.hpp"
#include <boost/uuid/uuid.hpp>

Conventions

Table display

column header
id ID
name Name
report_type Type
modified_by Modified By
version Version

Qt

Detail fields

field label widget type is_key is_required placeholder
name Name nameEdit line_edit true true Enter report definition name
description Description descriptionEdit text_edit     Enter a description
report_type Report Type reportTypeEdit line_edit   true e.g. risk
schedule_expression Schedule (cron) scheduleExpressionEdit line_edit   true e.g. 0 6 * * 1
concurrency_policy Concurrency Policy concurrencyPolicyEdit line_edit   true e.g. skip

Columns (Qt model)

enum_name field header type width
Name name Name string 200
ReportType report_type Type string 100
ScheduleExpression schedule_expression Schedule string 150
ConcurrencyPolicy concurrency_policy Concurrency string 100
Version version Version int 60
ModifiedBy modified_by Modified By string 120

Custom repository methods

See also

Emacs 29.1 (Org mode 9.6.6)