---
title: "Lifecycles"
url: https://developers.dagio.ai/lifecycles/
---

# Lifecycles

   
                   
                                                    
                  
              
          
   

## 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](https://developers.dagio.ai/reference/workspace-model-foundation/) describes declarations; [Flow results](https://developers.dagio.ai/results/) explains their user-facing presentation.

<!-- surface-examples:start -->

## 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](https://developers.dagio.ai/reference/workspace-model-foundation/).

```json
{
  "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](https://developers.dagio.ai/reference/workspace-model-foundation/).

```json
{
  "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

<!-- surface-examples:end -->
