Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
NodeManagerUaNode.deleteNode()
June 16, 2018
18:57, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 135
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

Hi,

I often need to delete a complete hierarchy of dynamically created nodes. The NodeManagerUaNode.deleteNode(…) would in principle do a perfect job, just it only considers “HasChild” relationships, which leaves “Organized” nodes untouched. The semantics of Organizes is similar to HasChild (IMO – for this purpose). Would you think that it might make sense to add “Organizes” relationships to be considered by NodeManagerUaNode.deleteNode()?

Thanks to using Kotlin, I was able to extend the NodeManagerUaNode’s with this capability; but it would certainly be nice to have it natively available in NodeManager.

Thanks,
Hans-Uwe

June 18, 2018
10:35, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

We could maybe consider an overload for taking ReferenceTypeIds.

In general using other than HasChild without knowing the context could end up deleting more that was intended. The spec for Organizes:

“The semantic of this ReferenceType is to organise Nodes in the AddressSpace. It can be used
to span multiple hierarchies independent of any hierarchy created with the non -looping
Aggregates References.
The SourceNode of References of this type shall be an Object or a View. If it is an Object then
it should be an Object of the ObjectType FolderType or one of its subtypes”

But the spec for HasChild instead is:

“The semantic i s to indicate that References of this type span a non -looping hierarchy.
Starting from Node “A” and only following References of the subtypes of the HasChild
ReferenceType it shall never be possible to return to “A”. But it is allowed that following the
References there may be more than one path leading to another Node “B”.”

So e.g. for an Instance that would e.g. refer to type nodes with Organizes (e.g. https://forum.prosysopc.com/forum/opc-ua-java-sdk/some-references-go-missing-while-loading-the-nodeset-xml), following and deleting Organizes targets would end up deleting those types also.

June 20, 2018
20:45, EEST
Avatar
hbrackel
Member
Members
Forum Posts: 135
Member Since:
February 21, 2014
sp_UserOfflineSmall Offline

I do see the point you made. Even though the DI application example is a bit ‘exotic’, the use case does exist indeed.

Meanwhile I wrote a custom “deleteWithChildren(…)” method which browses for HasChild and Organizes reference targets recursively. (pretty similar to the SDK methods).

Thanks,
Hans-Uwe

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
8 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 680

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1