Property definitions

Relevant for: API testing only

For all sections that use properties, you can define property definitions for these sections. The built-in sections that use properties are:

  • GeneralProperties. Defines the properties in the General tab of the Properties pane, for example Step ID and Name.

  • InputProperties. Defines the input properties located in the Input pane of the of the Properties pane's Input/Checkpoints tab.

  • OutputProperties. Defines the output properties located in the Checkpoints pane of the of the Properties pane's Input/Checkpoints tab.

This topic describes the data that can be contained in Property Definitions.

Elements / subelements

The elements and attributes are defined in the standard XML schema file, http://www.w3.org/2001/XMLSchema, or the built-in types.xsd schema, located in the <Installation_Folder>/dat/schema folder. The level number indicates the level of the element or sub-element in the hierarchy.

Name Description

xs:schema

 

The schema namespaces for the properties, as described by the xml:ns attribute. Keep the default value for this attribute.

xs:import The namespace to import using the namespace and schemaLocation attributes. Keep the default value for this attribute.
xs:element The element to define, using the attributes described in the table below.
xs:simpleType

A tag indicating the beginning of definitions of a simple type property.

You only need to enclose a simple type element with this tag, if you want to do enumeration with a drop-down list. For example, the following definition does not require an xs:simpleType tag.

<xs:element name="ClientCertificate" type="types:Certificate" types:displayName="Client certificate" />  
xs:complexType A tag indicating the beginning of definitions for a node of multiple properties.
xs:sequence A tag indicating the beginning of a list of properties in a complex type property.
xs:restriction A tag restricting the value of the enumeration values of a property, using the base attribute. To restrict String type values, use base="xs:string".
xs:enumeration A tag indicating the beginning of list of values in the drop-down list for a property, using the value attribute.
xs:annotation An annotation for the element Use an xs:documentation sub-element to compose text that will appear below the properties grid in the Properties pane.

Back to top

Element attributes

The following table describes the primary attributes of the xs:element. For attributes in the standard XML schema, use an xs: prefix in the value, for example standard types use type=xs:string or type=xs:int.

For types defined in the Types.xsd schema, use a types: prefix in the attribute name. For example types:displayName.

Name Description
name The internal name of the property or grid in the Properties pane. This is the name referenced by other calls and by the event handlers code. This is not the name displayed in the Properties pane's Name column.
type

The type of property. Some common values are:

xs:string, xs:int, xs:boolean, Multipart, Header, Part. For a value defined in the Types schema, use the types: prefix. For example type="types:filePath".
minOccurs The minimum number of array elements for which the user must provide. For none, specify "0".
maxOccurs The maximum number of array elements the user may provide. To allow an unlimited amount, specify "unbounded"
types:visible When true, enables the parameter to be visible even before being expanded by the Add Array Element command.
types:argType

The type of the property: "XML" or "Object".

types:displayName

The property name as it will appear in the Properties pane.

Back to top

Simple elements with enumeration

The following ReportMessageActivitySample example defines an input parameter, Status, with an enumeration attribute. This code creates a drop-down list of values in the Properties pane's input property grid.


<xs:element name="Status" default="Done" types:displayName="Status">
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="Done"/>
                  <xs:enumeration value="Pass"/>
                  <xs:enumeration value="Fail"/>
                </xs:restriction>
              </xs:simpleType>
</xs:element>

Back to top

Complex array elements

The following sample defines a complex property, with a Key and Value pair of values.

<xs:complexType name="NameValueType">
   <xs:sequence>
      <xs:element name="Key" type="xs:string"/>
      <xs:element name="Value" type="xs:string"/>
   </xs:sequence>
</xs:complexType>

Back to top