> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aseeflow.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto Complete

**Can be used with**: [Stage](/reference/cmmn11/grouping-tasks/stage), CasePlanModel

<img src="https://mintcdn.com/aseeflow/OpLRJy6TPnBLn55c/img/short-codes/cmmn-marker-auto-complete.png?fit=max&auto=format&n=OpLRJy6TPnBLn55c&q=85&s=af9c360b7ba40353e4cfc099800c4c11" alt="" width="30" height="36" data-path="img/short-codes/cmmn-marker-auto-complete.png" />

The attribute `autoComplete` controls the completion of a stage instance. The following table describes the completion criteria of a stage instance based on the `autoComplete` property.

* `autoComplete = true`: There are no children in the `ACTIVE` state, and all required ([see Required Rule](/reference/cmmn11/markers/required-rule)) children are `COMPLETED`, `DISABLED` or `TERMINATED`.
* `autoComplete = false`: There are no children in the `ACTIVE` state, and
  * all children are `COMPLETED`, `DISABLED` or `TERMINATED`, or
  * on manual completion using `CaseService#completeCaseExecution`, all required ([see Required Rule](/reference/cmmn11/markers/required-rule)) children are `COMPLETED`, `DISABLED` or `TERMINATED`.

For a CasePlanModel the property `autoComplete` can be set as follows:

```xml theme={null}
<case id="case">
  <casePlanModel id="CasePlanModel_1" autoComplete="true">

    ...

  </casePlanModel>
</case>
```

For a Stage, the following XML can be used:

```xml theme={null}
<case id="case">
  <casePlanModel id="CasePlanModel_1" autoComplete="true">

    <planItem id="PI_Stage_1" definitionRef="Stage_1" />

    <stage id="Stage_1" autoComplete="true"/>

  </casePlanModel>
</case>
```
