# About Document Lifecycles

Document lifecycles are the sequences of states (_Draft_, _In Review_, etc.) a document goes through during its life. A lifecycle can be simple (two states requiring users to manually move between states) or very complex (multiple states with different security and workflows that automatically move the document to another state). In Vault, lifecycles simplify the implementation of business logic that traditionally required custom coding or time-consuming manual setup.

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Audit logs support a precision to one second. Events occurring within a single second may appear in an unexpected order.</p>
    </div>
  </div>
</div>



## Lifecycles {#documents}

Every document has a lifecycle. Since lifecycles control a document's behavior, it is important to associate the right lifecycle to a document. In Vault, lifecycles are linked to one or more document types. When users create a new document, Vault can automatically assign the lifecycle or, if multiple lifecycles are valid for the document type, users can choose. Documents inherit all business rules associated with the lifecycle, ensuring a repeatable process that requires minimal effort.

### Document Lifecycle & Workflow Interaction {#lifecycle-workflow-interaction}

Document workflows have two options for interacting with document lifecycles:

  * A document workflow can apply to **Any document lifecycle**. This means that the workflow envelope can include documents from a single lifecycle, two different lifecycles, or from every lifecycle in your Vault. However, the options available for this type of workflow are constrained. For the workflow to be valid across lifecycles, it can only access configuration elements (document fields, etc.) that apply to all documents. If the workflow applies to _Any document lifecycle_, you cannot configure the _Workflow_ user action on any document lifecycle state. The _Workflow_ user action automatically appears in the _Actions_ menu if you select multiple documents to include in the workflow.
  * A document workflow can apply to a **specific document lifecycle**. This means that it's only available to documents in that lifecycle. Because the workflow only works on documents in a single lifecycle, you can access any fields defined for document types associated with that lifecycle. The workflow can also use specific lifecycle states, rather than state types.

This table compares the document workflow options:

||Any Lifecycle|Specific Lifecycle|
|--- |--- |--- |
|_Use workflow for single document_|No equivalent option|Restricts the workflow to apply to a single document only and allows users to select document notification templates in step configuration|
|_Prompt for Fields_ in Start step|Can only access document fields defined at _Base Document_|Can access document fields available to any document types that use the selected lifecycle|
|_Prompt for Fields_ in Task step|Can only access document fields defined at _Base Document_|Can access document fields available to any document types that use the selected lifecycle|
|_Automatically remove matching documents_ in Action step|Allows conditions based on lifecycle state type|Lifecycle state type is not allowed as a condition|
|Update document field in Action step|Can only access document fields defined at _Base Document_|Can access document fields available to any document types that use the selected lifecycle|
|_Roles allowed to participate_ setting in Participants Control|Uses application roles to map to document lifecycle roles|Uses document lifecycle roles|
|_Enable allowed group in this Dynamic Access Control Role_ in Participants Control|No equivalent option|Allows workflow owner to select users or groups from <a href="/en/gr/31824/">allowed group DAC roles</a>
 in addition to other eligible users|
|_Update Sharing Settings_ step|Uses application roles to map to document lifecycle roles|Uses document lifecycle roles|
|_Do not prompt for verdict on documents in state type_ setting for verdict prompt in Task step|Allows workflow skip verdict prompt based on State Type|No equivalent option|
|_Lifecycle_ condition type on Action step|Allows Action to be conditional based on state type|No equivalent option|
|_Change state of documents_ action in Action step|Uses state type to map to document lifecycle state|Uses document lifecycle state|
|_Lifecycle_ rule type in Decision step|Includes _Lifecycle > State Type_ condition|No equivalent option|
|_Read & Understood_ workflow class|No equivalent option|Allows the R&U Workflow Task step type and disallows some other step types|
|_Start States_ display in workflow details page|_Start States_ are not displayed|In the _Start States_ field, Vault displays all lifecycle states in which the current workflow can start|
|_Role not allowed to complete tasks_ |Can select only application roles|Can select roles configured on the document's lifecycle| 

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Previous releases included <em>Roles not allowed to participate</em>.</p>
    </div>
  </div>
</div>



## Lifecycle States {#states}

The ordered states within a lifecycle represent the stages a document transitions through as users create, review, approve and eventually archive or replace it.  A set of business rules applies to each state and defines what happens to the document in that state. Admins define these rules for each lifecycle state and Vault automatically applies them to every document that enters the state.

### Business Rules

Each state has the following configuration options:

  * **User Actions**: Actions that end users can perform on a document; <a href="/en/gr/12339/">Configure your workflow user actions</a>
.
  * **Security Settings**: Permissions that users in each role have for a document; <a href="/en/gr/2572/">Set permissions for different roles in a document</a>
.
  * **Atomic Security**: Permissions for active workflow actions and document lifecycle actions. See <a href="/en/gr/62043/">Configuring Atomic Security</a>
.
  * **Entry Criteria**: Conditions that a document must meet before transitioning into this state; <a href="/en/gr/12617/">Create new entry criteria for a lifecycle state</a>
.
  * **Entry Actions**: Actions that Vault performs automatically when a document enters this state; <a href="/en/gr/12399/">Add a new entry action rule for a lifecycle state</a>
.

### Moving Between States

Documents move between states in various ways:

  * A user explicitly changes the document's state using a configured user action. This can occur on an individual document or as part of a bulk action.
  * A document enters a workflow where the workflow configuration includes one or more state changes.
  * A document moves automatically as the result of a state change or other event on a related object record or document. These related document actions are configured by Admins.

In all cases, Vault automatically executes the business logic associated with the new state. Note that the names of state change and start workflow options in the **Actions** menu vary by Vault and are set up by your organization's Admins. After changing a document's state, you may need to refresh the page to view the new status.

### State Type/Special State Definitions {#specialStates}

For each lifecycle, there are state type definitions which an Admin must link to a configured lifecycle state. Learn more <a href="/en/gr/14560/">about state types</a>
.

### Lifecycle Stages & Stage Groups

Lifecycle Stages allow organizations to group document and object lifecycle states into ordered collections of stages. Vault then visually represents a document or object record's current stage in the Doc Info page and object record detail page through the Lifecycle Stages Chevron panel. Clicking on the active stage displays workflow information for the current document, including any open tasks. Learn more about <a href="/en/gr/52053/">lifecycle stage administration</a>
.

## Lifecycles & Documents {#documents}

Every document has a lifecycle. Since lifecycles control a document's behavior, it is important to associate the right lifecycle to a document. In Vault, lifecycles are linked to one or more document types. When users create a new document, Vault can automatically assign the lifecycle or users can choose if multiple lifecycles are valid for the document type. Documents automatically inherit all business rules associated with the lifecycle, ensuring a repeatable process that requires minimal effort.

## Workflows {#workflows}

Organizations often use <a href="/en/gr/50493/">workflows</a>
 to automate various business processes, including moving documents from one state to another. All workflows exist within the context of a lifecycle.

[1]: #lifecycle-workflow-interaction