aas-core-works / aas-core-meta

Provide formalized meta-models for Asset Administration Shell (AAS).
Other
9 stars 3 forks source link

Implementation of the constraint AASc-3a-010 #279

Closed chborntraeger closed 1 year ago

chborntraeger commented 1 year ago

An verification error (AASc-3a-010) is raised when value and value list are empty in data specifications. In my understandig its not requeired to set one of them. The constraint only prohibits to set both of them, or am i wrong?

"If DataSpecificationIec61360/value is not empty, DataSpecificationIec61360/valueList shall be empty, and vice versa" (source: Asset Administration Shell Specification - Part 3a: Data Specification - IEC 61360)

see also https://github.com/aas-core-works/aas-core3.0-typescript/issues/12

mristin commented 1 year ago

@chborntraeger thanks again for spotting and reporting the issue!

@sebbader-sap @s-heppner what do you say? Again inclusive or as in #278?

sebbader-sap commented 1 year ago
  1. DataSpecificationIec61360/value = empty & DataSpecificationIec61360/valueList = empty --> ok
  2. DataSpecificationIec61360/value = some-value & DataSpecificationIec61360/valueList = empty --> ok
  3. DataSpecificationIec61360/value = empty & DataSpecificationIec61360/valueList = some-value --> ok
  4. DataSpecificationIec61360/value = some-value & DataSpecificationIec61360/valueList = some-other-value --> not ok

That's at least how I read the constraint and the notes below it.

s-heppner commented 1 year ago

The spec here says:

If DataSpecificationIec61360/value is not empty, DataSpecificationIec61360/valueList shall be empty, and vice versa.

But adds two notes:

Note 1: it is also possible that both DataSpecificationIec61360/value and SpecificationIec61360/valueList are empty. This is the case for concept descriptions that define the semantics of a property but do not have an enumeration (valueList) as data type. Note 2: although it is possible to define a concept description for a value list, it is not possible to reuse this value list. It is only possible to directly add a value list as data type to a specific semantic definition of a property

Based on this, I agree with @sebbader-sap's interpretation.