Is it allowed to set the value to null on a mandatory property in an EventType?|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Is it allowed to set the value to null on a mandatory property in an EventType?
Avatar
Mikael Eklund
Member
Members
Forum Posts: 10
Member Since:
02/07/2017
sp_UserOfflineSmall Offline
1
08/12/2026 - 01:07
sp_Permalink sp_Print sp_EditHistory

Hi,

Is it allowed, according to the specifications, to set the value on a mandatory property, in an event, to null. 

 

For example:

Assuming an event of EventType BaseEventType.

Is it allowed for an OPC UA server to set, for example, property SourceName to null in the event?

 

If it is, is it the same for any mandatory property in any EventType? 

Should an OPC UA client be able to take that into account?

 

Thanks

Avatar
Randy Armstrong
Admin
Forum Posts: 1688
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
08/12/2026 - 19:36
sp_Permalink sp_Print

If a mandatory field has a nullable value you could set it to. i..e String to ""

But the Value cannot be Variant.Empty for mandatory properties.

However, the "" rule does not apply if the description of the property makes it clear that "" is not a valid value:

SourceName provides a description of the source of the Event. This could be the string-part of the DisplayName of the Event source using the default locale of the server, if the Event is specific to a Node, or some server-specific notation.

(i.e. "" is not a description)

Clients should be designed defensively to deal with misbehaving Servers but that does not make the server right.

Avatar
Mikael Eklund
Member
Members
Forum Posts: 10
Member Since:
02/07/2017
sp_UserOfflineSmall Offline
3
08/28/2026 - 04:56
sp_Permalink sp_Print

Thanks for the reply Randy

 

Another question in same area. 

Is it allow to set property ConditionName (in EventType ConditionType) to null or empty according to the OPC UA specifications. 

 

Thanks

Avatar
Randy Armstrong
Admin
Forum Posts: 1688
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
4
08/31/2026 - 02:02
sp_Permalink sp_Print

https://reference.opcfoundatio.....ionType%2E

ConditionName identifies the Condition instance that the Event originated from. It can be used together with the SourceName in a user display to distinguish between different Condition instances. If a ConditionSource has only one instance of a ConditionType, and the Server has no instance name, the Server shall supply the name element of the BrowseName of the ConditionType.

Specification says no and provides a default if it does not make sense.

Avatar
Mikael Eklund
Member
Members
Forum Posts: 10
Member Since:
02/07/2017
sp_UserOfflineSmall Offline
5
09/16/2026 - 07:25
sp_Permalink sp_Print

Hi, 

A follow up question on ConditionName.

 

We have observed OPC UA servers that provide an empty or null ConditionName, while at the same time holding OPC Foundation certification. 

Given that the confirmation that ConditionName must not be null or empty, we are trying to understand how such a server could still pass conformance testing. Is ConditionName perhaps covered by a different Facet or Profile than those included in the server's certification (see below)? Or is the value simply not validated as part of the relevant conformance test cases?

It would be useful to understand whether this behavior is outside the scope of the certification tests, whether there is an interpretation issue regarding the specification requirements, or whether there is a gap in the current test coverage.

Any clarification on how ConditionName is evaluated during OPC Foundation certification would be greatly appreciated.

 

The A&C facet that the OPC UA servers holding OPC Foundation certification on are:

- A&C Base Condition Server Facet
- A&C Acknowledgeable Alarm Server Facet

 

Thanks

Avatar
Alexander Allmendinger
Germany
Moderator
Members

Moderators

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-ProductsServices
Forum Posts: 79
Member Since:
07/11/2017
sp_UserOfflineSmall Offline
6
09/23/2026 - 00:39
sp_Permalink sp_Print

Dear Mikael,

we would need to check the details of the certification as well as the behavior to see whether there was a gap in testing which caused this to be missed or whether this is actually compliant behavior under the given circumstances.

Since we would not like to discuss this in public, can you please send a mail to compliance@opcfoundation.org with further details about the product, the version you are using and in which scenario you are experiencing the issue?

We will then investigate and get back to you via e-mail. If we find something missing in the testing we will then create additional test cases to cover those cases and make sure these are caught in the future.

Regards,
Alexander Allmendinger

Forum Timezone: America/Phoenix
Most Users Ever Online: 1361
Currently Online:
Guest(s) 63
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1531
Posts: 5183