3.3 Changing Element Property Page Data

WSAPI allows clients to add and remove associations between an element and predefined metamodel property page templates. For any template associated with an element, WSAPI can be used to retrieve and set values for fields on that property page.

Property page support is limited. There is currently no way to query or update property page templates through the API, so validation rules for a property page field are not available to WSAPI clients. Some prior knowledge of the data entry requirements for a given template is needed. An attempt to set a field to an invalid value is reported in the Failures list in the result set.

Element attributes are the core properties of an element that control most aspects of an element’s behavior. Some attribute functionality, such as element relationships, is exposed in WSAPI as higher level objects. Many element attributes are not available for update through the API.

Each element class defines a set of attributes that are common to all elements of that class. Element queries always return the names of the attributes supported by the element. Queries only return attribute objects (WSDL type: ElementAttribute) when they are explicitly requested in the element query contentSpec. Attribute objects contain not only the name and value (usually) of an attribute, but also identify its type (WSDL type: ElementAttributeType), and whether the attribute can be updated through Web services. For example:

<attributes>
  <item>
    <id>Condition</id> 
    <type>COND</type> 
    <value>OK</value> 
    <writeable>false</writeable> 
  </item>
  <item>
    <id>DisplaySourceElements</id> 
    <type>BOOL</type> 
    <value>true</value> 
    <writeable>true</writeable> 
  </item>
  :    :    :
</attributes>

When updating an element’s attributes, the best practice is to first retrieve the current attribute object and return it to the server with the updated value. When creating an element, retrieve the attributes of another element of the same class. Some attributes also have special formatting rules or a limited set of understood values. Valid values for an attribute can vary by element class, server configuration, and possibly server version. It might be necessary to query elements with the desired configuration to derive the correct settings.

Some configuration options that can be manipulated by setting attributes through WSAPI display in an element’s property pages, as shown in the following sections:

3.3.1 Condition Property Page

In the Condition property page, specify an algorithm used to calculate an element’s condition.

Figure 3-1 Element Condition Property Page

To specify the algorithm used to calculate an element’s condition:

  1. In th Explorer pane, right-click the element and select Properties.

  2. Select Condition.

  3. Select Select an alternate algorithm, then select the algorithm from the drop-down list. Then, set which objects the algorithm propagates to by selecting from the second drop-down list.

    Setting

    Description

    Stored Attribute

    Select an alternate algorithm

    Uses a selected algorithm from a standard library.

    Stored in the Algorithm attribute

    Propagate to

    Specifies how the algorithm is propagated: to no children, all children, all children except those with no children (might force discovery).

    or

    All children except those with no discovered children (discovery is not forced).

    Stored in the Algorithm Disseminates attribute.

    Parameter

    Parameters vary by algorithm.

    Stored in the Algorithm Parameters attribute.

  4. Set the algorithm parameters.

  5. Click Apply.

3.3.2 Elements Property Page

The Elements property page determines state contribution or alarm propagation from a child service model.

Figure 3-2 Element Elements Property Page

To specify the elements to drive the element’s condition and alarms:

  1. In th Explorer pane, right-click the element and select Properties.

  2. Select Elements.

  3. Click Add to browse and select the elements to drive state and alarms.

  4. Select from the following Source Elements options:

    Setting

    Description

    Stored Attribute

    Display as children

    Displays the element created for the service model as a child of the source element used to create it.

    Stored in the DisplaySourceElements attribute.

    Apply security permissions

    Applies the source element’s security permissions to the element created for the service model.

    Stored in the PropagateSecurity attribute.

    Halt alarm contributions

    Stops the propagation of alarms from the source element up to the service model.

    Stored in the IgnoreChildAlarms attribute.

  5. Click Apply.

3.3.3 Status Property Page

The Status property page displays the label, condition, and date and time of the last reported condition for the service model. Select the Exclude from impact reporting (Show Impacted) check box to exclude the element from impact reporting. This setting is stored in the ExcludedFromImpact attribute.

Figure 3-3 Element Status Property Page