This chapter provides an overview of element types and data types and discusses how to:
Use the elements action toolbar.
Manage primitive elements.
Manage compound elements.
Manage collection elements.
This section describes the element types and element data types that the PeopleSoft system supports as part of its document framework.
Note. The term and concept of elements described in this chapter refers to node elements.
When you manage documents in the PeopleSoft system, you can add and manage root elements, child elements, and peer elements.
The first element that appears in a document is the root element. A document can have only one root element. When you create a new document, the system automatically creates a root element and uses the document name as the root element name.
This section discusses the data types that PeopleSoft supports.
Primitive |
PeopleSoft supports the primitive data types in the following list. You may use primitive data types in child and peer elements.
|
Compound |
A compound data type can be a PeopleSoft record, complex primitive data type, or another document. |
Complex primitive |
A complex primitive data type is a primitive data type that can contain attributes. With this data type, the system-generated XML creates the element tag with the associated attributes as a sibling instead of a child. |
Collection |
Collection elements represent multiple occurrences of a single type, similar to an array or a set. |
See Also
Defining Primitive Element Properties
This section discusses how to:
Access and enable the action toolbar.
Use the action toolbar buttons.
Use the action toolbar to select element types and data types to add to a document.
The elements action toolbar appears on the Document Builder - Documents page under the document tree. This example shows the action toolbar:
Hover over any button to display the element type that you can add to the system
Child Element Action Buttons
The first set of three buttons highlighted in the following example enable you to add child element types to a document:
The following table lists the child element buttons in the order they appear on the toolbar and the action you can perform with each:
|
Add primitive child. |
|
Add collection child. |
|
Add compound child. |
Peer Element Action Buttons
The second set of three buttons highlighted in the following example enable you to add peer element types to a document:
The following table lists the peer element action buttons in the order they appear on the toolbar and the action you can perform with each:
|
Add primitive peer. |
|
Add collection peer. |
|
Add compound peer. |
Delete and Move Element Action Buttons
The following example highlights the action toolbar buttons you can use to delete and move elements in the document tree:
The following table describes the action buttons you can use to delete and move elements in the document tree:
|
Delete element. |
|
Move element to the bottom of the tree. |
To access the action toolbar, select PeopleTools, Documents, Document Builder and then select a document or create a new document.
The following example shows a document definition named Items. The action toolbar appears under the document tree section:
The action toolbar is not enabled until you click an element in the document tree. In the previous example, the action toolbar is not enabled since no element is selected. The following example shows the price element of the Item document selected and the action toolbar enabled:
When you click an element, the element types and data types that you can add are enabled on the toolbar. If an element or data type is not enabled on the toolbar, either you have not selected an element to which to add an element or you are not allowed to add the element type or data type to the document tree at that time.
When you select the root element on the document tree, the Dependencies section appears. Document dependencies are discussed elsewhere in this PeopleBook.
See Viewing Document Dependencies.
When you select any other element type on the document tree, the properties defined for the element appear on the right side of the page, as shown in the previous example. Defining element properties is discussed elsewhere in this chapter.
See Also
Defining Primitive Element Properties
This section provides an overview of adding elements to documents and discusses how to:
Add primitive elements.
Define primitive element properties.
Add enumerated values.
You build out a document structure by adding elements to a document tree.
Use the action toolbar on the Document Builder - Documents page to add elements to documents. As described elsewhere in this chapter, the Action Toolbar features buttons to add primitive, compound, and collection elements, both child and peer elements, to documents.
Note. After you add an element to a document, you must define the element properties before you can save the document.
To add primitive elements (child or peer) to documents:
Access the Document Builder - Documents page (PeopleTools, Documents, Document Builder).
On the document tree, click the element to which to add a primitive child or primitive peer element.
On the action toolbar, do one of the following:
Click the Add Primitive Child button to add a primitive child element.
Click the Add Primitive Peer button to add a primitive peer element.
The element appears on the document tree and you may define its properties.
See Defining Primitive Element Properties.
When you add a primitive element data type to a document, the properties that you can define for the element appear on the right side of the Document Builder - Document page.
To access the page, select PeopleTools, Documents, Document Builder. The right side of the following example shows the primitive data type properties section:
The following table describes the properties that you can define for primitive data type elements. Except where noted, the properties in the table are applicable to all primitive data type supported by the system:
Add Enumerated Values and Show Enumerated Values |
Click the link to define accepted values and their descriptions for a data type. You can define enumerated values for the following primitive data types: Character, Date, DateTime, Integer, String, and Time. |
Date/Time Format |
From the drop-down list, select one of the following ISO standard date/time format options:
|
Decimal Length |
Enter the number of digits to include to the right of the decimal point. This property is applicable to the Decimal primitive data type. |
Description |
Enter a long description of the element. |
Element Name |
Enter the name of the element as it will appear in the XML document. |
Length |
Enter a length for the element. This property is applicable to the following primitive data types: Binary, Character, Decimal, Integer, String, and Text. |
Required |
Select the check box to indicate that the element must be included in runtime XML and defined as a required element in the XML schema. |
Sequence |
The system assigns this read-only field. The sequence number is used for indexing with the PeopleCode API for documents. |
Sub-Type |
Select a value from the drop-down list box to further define the data type. This property is applicable to the following primitive data types: Integer, String and Text. The valid values for these data types are:
|
Type |
From the drop-down list box, select a primitive data type. The valid values are discussed elsewhere in this chapter. See Data Types. |
Unbound Maximum |
Select the check box to indicate that the length of the element is unlimited. This property is applicable only to the binary primitive data type. |
You can define allowed values, or enumerated values, for some primitive data types.
An example of enumerated values is a list of acceptable state abbreviations that can be used in a primitive element called State that is a string.
In the Documents Builder, you can define enumerated values for the following primitive data types:
Character.
Date.
DateTime.
Integer.
String.
Time.
Use the Set Enumerated Values page (IB_ENUM_SEC) to set enumerated values. You access the page by using the Add Enumerated Values link that appears on the Document Builder - Documents page when you define properties for one of the primitive data types in the previous list.
The following example shows the Add Enumerated Values link that appears when you define a primitive element called State that is a string:
Click the Add Enumerated Value link to access the Set Enumerated Values page. The following example shows the page:
To set enumerated values, enter an acceptable value in the Value field and then a description for the value in the Description field. In the previous example, the Value column shows the acceptable abbreviations and values that the State element can contain for several of the United States. The Description field shows information about each of the values.
When enumerated values exist for a primitive data type, when you are working in the properties section a Show Enumerated Values link appears instead of a Set Enumerated Values link. The following example shows the properties section for the State element after enumerated values are defined. Note that a Show Enumerated Values link appears:
To set enumerated values:
Select PeopleTools, Documents, Documents Builder.
The Documents Builder - Documents page appears.
In the document tree, select the element for which to add enumerated values.
The properties for the element appear on the right side of the page.
Perform one of the following actions:
Click the Add Enumerated Values link to add values.
This link appears if no enumerated values are defined for the element.
Click the Show Enumerated Values link to modify existing values.
This link appears if enumerated values are already defined for the element.
Enter enumerated values and descriptions:
In the Value field, enter an acceptable value for the element.
In the Description field, enter a description for the value.
Click the plus button (+) to add additional rows of values and descriptions.
Click the OK button.
The Documents Builder - Document page appears.
This section provides an overview of compound data types and discusses how to:
Add compound elements.
Define complex primitive data types.
Define documents as compound element data types.
Define PeopleSoft records as a compound element data types.
A compound data type can be a complex primitive data type, another document, or a PeopleSoft record.
When you add a compound data type to the document tree, the Add Compound Child or Add Compound Peer page appears, depending on whether you are adding a child or peer element. The Add Compound Child page and the Add Compound Peer page are identical and have the same object name, IB_LOGICALCOMP_SEC.
The following example shows the Add Compound Child page:
To add compound elements (child or peer) to documents:
Access the Document Builder - Documents page (PeopleTools, Documents, Document Builder).
On the document tree, click the element to which to add a compound child or compound peer element.
On the action toolbar, do one of the following:
Click theAdd Compound Child button to add a compound child element.
Click the Add Compound Peer button to add a compound peer element.
The Add Compound Child page or Add Compound Peer page appears.
In the Name field, enter a name for the compound element.
Select the type of compound element to create. The options are:
Complex Primitive
When you select this option, the Document Builder - Documents page appears for you to define the element properties.
Document
When you select this option, you search for and specify the document to use as the compound element.
Record
When you select this option, you search for and specify the PeopleSoft record to use as the compound element.
See Defining PeopleSoft Records as Compound Element Data Types.
This section discusses how to:
Define properties for complex primitive elements.
Define attributes element properties.
Add additional attribute elements to complex primitive data types.
Defining Properties for Complex Primitive Elements
After you create and name a complex primitive data type, two elements appear in the document tree on the Document Builder - Documents page. One element is for the complex primitive and the other is for the first of one or more element attributes.
The following example shows a newly created complex primitive element (and attribute) element appearing in the document tree:
The complex primitive element is denoted by a complex primitive icon to the left of the element name. In addition, it is highlighted. The attribute is denoted by the primitive icon to the left of the name.
In the example, the complex primitive element is highlighted, and the properties appear on the right side of the page. They are:
Element Name |
The name of the element as defined on the Add Compound Child or Add Compound Peer page. This value is read-only. |
Required |
Select the check box to make the element a required element. |
Sequence |
The system assigns this read-only field. The sequence number is used for indexing with the PeopleCode API for documents. |
Type |
This field displays the element type. |
Defining Attributes Element Properties
Properties you define for an attribute element appear when you select an element in the document tree.
The following example shows the attribute element TransactionID selected in the tree:
When you select an attribute element, the properties you can define for it appear on the right side of the page.
To specify attribute element properties:
In the document tree, select an attribute element.
The attribute element properties appear on the right side of the page.
In the Element Name field, enter the name of the element as you want it to appear in the generated XML.
If you change this name, the complex primitive element and attribute element name changes to the value you enter.
Select the Required check box to make the attribute a required element.
From the Type drop-down list box, select an element type.
Primitive element types are described elsewhere in this chapter.
Click the Save button.
Adding Additional Attribute Elements to Complex Primitive Data Types
You can add the following element types as attribute elements to complex primitive data types:
Primitive child.
Primitive peer.
Compound peer.
Collection peer.
You add these elements to complex primitives as you would any other element, first using the action toolbar on the Document Builder - Documents page to add the element to the document tree, and then defining the element properties.
See Managing Primitive Elements, Managing Compound Elements, Managing Collection Elements.
After you create and name a document as the data type for a compound element, you specify the document package, document name, and document version on the Add Compound Child or Add Compound Peer page (IB_LOGICALCOMP_SEC).
When you specify a document as the compound element data type, you can select to use a reference of the document or a copy of the document. Using a reference of the document means that if the document defined as the compound element type is modified, then the changes will be rolled into that document. Using a copy of the document means that the document you define as the compound element type will remain the same, even if the original document is modified in the future.
This example shows specifying the document to add as a compound element data type:
After you search for and select a document, the Document Builder - Documents page appears, and the document appears as a compound element in the document tree. The following example shows the BillTo document added as a compound element to the DEMO_PURCH_ORDER document:
After you create a document as a compound element data type, the document element information appears on the right side of the page. A Go to Child Document link also appears. When you click the Go to Child Document link, the document definition for the compound element appears in a new window.
To define a document as a compound element data type:
Create and name a document as a data type for a compound element.
In the Type drop-down list box, select an option:
Reference. (Default.)
Use a reference of the document.
Copy.
Use a copy of the document.
Specify the document:
In the Package field, enter the document package name or click the Lookup button to search for one.
In the Document field, enter the document name or click the Lookup button to search for one.
In the Version field, enter the document name or click the Lookup button to search for one.
Click the Search button.
The search results appear in the Document List grid.
Select a document from the list.
The Document Builder - Documents page appears, and the document you specified appears in the document tree.
Click the Save button.
After you name a compound element and choose to create a PeopleSoft record data type, you must search for and select the record. As with other compound data types, you use the Add Compound Child or Add Compound Peer page (IB_LOGICALCOMP_SEC), depending on whether you are creating a compound child or compound peer element.
The following example shows the Add Compound Child page when searching for a PeopleSoft record:
After you enter search criteria, the results appear in the Records grid. When you select a record from the grid, the Select Fields to Insert into New Document page (IB_LOGICALFLD_SEC) appears. Use the page to select the fields to include in the document. The fields become primitive elements in the document, and the record fields properties, such as data type and length, become the default primitive element properties in the document.
The following example shows the Select Fields to Insert into New Document page for the ORDER_ITEMS compound element based on the PeopleSoft record, ITEMS:
When you save the information, the record and its fields become a compound document element. In the previous example, you see that the system reads the package name and version from the document definition and supplies the document name in the Document field.
After you provide the document name and click the OK button, the new compound document element that you created from a PeopleSoft record appears in the document tree on the Document Builder - Documents page. The following example shows the compound element, ORDER_ITEMS, appearing in the document tree:
The previous example shows that the system converted the PeopleSoft ITEMS record and its fields into a document called ORDER_ITEMS, and that the document is a compound child element of the DEMO_PURCH_ORDER document.
Click the Go to Child Document link in the properties section of the page to view and modify the ORDER_ITEMS document definition.
This section provides an overview of managing collection elements and discusses how to:
Add collection elements.
Define collection element properties.
Only a collection item that is a primitive or compound data type can be added to a collection element. A Collection can have unlimited Collections as siblings.
Use the Add Collection Child or the Add Collection Peer page, depending on whether you want to create a collection child or collection peer element. The Add Collection Child page and the Add Collection Peer page share the same object page name: IB_LOGICALCOLL_SEC.
You access the Add Collection Child and Add Collection Peer pages using the action toolbar on the Document Builder - Documents page.
The following example shows the Add Collection Child page:
To add a collection element:
Access the Document Builder - Documents page (PeopleTools, Documents, Document Builder).
In the document tree, click the element to which to add a collection child or collection peer element.
On the action toolbar, do one of the following:
Click theAdd Collection Child button to add a collection child element.
Click the Add Collection Peer button to add a collection peer element.
The Add Collection Child or Add Collection Peer page appears, depending on the element you added.
In the Element Name field, enter a name for the collection element.
Click the OK button.
The Document Builder - Documents page appears, and the new collection element appears in the document tree. Note that the collection element icon that appears on the toolbar also appears to the left of the collection element in the document tree.
After you add a collection child or collection peer element to a document, the collection element properties appear on the right side of the Document Builder - Documents page. The following example shows the properties for a collection child element called order_status:
You can define the following collection element properties:
Element Name |
Name of the element as it will appear in the XML document. |
Required |
Select the check box to make the element required. |
Min Occurrence (minimum occurrence) |
The minimum number of instances when populating the document definition with data. As an example, entering a 0 (zero) means that you do not have to populate the collection. Enter the minimum number of occurrences of the collection element in the document. The default value is 1. |
Max Occurs (maximum occurrence) |
This field appears only if the Unbound Maximum field is cleared. Enter the maximum number of occurrences of the collection element in the document. |
Unbound Maximum |
Select the check box to include an unlimited number of occurrences of the collection element in the document. By default, this option is selected. |
Sequence |
The system assigns this read-only field. The sequence number is used for indexing with the PeopleCode API for documents. |