ores.reporting.report_instance

Table of Contents

A single execution of a report_definition. Created automatically when the scheduler fires a trigger for an active definition.

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

started_at is NULL when the instance is cancelled or skipped before execution begins. completed_at is NULL while running or in a terminal-before-start state.

1. Flags

2. Columns

2.1. id

UUID uniquely identifying this report instance.

2.2. name

Human-readable name copied from the report definition at creation time.

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

2.3. description

Description copied from the report definition at creation time.

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

2.4. party_id

Party that owns this report instance (inherited from the definition).

ctx.generate_uuid()

2.5. definition_id

The report definition that produced this instance.

ctx.generate_uuid()

2.6. fsm_state_id

Current FSM state (FK to ores_dq_fsm_states_tbl).

std::nullopt

2.7. trigger_run_id

Scheduler trigger run ID that caused this instance to be created.

faker::number::integer<std::int64_t>(1, 1000000)

2.8. output_message

Execution log or error message.

std::string()

2.9. started_at

When execution began. NULL if cancelled before starting.

std::nullopt

2.10. completed_at

When execution completed. NULL while running or before start.

std::nullopt

3. SQL

3.1. Flags

4. C++

4.1. Flags

4.2. Repository

4.3. Domain includes

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

4.4. Entity includes

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

4.5. Conventions

4.6. Table display

column header
name Name
definition_id Definition
trigger_run_id Trigger Run
output_message Output
started_at Started At
completed_at Completed
modified_by Modified By
version Version

4.7. Presentation

4.7.1. Detail fields

field label widget type is_key is_required placeholder
name Name nameEdit line_edit true true Report instance name
description Description descriptionEdit text_edit     Description
output_message Output outputEdit text_edit     Execution log or error message

4.7.2. Columns

enum_name field header type width
Name name Name string 200
DefinitionId definition_id Definition uuid 200
TriggerRunId trigger_run_id Trigger Run int 100
OutputMessage output_message Output string 250
StartedAt started_at Started At timestamp 150
CompletedAt completed_at Completed timestamp 150
Version version Version int 60
ModifiedBy modified_by Modified By string 120

4.8. Custom repository methods

5. See also

Emacs 29.3 (Org mode 9.6.15)