Skip to main content
A lifecycle is a list of steps, each with rules, that tells how far an entry of a card has come: which step it is stuck at and which rules it fails. A lifecycle definition is one JSON document, too large for prompts. create, edit and preview read it from --file or stdin.

List and show

list takes the card definition id, because the API has no call that lists every card. show prints the state of the lifecycle and the steps of its pending definition.

The definition

briefing, applicability and precondition are optional. assertion, precondition and applicability are search predicates.
Severities are Error, Warning and Advisory. The API checks the definition and names the field that is wrong.

Try, create and activate

  • preview tries a definition on a sample of entries and saves nothing. --sample-size defaults to 25.
  • create saves the definition as a new lifecycle draft.
  • activate activates the pending definition and waits until the existing entries are assessed. Progress goes to stderr. Ctrl-C stops the waiting, not the assessment. show tells you whether the lifecycle is still Initializing or Ready.

Change an active lifecycle

Changes go through a pending definition, which does nothing until you activate it:
edit replaces the whole pending definition, including anything someone else saved after you ran show. To throw the pending definition away and keep the active revision, run discard:
edit, activate, discard and delete read the lifecycle right before they act and send its version along, so they fail instead of overwriting a lifecycle that changed in between.

Assessments and revisions

  • assessment shows what a lifecycle says about one entry, rule by rule. It reads the saved result and assesses nothing. To find entries by how far they have come, use occtoo cards entries search --lifecycle <ID> --state incomplete.
  • revision shows a definition that was activated. The number is the Active revision that show prints.

Delete a lifecycle

Deletes a lifecycle and what it assessed.