# Configuring Auto-Start Object Workflows

With auto-start workflows, you can configure Vault to initiate a workflow within an [entry action](/en/lr/30683/#define-actions) or [event action](/en/lr/51700/). This configuration supports process automation in a variety of different use cases.

<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>: Auto-start object workflows will show <em>System</em> as the Workflow Owner.</p>
    </div>
  </div>
</div>



## Example Usage

When a _Product_ record enters the _In Approval_ state, a configured workflow could notify a set of users, update _Approval Start Date_ on the record, and open a task for the record owner to acknowledge the change.

## Eligible Workflows {#eligible}

You can find general instructions for workflow setup in [Configuring Object Workflows](/en/lr/33550/). An object workflow must meet these criteria to be eligible for auto-start:

  * **Allow auto-start from entry action and event action** setting (within _Workflow Details_) must be selected.
  * **Use workflow for single object record setting** (within _Workflow Details_) must be selected.
  * Participant control must use the **Use roles as participants**, **Use custom action to define participants**, **Allow workflow task owners to select participants**, **Use user reference field as participant**, or **Use Vault user group as participants setting**.
  * Start step cannot include controls for **Instructions**, **Date**, **Prompt for Fields**, or **Variable**.
  * Workflow cannot include notifications assigned to _Workflow Owner_.
  * Workflow cannot include tasks assigned to _Workflow Owner_.

<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>: If you enable the <strong>Allow auto-start from entry action and event action</strong> setting before configuring any steps, Vault will filter the steps and settings to only show valid options. If the workflow includes steps or settings that make it ineligible for auto-start, Vault will not allow you to save the workflow with the auto-start option selected.</p>
    </div>
  </div>
</div>



## Defining the Entry Action or Event Action

You can find general instructions for creating entry actions in [Configuring Object Lifecycles](/en/lr/30683/), and details on event actions in [Defining Event Actions](/en/lr/51700/).

The **Start Workflow** entry and event action requires that you select a workflow. Only workflows that are [eligible][6] appear in the list.

## Workflow Errors

If an error prevents Vault from starting the configured workflow when the object record changes lifecycle states, Vault will roll back the record state change.

For example, when a _Product_ record moves into _In Approval_ state, an entry action begins the _Approval_ workflow. That workflow configuration would assign the first task to the user in the object record's _Approver_ role. When a user initiates the state change to _In Approval_ on the product _WonderWidget_, Vault fails to start the workflow because there is no user in the _Approver_ role and the first task cannot be assigned. Because the workflow failed to start, the _WonderWidget_ product would not move into _In Approval_ state but would stay in its current state.

In addition, if a canceled workflow moves a record to a state with a **Start Workflow** entry action, Vaul does not start the workflow. **Start Workflow** entry actions will not execute if the previous workflow was canceled.

Additional errors include:

- If _Allow auto-start from entry action and event action_ is disabled, and the workflow is selected from the _Start Workflow_ entry action, then the workflow cannot activate.
- If _Allow auto-start from entry action and event action_ is enabled, and the Workflow Owner is referenced on a Task, Notification, or an Update Sharing Settings step, then you cannot save the workflow.
- If _Allow auto-start from entry action and event action_ is enabled, and _Allow workflow initiator to select participants_ is enabled in the Participant Controls, the workflow cannot activate.

<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>: If <em>Allow auto-start from entry action and event action</em> is enabled, you cannot select the Workflow Owner in the Task Step, Notification Step, and Update Sharing Setting Step.</p>
    </div>
  </div>
</div>



## Auto-Start and Start Next Workflow Enabled

If an object workflow is auto-started due to a state change on the record prior to the workflow ending and _Display start next workflow dialog when workflow ends_ is enabled on the _End_ step, the _Start Next Workflow_ dialog will not display if the workflow contains an active Task step. It will also not display if there's an active task on the record. If the auto-started workflow contains no tasks, but does contain a state change action, the _Start Next Workflow_ dialog will display and include workflow options based on the new record state.

This type of scenario is possible in the following configuration: 

- The **Start Workflow** entry action is configured on the Approved state for an object lifecycle
- A workflow for an object record in the _Draft_ state is configured with _Display start next workflow dialog when workflow ends_ is configured on the _End_ step
- When the _Draft_ state workflow ends, the user can move the record to the _Approved_ state with the **Start Workflow** entry action configured. If the workflow the entry action will auto-start contains a task, the _Start Next Workflow_ dialog will not display. 

 [6]: #eligible
