admin-shell-io / submodel-templates

Submodel Templates for AAS
Creative Commons Attribution 4.0 International
45 stars 16 forks source link

Time Series Data (Version 1.1) incompability with AASX Package Explorer V3 #45

Closed STUBA-rupr closed 7 months ago

STUBA-rupr commented 1 year ago

Hello I have difficulties to work with Time Series Data SM template.

It is not possible to export the SM to JSON because of an error:

Error: Submodel Write: Object reference not set to an instance of an object. Object reference not set to an instance of an object. at    at AasCore.Aas3_0.Visitation.AbstractTransformer`1.Transform(IClass that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\visitation.cs:line 1166
   at AasCore.Aas3_0.Jsonization.Transformer.TransformEmbeddedDataSpecification(IEmbeddedDataSpecification that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\jsonization.cs:line 18468
   at AasCore.Aas3_0.EmbeddedDataSpecification.Transform[T](ITransformer`1 transformer) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\types.cs:line 12247
   at AasCore.Aas3_0.Visitation.AbstractTransformer`1.Transform(IClass that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\visitation.cs:line 1166
   at AasCore.Aas3_0.Jsonization.Transformer.TransformProperty(IProperty that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\jsonization.cs:line 16968
   at AasCore.Aas3_0.Property.Transform[T](ITransformer`1 transformer) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\types.cs:line 4932
   at AasCore.Aas3_0.Visitation.AbstractTransformer`1.Transform(IClass that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\visitation.cs:line 1166
   at AasCore.Aas3_0.Jsonization.Transformer.TransformSubmodelElementCollection(ISubmodelElementCollection that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\jsonization.cs:line 16867
   at AasCore.Aas3_0.SubmodelElementCollection.Transform[T](ITransformer`1 transformer) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\types.cs:line 4395
   at AasCore.Aas3_0.Visitation.AbstractTransformer`1.Transform(IClass that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\visitation.cs:line 1166
   at AasCore.Aas3_0.Jsonization.Transformer.TransformSubmodelElementCollection(ISubmodelElementCollection that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\jsonization.cs:line 16867
   at AasCore.Aas3_0.SubmodelElementCollection.Transform[T](ITransformer`1 transformer) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\types.cs:line 4395
   at AasCore.Aas3_0.Visitation.AbstractTransformer`1.Transform(IClass that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\visitation.cs:line 1166
   at AasCore.Aas3_0.Jsonization.Transformer.TransformSubmodel(ISubmodel that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\jsonization.cs:line 16510
   at AasCore.Aas3_0.Submodel.Transform[T](ITransformer`1 transformer) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\types.cs:line 2762
   at AasCore.Aas3_0.Visitation.AbstractTransformer`1.Transform(IClass that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\visitation.cs:line 1166
   at AasCore.Aas3_0.Jsonization.Serialize.ToJsonObject(IClass that) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasCore.Aas3_0\jsonization.cs:line 18698
   at AasxPackageLogic.MainWindowHeadless.CommandBinding_GeneralDispatchHeadless(String cmd, AasxMenuItemBase menuItem, AasxMenuActionTicket ticket) in C:\Users\adm2pribis\source\repos\aasx-package-explorer\src\AasxPackageLogic\MainWindowHeadless.cs:line 346.

When I try to change the SM to instance and save it and reopen the saved file I got following result: image

I am not sure if it is an issue of AASX Package Explorer or yours, but I like to make you aware about this fact.

STUBA-rupr commented 7 months ago

Hello, are there any news? The time-series data are crucial for I40. Also Basyx V2 has plugin for it. So it does not make sense that the standardized SM template cannot be used.

juileetikekar commented 7 months ago

Hi @STUBA-rupr,

Please use the latest version of the AASX Package Explorer, where the issue has been fixed. Please find the executable at below location:

https://github.com/eclipse-aaspe/aaspe/actions/runs/8436707794

Screenshot of Timeseries SM after converting it to instance, saving it and reopening it, as mentioned in the issue description:

image

STUBA-rupr commented 7 months ago

@juileetikekar, beg my pardon, I rebased the main into my local repository and now it works!