Creating or configuring forms > Configuring the <queue> element > Defining what data is stored in the queue

6.3.1 Defining what data is stored in the queue

The parent <queue> element contains one or more child <queue-item> elements. For most requests, there will only be one queue item definition. However, if you want to support heterogeneous queue items, you may specify more than one item.

To define what data is stored in the queue

  1. Open the appropriate XML file located in the Viewpoint home directory. Locate the <queue> element. Modify the name if desired.
  2. Add the <queueItem> element inside of <queue>.
  3. Set the <condition> element within <queueItem> to specify that Viewpoint should determine whether the queue item should be added.
    1. Set <condition> to any boolean value decider.
      <queue name="Your Current VPC Request">
        <queueItem>
          <condition comparison="equals">
            <first>
              <component id = "vmtype" />
            </first>
            <second>local</second>
          </condition>
          <title required="false">
            <description>Description</description>
            <component id="sysdescription" />
          </title>
          <row order="1" required="true">
            <description>Procs:</description>
            <component id="procs" />
          </row>
          <!-- ... -->
          <requirement-data id="rsvRequirement">
            <component id="sysdescription" />
            <component id="vmtype" />
            <component id="procs" />
          </requirement-data>
        </queueItem>
        <queueItem>
          <condition comparison="equals">
            <first>
              <component id = "vmtype" />
            </first>
            <second>ec2</second>
          </condition>
          <title required="false">
            <description>Description</description>
            <component id="sysdescription" />
          </title>
          <row order="1" required="true">
            <description>Type:</description>
            <component id="ami" />
          </row>
          <row order="2" required="true">
            <description>key:</description>
            <component id="key_name" />
          </row>
          <requirement-data id="EC2Requirement">
            <component id="sysdescription" />
            <component id="vmtype" />
            <component id="ami" />
            <component id="key_name" />
          </requirement-data>
        </queueItem>
      </queue>

      Each time the user clicks Finish or Add to Queue, each queue item is evaluated to determine whether the item should be added to the list. The item is not added if either the condition evaluates to false or there is no data that is saved in the queue item.

Related topics