Layer 7 · collaboration
derivation
What a draft, a run or a deliverable was derived from: a decision (an answered question), or another derivation. A derivation is Current until its source changes; then it is marked for revision, and what followed from it is redone under a new derivation. Marking goes one step at a time: a revised decision marks the derivations made from it (MarkDecisionChanged), and each marked derivation marks the derivations made from it (MarkDerivedFrom), so a mark reaches every artifact that followed from the decision, directly or through other derivations. Nothing new is derived from a derivation marked for revision.
Depends on
- channel · layer 7 · 4 references
- question · layer 7 · 9 references
- work · layer 5 · 6 references
- store · layer 3 · 5 references
Used by
No block depends on this one.
Entities
Derivation
One artifact and the one source it was derived from.
Identified by derivation_id (DerivationId).
| field | type | meaning |
|---|---|---|
artifact_kind | ArtifactKind | |
record_id | optional RecordId | The record derived, present exactly when the kind is Record. |
deliverable_id | optional DeliverableId | The deliverable derived, present exactly when the kind is Deliverable. |
run_id | optional RunId | The run derived, present exactly when the kind is Run. |
question_id | optional QuestionId | The decision it was derived from, an answered question; absent when the source is a derivation. |
decided_option | optional OptionLetter | The option the decision held when the artifact was derived from it. |
derived_from | optional DerivationId | The derivation it was derived from; absent when the source is a decision. |
recorded_by | PartyId | |
recorded_at | timestamp | |
cause | optional RevisionCause | Why it was marked for revision, once it is. |
marked_at | optional timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
recordreferences Record of store (one, byrecord_id)deliverablereferences Deliverable of work (one, bydeliverable_id)runreferences Run of work (one, byrun_id)decisionreferences Question of question (one, byquestion_id)sourcereferences Derivation (one, byderived_from)
Lifecycle of Derivation
MarkedForRevision.Commands
MarkDecisionChanged
Mark what was derived from a changed decision. Every Current derivation made from the decision is marked for revision.
Called by: Reviser.
| field | type |
|---|---|
question_id | QuestionId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-question refused | no Question for question_ | Unknown: No question has this identity; nothing was recorded. |
decision-not-taken refused | the Question of question_ has state != Answered and state != Default | Decision: The question has no chosen option (it is not Answered and took no default). |
marked | otherwise | emits Decision |
More columns: swipe horizontally, or focus the table and use the arrow keys.
MarkDerivedFrom
Mark what was derived from a marked derivation. Every Current derivation made from a derivation marked for revision is marked too.
Called by: Reviser.
| field | type |
|---|---|
derivation_id | DerivationId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-derivation refused | no Derivation for derivation_ | Unknown: No derivation has this identity; nothing was recorded. |
source-not-marked refused | the Derivation of derivation_ has state != Marked | Source: The derivation is not marked for revision, so what was derived from it is not marked either. |
marked | otherwise | emits Derived |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RecordDerivation
Record a derivation. The caller records that an artifact (a record, a deliverable or a run) was derived from a decision that was taken, or from a derivation that is Current.
Called by: Author.
| field | type |
|---|---|
artifact_kind | ArtifactKind |
record_id | optional RecordId |
deliverable_id | optional DeliverableId |
run_id | optional RunId |
question_id | optional QuestionId |
derived_from | optional DerivationId |
at | timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-source refused | not (defined(question_ | No: The derivation names neither a decision nor a derivation it was derived from. |
two-sources refused | defined(question_ | Two: The derivation names both a decision and a derivation; it has one source. |
artifact-not-named refused | (artifact_ | Artifact: The derivation does not name exactly the artifact its kind says: a record for Record, a deliverable for Deliverable, a run for Run, and no other. |
unknown-record refused | no Record for record_ | Unknown: No record, deliverable or run has the identity named; nothing was recorded. |
unknown-deliverable refused | no Deliverable for deliverable_ | Unknown: No record, deliverable or run has the identity named; nothing was recorded. |
unknown-run refused | no Run for run_ | Unknown: No record, deliverable or run has the identity named; nothing was recorded. |
unknown-question refused | no Question for question_ | Unknown: No question has this identity; nothing was recorded. |
unknown-source refused | no Derivation for derived_ | Unknown: No derivation has this identity; nothing was recorded. |
decision-not-taken refused | the Question of question_ has state != Answered and state != Default | Decision: The question has no chosen option (it is not Answered and took no default). |
source-marked refused | the Derivation of derived_ has state == Marked | Source: The derivation it would be derived from is marked for revision; derive from its revision. |
recorded | otherwise | creates a Derivation in Current; emits Derivation |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Events
| event | fields | emitted by |
|---|---|---|
DecisionDerivationsMarked | question_ QuestionId, marked integer, at timestamp | Mark |
DerivationRecorded | derivation_ DerivationId, artifact_ ArtifactKind, record_ optional RecordId, deliverable_ optional DeliverableId, run_ optional RunId, question_ optional QuestionId, derived_ optional DerivationId, recorded_ PartyId, at timestamp | Record |
DerivedMarked | derivation_ DerivationId, marked integer, at timestamp | Mark |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Views
| view | rows | fields |
|---|---|---|
DerivationsDerivations | each Derivation | derivation_ DerivationId, artifact_ ArtifactKind, record_ optional RecordId, deliverable_ optional DeliverableId, run_ optional RunId, question_ optional QuestionId, decided_ optional OptionLetter, derived_ optional DerivationId, recorded_ PartyId, recorded_ timestamp, cause optional RevisionCause, marked_ optional timestamp, state State |
DerivedFromDerived from a derivation | each Derivation with defined(derived_asked with derived_ DerivationId | derivation_ DerivationId, artifact_ ArtifactKind, state State |
DerivedFromDecisionDerived from a decision | each Derivation with defined(question_asked with question_ QuestionId | derivation_ DerivationId, artifact_ ArtifactKind, decided_ optional OptionLetter, state State |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Types
| type | is | values or fields |
|---|---|---|
ArtifactKindWhat was derived: a record of a store (a draft, a note, an artifact), a deliverable a run handed back, or a run. | one of | Record, Deliverable, Run |
RevisionCauseWhy a derivation was marked for revision: its decision was changed, or the derivation it was derived from was marked. | one of | Decision, Source |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KPIs
2 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.
Correctness
| KPI | unit | better | gate | status |
|---|---|---|---|---|
derived_left_unmarkedDerivations still current although the derivation or decision they were derived from was marked or changed. How: DerivationRecorded events whose source derivation was marked (DecisionDerivationsMarked or DerivedMarked) or whose decision was revised (AnswerRevised) with no later mark of their own, at the end of the window. Must be 0. | count | lower | gate | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Quality
| KPI | unit | better | gate | status |
|---|---|---|---|---|
derivations_marked_for_revisionDrafts, runs and deliverables marked for revision because a decision they followed from changed. How: The marked counts of DecisionDerivationsMarked and DerivedMarked events in the window, summed. | count | lower | – | planned source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.