Custom Code to Handle Scenario Where Old Char Associated to Entity Instances has been Deleted from Specification
(Doc ID 2549991.1)
Last updated on AUGUST 18, 2023
Applies to:Oracle Communications Unified Inventory Management - Version 18.104.22.168.0 and later
Information in this document applies to any platform.
Migrated entities contains old characteristics which is not in use now(Removed from current specification).
Say for example you have Spec1 with the below 3 chars.
|Spec 1||Char A||Char B||Char C|
And you have created an entity with this spec and have provided value to all the characteristics.
Now you have modified this spec and redeployed say:
|Spec1||Char A||Char B||Char XYZ|
After redeploying this spec, the existing data of previous chars i.e. (Char B and Char C) will still be present in the schema, however it will not be visible when accessed through the UI.
UI has its own logic to display the chars for an entity. It maps chars associated to the entity instance with the chars associated to the entity specification and displays only those which are associated to the specification.
Though it doesn't delete the old char associated to the entity instance on viewing the entity. But if you edit the entity from UI, old char gets deleted from the db records as well.
However while, updating such characteristics using custom code will fail with java.lang.NullPointerException , since code is not able to find old characteristics in current specification:
at oracle.communications.inventory.api.characteristic.impl.CharacteristicManagerImpl.validate(CharacteristicManagerImpl.java:1397) ~[uim-managers.jar:?]
at oracle.communications.inventory.api.characteristic.impl.CharacteristicManagerImpl.validate(CharacteristicManagerImpl.java:1509) ~[uim-managers.jar:?]
at oracle.communications.inventory.api.logicaldevice.impl.LogicalDeviceUpdater.validateUpdateLogicalDevices(LogicalDeviceUpdater.java:165) [uim-managers.jar:?]
at oracle.communications.inventory.api.logicaldevice.impl.LogicalDeviceUpdater.updateLogicalDevice(LogicalDeviceUpdater.java:106) [uim-managers.jar:?]
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document