Skip to content
SurfaceDocs
FRGet started
DocsBuild your apps

Lifecycles

Define object states and transitions.

A state has business meaning

A lifecycle defines object states and admitted transitions. Draft, For approval, Accepted and Rejected describe different quote situations. Labels or colors alone do not define permitted operations.

Element Expected values Description
States Stable keys and labels Recognized business situations
Initial state A declared state Situation at creation
Transition Source, destination and Action Explicit change
Conditions Rules and permissions Requirements before changing
Effects Declared operations Consequences of the transition

Example

A quote begins as Draft. Request approval moves it to For approval when client and content are valid. Accept requires an authorized role and records the decision. Editing a status Field in a view must not bypass that transition.

Design recovery

Open the archived source concerned, then choose Restore this merged source. This opens a review; nothing is restored before your confirmation and a fresh check of your access.

Technical restoration is separate from a business transition. Restoring a source archived by a confirmed Knowledge merge uses that exact merge’s archive receipt and a new explicit review; it does not undo the created Entry or its provenance Links. Current permissions and the declared restoration policy still apply, and a changed archived head or ownership scope must be resolved before confirmation. After an uncertain reply, retry the original reviewed request and key.

A descendant that was already archived before the merge stays archived. The merge does not reactivate it or change its content; restoring the merge only reactivates content actually archived by that operation. References remain intact.

Define correction and reopening transitions your activity needs. Distinguish business quote status from the technical state of its preparation Flow: an interrupted execution does not mean the client rejected a proposal.

The Foundation reference describes declarations; Flow results explains their user-facing presentation.

Applied examples : Move from prospect to active client

The Activate transition checks the information and asks for confirmation before changing status.

Configuration

Fragment placed in lifecycles[]. Properties and accepted values.

{
  "key": "client-status",
  "definitionPaths": [
    "workspace/clients/surface/client"
  ],
  "fieldKey": "status",
  "initialState": "prospect",
  "states": [
    "prospect",
    "active",
    "inactive"
  ],
  "transitions": [
    {
      "key": "activate",
      "label": "Activate client",
      "from": [
        "prospect"
      ],
      "to": "active",
      "ruleKeys": [
        "company-required"
      ],
      "confirmation": true
    }
  ]
}

Variation and connection

Fragment placed in rules[]. Properties and accepted values.

{
  "contract": "WorkspaceRule@1",
  "key": "company-required",
  "label": "Company provided",
  "expression": {
    "kind": "present",
    "field": {
      "definitionPath": "workspace/clients/surface/client",
      "fieldKey": "company"
    }
  }
}

UI layout example

The illustrative layout below places this configuration in the Clients/Quotes app. Insert each fragment at the stated location, with Field, Query and Action references matching the Model declarations.

  1. Target object
  2. Proposed change
  3. Checks
  4. Confirm
ILLUSTRATIVE LAYOUTClients / Quotes app
SurfaceClients / North StudioExample
LifecyclesMove from prospect to active client
Clients
NS
North StudioQuote S-1042
Needs review
Proposed change
The Activate transition checks the information and asks for confirmation before changing status.
Data and references
Client · Need · Pricing
BackReview then confirm
Search for a concept, field or action.Esc