> ## 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](https://docs.aseeflow.org/1.x/reference/cmmn11/grouping-tasks/stage.md), CasePlanModel

![](https://mintcdn.com/aseeflow/OpLRJy6TPnBLn55c/img/short-codes/cmmn-marker-auto-complete.png?fit=max\&auto=format\&n=OpLRJy6TPnBLn55c\&q=85\&s=af9c360b7ba40353e4cfc099800c4c11)

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](https://docs.aseeflow.org/1.x/reference/cmmn11/markers/required-rule.md)) 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](https://docs.aseeflow.org/1.x/reference/cmmn11/markers/required-rule.md)) 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>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.