Skip to content

Conversation

@Dekrate
Copy link
Contributor

@Dekrate Dekrate commented Oct 21, 2025

Description of Changes

This PR implements support for propagating globalAssetId to the Discovery Service alongside specificAssetIds when creating or updating AAS descriptors in the Digital Twin Registry.

Key changes:

  • Added collectAllAssetIds() private method that collects both specificAssetIds and globalAssetId from AAS descriptors
  • The globalAssetId is converted to a SpecificAssetId with the name "globalAssetId" before being sent to the Discovery Service
  • Updated insertAasDescriptor() to propagate globalAssetId when present
  • Updated replaceAasDescriptor() to propagate globalAssetId when present, ensuring it's always called even with empty asset ID lists
  • Added comprehensive unit tests covering all scenarios (globalAssetId with specificAssetIds, globalAssetId only, no globalAssetId, and replace operations)

Related Issue

Closes #893

BaSyx Configuration for Testing

No special configuration is required for testing these changes. The implementation uses Mockito for unit testing and does not require a running BaSyx instance.

All tests should pass successfully.

AAS Files Used for Testing

No external AAS files were required for testing. All test cases use programmatically created AssetAdministrationShellDescriptor objects with:

  • Test descriptors with both specificAssetIds and globalAssetId
  • Test descriptors with only globalAssetId
  • Test descriptors with only specificAssetIds (regression testing)
  • Test descriptors with empty asset ID lists

The test descriptors simulate realistic AAS configurations to verify the Discovery Service integration.

Additional Information

@Dekrate
Copy link
Contributor Author

Dekrate commented Oct 21, 2025

@aaronzi Is that okay? You assigned me :) It's my very first contribution in that repository.
All tests pass :)

@aaronzi
Copy link
Member

aaronzi commented Oct 21, 2025

Thanks for the PR. I will look into the code later today. What I can see from the checks is that you need to create an Eclipse Account and sign the Eclipse Contributor Agreement (ECA) with the same email that you used the sign your git commits

@Dekrate
Copy link
Contributor Author

Dekrate commented Oct 21, 2025

Sure, @aaronzi
If you do not mind, could you please blur more letters in my email? 😊
It would be harder for bots to parse it
Of course I know that still it can be visible via git log
I will create the account

@aaronzi
Copy link
Member

aaronzi commented Oct 21, 2025

I removed your mail from my comment :)

@Dekrate
Copy link
Contributor Author

Dekrate commented Oct 21, 2025

@aaronzi Done. Registered as a contributor. 😉

@aaronzi aaronzi merged commit 8d064e2 into eclipse-basyx:main Oct 21, 2025
45 checks passed
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.

[FEATURE] Add globalAssetId to discovery integration

2 participants