Two kinds answer two different questions#
The two attributes are defined on different classes and are independent. A filled-in submodel is an Instance even when it sits in the shell of a type asset. Conversely, in the Digital Nameplate template file published by IDTA, a shell with assetKind=Type references a kind=Template submodel. The two values combine freely.
Since v3.0 only Submodel has a kind. In v2, SubmodelElements had a kind too; v3.0 removed it.
| Attribute | Where | Values | Question it answers |
|---|---|---|---|
| assetKind | AssetInformation (mandatory) | Type, Instance, NotApplicable, Role, Batch | What kind of asset does this shell represent? |
| kind (ModellingKind) | Submodel (optional, default Instance) | Template, Instance | Is this submodel a template or real data? |
assetKind values and when they appeared#
The AssetKind enum in the JSON schema is Instance, NotApplicable, Type in v3.0; v3.1 adds Role and v3.2 adds Batch. Validating against the v3.0 schema therefore rejects Role and Batch.
The DPP mapping in the Part 1 v3.2 annex maps EN 18223 Model to Type, Item to Instance and Batch to Batch. Role has only a short definition in the specification, so check that the receiving system supports it before using it.
| Value | Meaning | Since |
|---|---|---|
| Type | Type asset: representation of a set of instance assets with common characteristics | already in v2.0.1 |
| Instance | Instance asset: a specific, uniquely identifiable asset | already in v2.0.1 |
| NotApplicable | The classification does not apply | v3.0 |
| Role | Role asset | v3.1 |
| Batch | Batch asset | v3.2 |
Linking type and instance shells: derivedFrom and assetType#
derivedFrom (0..1) is a ModelReference to the shell this shell was derived from. For an instance shell this is usually the shell of the type asset; types can also be derived from other types.
AssetInformation/assetType (0..1) holds the asset ID of the type asset, i.e. the type asset's globalAssetId, not the id of its shell. Not every instance asset needs a type asset; if there is none, leave both attributes out.
In the example below, the instance shell points to the type shell with derivedFrom, and assetType repeats the type asset's globalAssetId.
Copy the code, or select it to copy manually.
{
"assetAdministrationShells": [
{
"modelType": "AssetAdministrationShell",
"id": "https://example.com/ids/aas/TS100-type",
"idShort": "SensorTypeTS100",
"assetInformation": {
"assetKind": "Type",
"globalAssetId": "https://example.com/ids/asset/TS100"
}
},
{
"modelType": "AssetAdministrationShell",
"id": "https://example.com/ids/aas/TS100-0001",
"idShort": "SensorTS100SN0001",
"derivedFrom": { "type": "ModelReference",
"keys": [ { "type": "AssetAdministrationShell", "value": "https://example.com/ids/aas/TS100-type" } ] },
"assetInformation": {
"assetKind": "Instance",
"globalAssetId": "https://example.com/ids/asset/TS100-0001",
"assetType": "https://example.com/ids/asset/TS100"
}
}
]
}Submodel templates and instances#
A submodel with kind=Template holds SubmodelElement templates; one with kind=Instance holds actual values. Templates predefine the semanticIds, so an instance reuses them and fills in values. What a template cannot define is the id of the instance submodel (it must differ from the template id) and the values.
administration.templateId can record the id of the template that guided creation. For validation, the specification says to use the submodel's semanticId, not templateId.
Qualifiers with kind TemplateQualifier are allowed only inside template submodels (AASd-129; v3.2 exempts elements inside an OperationVariable). IDTA template files (for example Digital Nameplate 3.0.3) attach SMT/Cardinality qualifiers with this kind, so remove them when creating an instance. Since v3.2 a SubmodelElementList inside a template must have exactly one example element (AASd-138); copy it as often as needed in the instance.
{
"submodels": [
{
"modelType": "Submodel",
"id": "https://example.com/ids/smt/SensorData/1/0",
"idShort": "SensorData",
"kind": "Template",
"semanticId": { "type": "ExternalReference",
"keys": [ { "type": "GlobalReference", "value": "https://example.com/semantics/SensorData/1/0" } ] },
"submodelElements": [
{ "modelType": "Property", "idShort": "SerialNumber", "valueType": "xs:string",
"semanticId": { "type": "ExternalReference",
"keys": [ { "type": "GlobalReference", "value": "0112/2///61987#ABA951#009" } ] },
"qualifiers": [ { "kind": "TemplateQualifier", "type": "SMT/Cardinality",
"valueType": "xs:string", "value": "One" } ] }
]
},
{
"modelType": "Submodel",
"id": "https://example.com/ids/sm/TS100-0001/SensorData",
"idShort": "SensorData",
"kind": "Instance",
"administration": { "templateId": "https://example.com/ids/smt/SensorData/1/0" },
"semanticId": { "type": "ExternalReference",
"keys": [ { "type": "GlobalReference", "value": "https://example.com/semantics/SensorData/1/0" } ] },
"submodelElements": [
{ "modelType": "Property", "idShort": "SerialNumber", "valueType": "xs:string",
"semanticId": { "type": "ExternalReference",
"keys": [ { "type": "GlobalReference", "value": "0112/2///61987#ABA951#009" } ] },
"value": "TS100-0001" }
]
}
]
}Common mistakes#
- Treating assetKind=Type and Submodel kind=Template as the same thing. One describes the asset, the other the model.
- Copying a template submodel and keeping its id. An instance submodel needs a new id.
- Using the template id as semanticId. In Digital Nameplate 3.0.3 the id of the template Submodel is https://admin-shell.io/idta/SubmodelTemplate/DigitalNameplate/3/0 and the semanticId is https://admin-shell.io/idta/nameplate/3/0/Nameplate.
- Leaving kind=Template or TemplateQualifiers in an instance. AASd-129 is not checked by the JSON schema, so a file can pass schema validation and still violate the specification.
- Putting the type shell's id into assetType. assetType is the type asset's asset ID.
- Adding kind to SubmodelElements out of v2 habit. The v3 metamodel has no such attribute, and because the JSON schema does not block unknown properties, validation may not catch it.
Key points#
- assetKind is the kind of asset (mandatory); Submodel kind says template or data (default Instance).
- An instance shell links to its type through derivedFrom (reference to the type shell) and assetType (asset ID of the type asset).
- When instantiating a template: new id, kind=Instance, same semanticId, TemplateQualifiers removed.
Questions and answers#
Can I create instance shells without a type shell?
Yes. The specification does not require every instance asset to have a corresponding type asset. In that case omit derivedFrom and assetType.
What happens if a submodel has no kind?
It is read as Instance, the default of HasKind. Set kind=Template explicitly only when you publish a template.
May a template submodel be part of an AAS?
Yes, the metamodel allows it. IDTA's Digital Nameplate template file itself contains a shell that references a kind=Template submodel. Real asset values belong in kind=Instance submodels.
When should I use assetKind=Batch?
The Part 1 annex explains that in batch production the batches become the assets and get their own shells. Batch was added in v3.2 to support Digital Product Passports, so use it only if the receiving side supports v3.2.
