pub struct WorkflowSummary {
pub workflow_id: WorkflowId,
pub workflow_type: String,
pub status: WorkflowStatus,
pub started_at: DateTime<Utc>,
pub ended_at: Option<DateTime<Utc>>,
pub parent: Option<WorkflowId>,
pub failed_step: Option<String>,
pub failure_reason: Option<String>,
pub display_name: Option<String>,
pub kind: Option<String>,
}Expand description
Lightweight projection of a workflow execution for query results.
Fields§
§workflow_id: WorkflowIdWorkflow execution identifier.
workflow_type: StringWorkflow type recorded when the execution started.
status: WorkflowStatusStatus projected from authoritative workflow history.
started_at: DateTime<Utc>Timestamp recorded on the workflow start event.
ended_at: Option<DateTime<Utc>>Timestamp recorded on the terminal lifecycle event, if any.
parent: Option<WorkflowId>Parent workflow identifier for child-workflow executions, if the store has one.
failed_step: Option<String>The step (activity type) that failed, populated ONLY for a workflow whose
current-lease terminal is Event::WorkflowFailed and whose failure has a
terminal activity failure to attribute it to (e.g. dev_review). This is
the workflow step, never a brief id or label. None for every
healthy/running/completed/cancelled workflow, so list renderers show no
empty failure column for non-failed rows.
failure_reason: Option<String>The terminal WorkflowFailed error message, populated ONLY for a workflow
whose current-lease terminal is Event::WorkflowFailed. None otherwise.
display_name: Option<String>The WORKFLOW’s operator-facing display name (#211), projected from the
aion.display_name search attribute (last write wins, so a rename’s
later recorded update supersedes the start-time name). A label over the
UUID identity, never an address: None renders as the bare UUID.
Per workflow, not per run, unlike the rest of this summary: the recorded
attribute carries no run id and the projection folds the whole history,
so a continue-as-new successor’s summary carries the name its
predecessor was wearing — see
WorkflowSummary::from_history.
kind: Option<String>The run’s document kind (workloop brief, listing surface): "workloop"
for workloop runs, None for ordinary workflows. Projected from the
aion.kind search attribute exactly like display_name — additive,
with NO change to WorkflowStatus. Folded per workflow, last write
wins, so every generation of a loop’s continue-as-new chain wears it.
Implementations§
Source§impl WorkflowSummary
impl WorkflowSummary
Sourcepub fn from_history(events: &[Event]) -> Option<WorkflowSummary>
pub fn from_history(events: &[Event]) -> Option<WorkflowSummary>
Builds a workflow summary from a workflow event history.
Returns None when the history does not contain a
Event::WorkflowStarted event. The projected status and end timestamp
are derived from the current run in the history, matching
status_from_events. Parent linkage (aion#77) is projected from the
current run’s own recorded parent_workflow_id — the child wears its
parent; histories recorded before the field decode to None.
failed_step and failure_reason are populated ONLY when the current
lease’s terminal event is Event::WorkflowFailed (see
failure_projection); a reopened, running, completed, or cancelled
workflow leaves both None.
display_name (#211) is NOT scoped that way. It is folded over the
whole history by crate::display_name, last write wins, and the
recorded attribute carries no run id — so it is a per-WORKFLOW label
even though the rest of this summary projects the current run. Hand this
a history that continued as new and the successor’s summary carries the
name its predecessor was wearing, until something renames it.
Trait Implementations§
Source§impl Clone for WorkflowSummary
impl Clone for WorkflowSummary
Source§fn clone(&self) -> WorkflowSummary
fn clone(&self) -> WorkflowSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WorkflowSummary
impl Debug for WorkflowSummary
Source§impl<'de> Deserialize<'de> for WorkflowSummary
impl<'de> Deserialize<'de> for WorkflowSummary
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<WorkflowSummary, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<WorkflowSummary, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for WorkflowSummary
Source§impl PartialEq for WorkflowSummary
impl PartialEq for WorkflowSummary
Source§impl Serialize for WorkflowSummary
impl Serialize for WorkflowSummary
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for WorkflowSummary
Source§impl TS for WorkflowSummary
impl TS for WorkflowSummary
Source§type WithoutGenerics = WorkflowSummary
type WithoutGenerics = WorkflowSummary
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = WorkflowSummary
type OptionInnerType = WorkflowSummary
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
WorkflowSummary: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
WorkflowSummary: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
WorkflowSummary: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
WorkflowSummary: 'static,
Source§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
Source§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export. Read more