Closed pneuschwander closed 2 years ago
Many thanks for pointing this out. We will take a look at it and come back with further details.
This issue is fixed with the latest commit in Bugfix branch. The fix will be included in the next release of BaSyx (1.0.2).
Hi team, I think I discovered a bug.
MongoDBAASAggregator
Ctor invokes the init-Method. The init-Method loads all existingAssetAdministrationShell
s from the database and creates theMultiSubmodelProvider
for them. In this step, the value of theregistry
attribute of theMongoDBAASAggregator
instance is used to construct theMultiSubmodelProvider
instances. But theregistry
attribute is not yet configured (and therefore equals tonull
).setRegistry
is called inAASServerComponent
after theMongoDBAASAggregator
has been constructed. This is too late for being considered by the init logic that is triggered in the constructor of theMongoDBAASAggregator
.Therefore, at runtime, the registry is only known to newly added AAS. But AAS loaded from database (e.g. after a restart of the AAS-Server component) will not have the registry reference.
I noticed this when I tried to access a Edge-located Submodel by sending HTTP request to the AAS-Server. With newly added AAS, this works fine and the AAS-Server takes care of talking with the Edge-located Submodel for me. But after restarting the AAS-Server, it stopped working ("Submodel ... cannot be resolved locally, but no registry is passed").