# Auto formatting of named Decision nodes makes model incorrect

**URL:** <https://forum.sensmetry.com/t/auto-formatting-of-named-decision-nodes-makes-model-incorrect/187>\
**Category:** Bug Reports\
**Tags:** resolved, modeler\
**Created:** [August 7, 2025, 8:48am UTC](https://forum.sensmetry.com/t/auto-formatting-of-named-decision-nodes-makes-model-incorrect/187 "2025-08-07T08:48:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alberto.Gonzalez](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@Alberto.Gonzalez](https://forum.sensmetry.com/u/Alberto.Gonzalez)\
**Post date:** [August 7, 2025, 8:48am UTC](https://forum.sensmetry.com/t/auto-formatting-of-named-decision-nodes-makes-model-incorrect/187/1 "2025-08-07T08:48:48Z")

</div>

Hi,

When using the auto formatting feature of Modeler with decision nodes inside actions, the formatting makes major changes in the model, and it becomes an incorrect model. Example below. From what I can see, it happens only when the decision node has a name, and only with Modeler v0.7.0 and not with Editor v0.9.0.

```auto
part Vehicle {
    attribute mass;
}

action DontDrive;
action Drive;

action MyAction {
    first start;
    then decide MyDecision;
        if Vehicle.mass > 1000 then DontDrive;
        if Vehicle.mass <= 1000 then Drive;
    then done;
}

```

becomes with auto formatting

```auto
part Vehicle {
    attribute mass;
}

action DontDrive;
action Drive;

action MyAction {
    first start;
    then decide MyDecision;
    first MyDecision if Vehicle.mass > 1000 then DontDrive;
    first MyDecision if Vehicle.mass <= 1000 then Drive;
    then done;
}

```

which is incorrect, as identified by Modeler

---

<div class="post-metadata">

**Author:** ![Daumantas](https://yyz2.discourse-cdn.com/flex008/user_avatar/forum.sensmetry.com/daumantas/32/19_2.png) [@Daumantas](https://forum.sensmetry.com/u/Daumantas)\
**Post date:** [August 7, 2025, 9:04am UTC](https://forum.sensmetry.com/t/auto-formatting-of-named-decision-nodes-makes-model-incorrect/187/2 "2025-08-07T09:04:47Z")

</div>

Thanks for the report. Formatter inserting `first …` is fixed for next release, will have a look at indentation.

---

<div class="post-metadata">

**Author:** ![Daumantas](https://yyz2.discourse-cdn.com/flex008/user_avatar/forum.sensmetry.com/daumantas/32/19_2.png) [@Daumantas](https://forum.sensmetry.com/u/Daumantas)\
**Post date:** [August 7, 2025, 11:24am UTC](https://forum.sensmetry.com/t/auto-formatting-of-named-decision-nodes-makes-model-incorrect/187/3 "2025-08-07T11:24:44Z")

</div>

Indentation is also fixed for next release.
