Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Once you've learned how to create a registry extension file and a content, see the list of the Governance Artifacts main element descriptions below:

...

Table of Contents
maxLevel4
minLevel4
locationtop
styleborder:1
locationtop
typeflat
separatorpipe

...

The table Element

...

Code Block
<table name="Overview">
  <field type="text" required="true"> <name>Name</name> </field>
  <field type="text" required="true"> <name>Namespace</name> </field>
  <field type="text"> <name>Version</name> </field>
  <field type="text-area"> <name>Description</name> </field>field>only lower case characters are allowed in short name
</table>

The generated HTML UI of the table element appears as below.

...

The field element can have a couple of attributes, including a mandatory attribute type. The type attribute specifies the field type, which can be text, option, text-area, option-text, or date or checkbox.

Some types of fields can have optional attributes. A The text-area field accepts height and width url as optional attributes. The height and width attributes should be numerical and their values should be in pixels. The text field accepts url as an optional an optional attribute. Setting url="true" will display the text as a URL instead of as a plain text box.

...

Code Block
<field type="options"> <name>States<<name>states</name> <values> <value>Created</value> <value>Tested</value> <value>Deployed</value> <value>Deprecated</value> </values> </field>

...

Code Block
<field type="options">
     <name label="Lifecycle Name">Lifecycle Name<>lifecycle_name</name>
     </field>
Info
titleTip

The label is the text that appears on the browser UI, whereas the name is the actual name of what is being stored on the repository, in XML format.
The label is optional. If it is not defined, the name will be used instead.

Info
titleNote

The label can have characters such as spaces, paranthesis parenthesis uppercase letters etc, . whereas the name cannot have those.

...

This is the root element of the new artifact which is being defined. It has several attributes:

  • type - Defines the

    mediatype

    media type of the artifact. The type format should be application/vnd.[SOMENAME]+xml. SOMENAME can contain any alphanumeric character, "-" (hyphen), or "." (period).

  • shortName - Short name for the artifact
  • singularLabel - Singular label of the artifact
  • pluralLabel -
    Info

     Use the following pattern when defining the media type of custom RXTs:  application/[a-zA-Z0-9.+-]+

  • shortName - Short name for the artifact. Only lower case characters are allowed in the short name.
  • singularLabel - Singular label of the artifact
  • pluralLabel - Plural label of the artifact
  • hasNamespace - Defines whether the artifact has a namespace (boolean)
  • iconSet - Icon set number used for the artifact icons

...

This is the path where the instance data of the artifact is stored. When you evaluate this expression, it automatically replaces @{name} with the name of the artifact and @{namespace} with the namespace of the artifact. In addition to the name and namespace, you can also specify any other attribute in the format @{ATTRIBUTE_NAME}, e.g., /trunk/processes/@{business_domain}/@{overview_version}.

The nameAttribute Element

Code Block
<nameAttribute>details_name</nameAttribute>

...

Info

You cannot have the (~!@#;%^*()+={}|\<>"',) characters in the value of the unique fields that are defined in the storagePath element in the RXT. Hence, you need to add a validation for the field definitions of those fields. For example, consider the following storage path.

Code Block
languagexml
<storagePath>/gadgets/@
{overview_provider}
/@
{overview_name}
/@
{overview_version}
</storagePath>

The validations required for the following storage path are as follows:

Code Block
languagexml
...............
<content>
<table name="Overview">
<field type="text" required="true">
<name>Provider</name>
</field>
<field type="text" required="true" validate="^([a-zA-Z0-9_\s\-]*)$">
<name>Name</name>
</field>
........................

...

The nameAttribute Element

Code Block
<nameAttribute>details_name</nameAttribute>

This is the main attribute which defines the name of the artifact. It must have the following format:

...

Code Block
    <content>
        <table name="Details">">
            <field required="true" type="text">
                <name>Name</name>
            </field>
            <field required="true" type="text">
                <name>Name<<name>Date</name>
            </field>
            <field required="true" type="text">
                <name>Date</name>
  <name>Venue</name>
            </field>
        </table>
        <table name="Rules">
            <field type="options">
         </field>       <name>Gender</name>
     <field required="true" type="text">         <values>
       <name>Venue</name>             <<value>male</field>value>
         </table>         <table name="Rules">
 <value>female</value>
           <field type="options">    </values>
            <name>Gender<</name>field>
            <field type="text-area">
  <values>               <name>Description</name>
     <value>male</value>       </field>
             <value>female</value><field type="text">
                <<name>Auther</values>name>
            </field>
        </table>
   <field type="text-area     <table name="Participants">
            <subheading>
   <name>Description</name>             </field><heading>House</heading><heading>Name</heading>
             <field type="text"></subheading>
            <field maxoccurs="unbounded" type="option-text">
      <name>Auther</name>             </field><name label="Contact">Contact</name>
        </table>        <values>
<table name="Participants">             <subheading>      <value>Titans</value><value>Legions</value><value>Cloud      Bots</value><value>Wild Boars</value>
    <heading>House</heading><heading>Name</heading>             </subheading>values>
            <field maxoccurs="unbounded" type="option-text"></field>
        </table>
       <name <table labelname="Contact">Contact</name>Service Lifecycle">
            <field type="options">
  <values>              <name label="Lifecycle      <value>Titans</value><value>Legions</value><value>Cloud Bots</value><value>Wild Boars</value>Name">Lifecycle Name</name>
                  </values><values class="org.wso2.carbon.governance.services.ui.utils.LifecycleListPopulator">
            </values></field>
        </table>
        <table name="SLA"Service Lifecyclecolumns="3">
            <field type="options"><subheading>
                <heading>Document Type</heading><heading>URL</heading><heading>Comment</heading>
      <name label="Lifecycle Name">Lifecycle Name</name>   </subheading>
            <field <values class="org.wso2.carbon.governance.services.ui.utils.LifecycleListPopulatorpath="true" type="text" url="true">
            </values></field>    <name>SLA</name>
    </table>        </field>
<table name="SLA" columns="3">           <field  <subheading>
path="true" type="text" url="true">
               <heading>Document Type</heading><heading>URL</heading><heading>Comment</heading><name>SLA1</name>
            </subheading>field>
            <field path="true" type="text" url="true">
                <name>SLA<<name>SLA2</name>
            </field>
        </table>
   <field path="true"  </content>

This element defines the data model of the new artifact. It will also be used to auto-generate the UI of instantiate artifacts.

...

The text Element

Defines a text field.

Code Block
<field type="text" url="true">
        >
       <name>SLA1<<name>Name</name>
    
       </field>
  

Image Added

The path and url Attributes
Code Block
          <field path="true" type="text" url="true">
                <name>SLA2</name>
            </field>
 
      <<name>Venue</table>name>
    </content>

This element defines the data model of the new artifact. It will also be used to auto-generate the UI of instantiate artifacts.

The text Element

Defines a text field.

Code Block
field>
  • The path attribute is set when the input is expected to be a path. Enabling this attribute also gives you the option of browsing within the repository. You can type the path as well.
  • The url attribute is set when the input is expected to be a URL.

Image Added

The readonly Attribute
Code Block
    <field type="text" readonly="true">
     <name>Name<<name>Date</name>
    </field>

Image Removed

...

  • The readonly attribute is set when users are not expected to change the value of a text (or text-area) field once an artifact has already been created.
The text-area Value of the type Attribute

Defines a text area field.

Code Block
    <field path="true" type="text" url="true"-area">
     <name>Venue<<name>Description</name>
    </field>
  • The path attribute is set when the input is expected to be a path. Enabling this attribute also gives you the option of browsing within the repository. You can type the path as well.
  • The url attribute is set when the input is expected to be a URL.

Image Removed

The readonly Attribute

Image Added

The date Value of the type Attribute

Defines a date field and it validates given input for a date. 

Code Block
    <field type="textdate">
readonly="true">     <name>From <name>Date<Date</name>
    </field>
  • The readonly attribute is set when users are not expected to change the value of a text (or text-area) field once an artifact has already been created.

...

/field>

Image Added

Image Added

The options Value of the type Attribute

Defines a text area fieldfield with a combo-box containing the given values.

Code Block
    <field type="text-area">options">
     <name>Gender</name>
     <values>
      <value>male</value>
      <value>female</value>
     <name>Description<</name>values>
    </field>

Image RemovedImage Added

The

...

option-text Value of the type Attribute

Defines a composite field with a combo-box containing the given valuesan options field and a text field. Values of the options field need to be defined as child elements of the field.

Code Block
    <field type="optionsoption-text">
      <name>Gender<<name label="Contact">Contact</name>
     <values>
      <value>male<<value>Titans</value><value>Legions</value>value><value>Cloud       <value>female<Bots</value><value>Wild Boars</value>
     </values>
    </field>

Image RemovedImage Added

The option-text Value of the type Attribute

...

Multi-type Attributes

reqired Attribute

The required attribute makes a field required in order to create an artifact instance. Here, the required attribute is used for text type, but it can be used with other types also. Required fields are indicated using a red star in UI configuration.

Code Block
    <field required="true" type="option-text">
     <name label="Contact">Contact<<name>Name</name>
     <values></field>

Image Added

validate Attribute

The validate attribute can be used to give a regular expression to validate the user input with any field except checkboxes. 

Code Block
       <value>Titans</value><value>Legions</value><value>Cloud Bots</value><value>Wild Boars</value><field type="text" validate="^\d+$">
     <<name>Age</values>name>
    </field>

Image Removed

Multi-type Attributes

reqired Attribute

...

Note: If you want to have characters like '<' in regular expression you have to put corresponding XML codes like &lt; as RXT configuration is an XML document. 

tooltip Attribute

The tooltip attribute can be used to give a tooltip to be shown with any type of field.

Code Block
    <field requiredtype="truetext" typetooltip="textEmployee's age goes here">
     <name>Name<<name>Age</name>
    </field>

...

Table Attributes

columns Attribute

...