Override of methods

Questions regarding the use of UaModeler

Moderator: uamodeler

Post Reply
Jr. Member
Jr. Member
Posts: 2
Joined: 11 Feb 2021, 16:04

Override of methods

Post by RKM »


while working with the UaModeler to create custom models for a specific use case, I came to a logic question.


I created a new information model structure within the object type tree. As a result of that we have different departments in our company with different requirements, the structure looks something like that:


Now I specified methods in the MainType with the structure:


Now I want to inherit them in the BodyShopSpecific with the Override functionality. Following that, the InputArgument1 and InputArgument2 completely disappear in the BodyShopSpecific type and are not inherited. For every other entity, like objects and variables, sub-structures are inherited.

Logic question: Do you strictly use here the rule of Polymorphism from object-oriented programming? For the workflow, it makes in my eyes not that much sense, as you can easily forget it to only create the InputArguments for methods.

Thanks in advance for your thoughts!



User avatar
Support Team
Hero Member
Hero Member
Posts: 2825
Joined: 18 Mar 2011, 15:09

Re: Override of methods

Post by Support Team »


You should not override a method in this use case. We will forbit overriding methods with ModellingRule Mandatory or Optional in a future version of UaModeler.

When comparing OPC UA to a programming language an ObjectType is more an interface than a class. Different OPC UA subtypes can have different implementations for the method without overridng on the subtypes.
Best regards
Unified Automation Support Team

Post Reply