# Wrong metadata-feature-body error?

**URL:** <https://forum.sensmetry.com/t/wrong-metadata-feature-body-error/599>\
**Category:** Bug Reports\
**Created:** [October 28, 2026, 10:58am UTC](https://forum.sensmetry.com/t/wrong-metadata-feature-body-error/599 "2026-10-28T10:58:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbussemaker](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jbussemaker](https://forum.sensmetry.com/u/jbussemaker)\
**Post date:** [October 28, 2026, 10:58am UTC](https://forum.sensmetry.com/t/wrong-metadata-feature-body-error/599/1 "2026-10-28T10:58:25Z")

</div>

Hi guys,

I’m getting a `metadata-feature-body` validation error when defining a metadata field that concatenates strings.

Example model:

```sysml
package Package {

    metadata def MyMetadata {
        attribute strParam1 : ScalarValues::String;
        attribute strParam2 : ScalarValues::String;
        attribute strParam3 : ScalarValues::String;
    }

    attribute packageLevelReusableString = "string1";

    part def MyPart2 {

        attribute reusableString = "string2";

        enum def EnumDef {
            EnumValue = "string3";
        }

        @MyMetadata {
            strParam1 = "static_" + packageLevelReusableString;
            strParam2 = "static_" + reusableString;
            strParam3 = "static_" + EnumDef::EnumValue;
        }
    }
}

```

Script:

```python
import syside

# model, diag = syside.try_load_model(['model.sysml']) # v0.11.0
model, diag = syside.try_load_model_unlocked(['model.sysml']) # v1.0.1
print(diag)

with model.documents[-1].lock() as doc:
    root_node = doc.root_node
    package: syside.Package = root_node.children.elements[0]

    metadata_el = package.children.elements[2].children.elements[2]
    assert isinstance(metadata_el, syside.MetadataUsage)

    for usage in metadata_el.children.elements:
        # value, report = syside.Compiler().evaluate_feature(usage, usage, model.lib) # v0.11.0
        value, report = syside.Compiler().evaluate_feature(
            syside.vm.Context(model.lib), usage, usage) # v1.0.1
        assert not report.fatal
        print(f'{usage.name} = {value}')

```

Output:

```auto
model.sysml:21:25: error (metadata-feature-body): Metadata body feature value must be model-level evaluable
strParam1 = static_string1
strParam2 = static_string2
strParam3 = static_string3

```

I’m getting the error only for `strParam2` (highlighting `"static_" + reusableString`), however attribute value evaluation is correct!

The only difference is that `reusableString` is inside a part def, whereas the other is not (`strParam1`). However, an enum def inside a part def is fine (`strParam3`)…

Is this an error on my part or an oversight in Syside?

Greetings,  
Jasper

---

<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:** [October 28, 2026, 11:25am UTC](https://forum.sensmetry.com/t/wrong-metadata-feature-body-error/599/2 "2026-10-28T11:25:59Z")

</div>

Hi Jasper,

This is consistent with the specification where for `FeatureReferenceExpression` to be model-level evaluable:

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/syside/original/1X/8d2a289944464cbd78cc141fb6b894f7d717e680.jpeg)

What this means is that the referenced feature may have a different value depending on the context, though I think that the specification is inconsistent here because a bound feature value cannot be redefined anyway. In this case, model-level evaluable should be propagated from the feature value alone.

Evaluation has nothing to do with the diagnostic as the current evaluation sits somewhere in between model-level and full runtime.

---

<div class="post-metadata">

**Author:** ![jbussemaker](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jbussemaker](https://forum.sensmetry.com/u/jbussemaker)\
**Post date:** [October 29, 2026, 11:27am UTC](https://forum.sensmetry.com/t/wrong-metadata-feature-body-error/599/3 "2026-10-29T11:27:15Z")

</div>

Thank you for the clarification.  
Indeed in this case the value is bound, so it can’t change in different contexts…
