Skip to content

Conversation

FaheemBhatti
Copy link

@FaheemBhatti FaheemBhatti commented Sep 17, 2025

Description of Changes

This PR adds integration between AASRegistry and AASDIscovery:

  • The /shell-description endpoint behavior --> calling this endpoint internally calls the discover /lookup endpoint for POST call
  • The combined AASRegistry and AASDiscovery functionality
  • The ShellDescriptorsApiDelegate implementation (decorator pattern logic)
  • Module structure or delegate-based design aspects

Related Issue


BaSyx Configuration for Testing

The Digital Twin Registry supports multiple storage profiles.

Base Configuration (application.yml)

SPRING_PROFILE: InMemory or MongoDB (default: MongoDB)
LOGGING_LEVEL: INFO (default)
server.port: 8081
basyx.cors.allowed-methods: GET,POST,PATCH,DELETE,PUT,OPTIONS,HEAD
basyx.cors.allowed-origins: *
management.endpoints.web.exposure.include: health,metrics,mappings
springdoc.api-docs.enabled: true
springdoc.swagger-ui.enabled: true
springdoc.swagger-ui.path: /swagger-ui.html

application-MongoDB.yml

basyx.backend: MongoDB
registry.type: MongoDB
registry.discovery.enabled: true
basyx.aasdiscoveryservice.mongodb.collectionName: aasregistry

application-InMemory.yml

basyx.backend: InMemory
registry.type: InMemory
registry.discovery.enabled: true

MongoDB-specific environment variables:

AUTHENTICATION_DATABASE: <db_name>
DATABASE_HOST: localhost
DATABASE_PORT: <numeric_port>
DATABASE_USERNAME: <db_username>
DATABASE_PASSWORD: <db_password>

Copy link
Member

@aaronzi aaronzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I added some review remarks. Please have a look

* SPDX-License-Identifier: MIT
******************************************************************************/

package org.eclipse.digitaltwin.basyx.aasdigitaltwinregistry.component.controllerAdvice;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please name the package digitaltwinregistry in a consistent way

Suggested change
package org.eclipse.digitaltwin.basyx.aasdigitaltwinregistry.component.controllerAdvice;
package org.eclipse.digitaltwin.basyx.digitaltwinregistry.component.controllerAdvice;

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored the package

path: basyx.submodelregistry/basyx.submodelregistry-service-release-log-mem/src/main/docker
- name: submodel-registry-log-mongodb
path: basyx.submodelregistry/basyx.submodelregistry-service-release-log-mongodb/src/main/docker
- name: aas-digitaltwinregistry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: aas-digitaltwinregistry
- name: digitaltwinregistry

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed

path: basyx.submodelregistry/basyx.submodelregistry-service-release-log-mem/src/main/docker
- name: submodel-registry-log-mongodb
path: basyx.submodelregistry/basyx.submodelregistry-service-release-log-mongodb/src/main/docker
- name: aas-digitaltwinregistry
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- name: aas-digitaltwinregistry
- name: digitaltwinregistry

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remaned

@@ -0,0 +1,173 @@
/*******************************************************************************
* Copyright (C) 2024 the Eclipse BaSyx Authors
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Copyright (C) 2024 the Eclipse BaSyx Authors
* Copyright (C) 2025 the Eclipse BaSyx Authors

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert cosmetic changes and version changes

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted.

@ConditionalOnProperty(name = "discoveryintegration.enabled", havingValue = "true", matchIfMissing = false)
public class DiscoveryIntegrationAasRegistryConfiguration {

@Value("${discoveryintegration.baseUrl:#{null}}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Value("${discoveryintegration.baseUrl:#{null}}")
@Value("${basyx.aasregistry.feature.discoveryintegration:#{null}}")


@Component
@Slf4j
@ConditionalOnProperty(name = "discoveryintegration.enabled", havingValue = "true", matchIfMissing = false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@ConditionalOnProperty(name = "discoveryintegration.enabled", havingValue = "true", matchIfMissing = false)
@ConditionalOnProperty(name = "basyx.aasregistry.feature.discoveryintegration.enabled", havingValue = "true", matchIfMissing = false)

@ConditionalOnProperty(name = "discoveryintegration.enabled", havingValue = "true", matchIfMissing = false)
public class DiscoveryIntegrationAasRegistryFeature implements AasRegistryStorageFeature {

@Value("${discoveryintegration.baseUrl:#{null}}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@Value("${discoveryintegration.baseUrl:#{null}}")
@Value("${basyx.aasregistry.feature.discoveryintegration:#{null}}")

Comment on lines 13 to 19
<properties>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<skipTests>false</skipTests>
<maven.test.skip>false</maven.test.skip>
</properties>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the properties. This is handled by the parent pom

Comment on lines 17 to 21
<properties>
<java.version>17</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
</properties>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the properties

@FaheemBhatti
Copy link
Author

@aaronzi
Thanks for the feedback. I have implemented most of the changes you asked for, but you asked for adding the DTR dependency to all the registry features. Just for my understanding --> What benefit will this bring? Will it also not create a circular reference?

@aaronzi
Copy link
Member

aaronzi commented Sep 23, 2025

Thanks for addressing my remarks :)

I meant the discovery integration feature should be added to all the AAS Registry variations, not the DTR. Sorry for the misunderstanding.

@FaheemBhatti
Copy link
Author

@aaronzi
While testing the feature, I noticed that the encoding is handled at the service layer, so I made a small adjustment accordingly.

Regarding the discovery integration for all AAS registry variations, could you clarify whether this refers to extending support for both the MongoDB and InMemory solutions (already been handled and tested), or if it involves creating a separate configuration within each module? Sorry for being dumb here, I am not getting this completely.

@aaronzi
Copy link
Member

aaronzi commented Sep 24, 2025

the AAS Registry essentially has 4 components that all should have this feature:

The discovery integration feature has to be made available to all of those components via their respective POMs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants