Please report new issues athttps://github.com/DOCGroup
According to the CosNotification spec, formal/04-10-11, it should be possible to treat the variable_header component as a sequence, checking its length or finding a field by index. However in TAO's Notification service, this fails. For instance, the spec gives this example: ($.header.variable_header[1].name == priority and $.header.variable_header[1].value > 1163) or ($.header.variable_header[2].name == priority and $.header.variable_header[2].value > 1163) However this fails in TAO because when TAO binds an event to a constraint for filtering, the variable header fields are mapped to a hash table and the reference to the source event and its variable_header sequence are lost. In addition to a failure to index the variable_header, the _length operator cannot be applied to the variable_header, or some of the other components that are associated with implicit ids in the constraint visitor. The solution to this problem is twofold, first, a reference to the variable_header sequence needs to be retained so that the sequence could be indexed, and then methods on Notify_Constraint_Visitor such as visit_array, and visit_special need to be modified so that the current_value_ member is not dereferenced without first checking that it is not null. If it is null, then the implicit_id_ must be checked to determine how to evaluate the current constraint.