Server Administration > Item Type Attributes > Setting Up Documents > Creating Document Types
  
Creating Document Types
CLI EQUIVALENT 
im createtype or im edittype
This section describes how to create an example document domain called Requirements, using the three document types: Shared Item, Node, and Segment.
* 
This section assumes you are setting up a document domain for the first time but that you already understand how to create states, fields, and types using the Windchill RV&S administration client. The Administrator documentation explains how to create states, fields, and types.
The following table describes the steps required to create the Requirements document domain:
Task
Supporting Information
Step 1: Create States
Step 2: Create fields
Step 3: Verify values for the Shared Category field
These values represent the available Categories of content or Documents. You can add and remove values in this list.
Step 4: Create the Shared Item type
The Shared Item is created first so it can be used in the definition of the Node type.
Step 5: Create the Node type
The Node is created before the Segment so it can be used in the definition of the Segment type.
Step 6: Create the Segment (Document) type
The final type required for the creation of a new domain.
Step 7: Update Constraints on the Node type
Limits the available Categories for content based on your domain.
This step is required because the constraints for a Node referencing a Segment cannot be created before the Segment type is created.
Step 8: Update the References field to add the new allowed types for heterogeneous document support
After domain types are created, the References field is updated to include those types in the definition.
This step is required to allow a Node (content) to reference a subdocument (Segment) in your new domain.
Step 9: Testing the Document Type Configuration in Windchill RV&S
After your document type is created, you can test how users will view and use it in the Document view.
The Documents user documentation explains how to create and manage documents from the Document view.
Step 1: Create States
The states that you create in this section are the minimum number required to satisfy the example document type created in this procedure. You can choose to create more if they apply to your environment.
1. From the States view, select State > Create. The Create State dialog box displays.
For details on all of the fields and tabs in this dialog box, see Creating States.
2. Create the following states:
Active
* 
To display only the state-based capabilities related to test management, select the Integrity Test filter.
Under the Capabilities tab, to allow test results to be created and modified when a test session item is in the selected state, enable Allow test results to be created and modified in this state.
Open.
No capabilities are required.
Available
No capabilities are required.
3. When you finish creating states, click OK.
Step 2: Create fields
The fields created in this section are the minimum number required to satisfy the example document type created in this procedure.
To learn how to create additional fields as they apply to your environment, see Adding Additional Fields to an Existing Document Domain.
1. From the Fields view, select Field > Create. The Create Field dialog box displays.
For details about the fields and tabs in this dialog box, see Creating Fields.
2. Create the Shared Attachments field.
Under the Values tab:
In the Name field, type Shared Attachments.
In the Display Name field, Windchill RV&S automatically enters the same selected name. Display names are the field titles that users see in Windchill RV&S.
Select Attachment as the Data Type.
No other selections are required in any of the tabs. To learn about all of the options on this tab, see the Fields documentation.
When you finish setting the Shared Attachments field, click OK.
3. Create the Shared Text field:
In the Name field, type Shared Text.
In the Display Name field, Windchill RV&S automatically enters the same selected name. Display names are the field titles that users see in Windchill RV&S.
Under the Values tab:
Select Long Text as the Data Type.
Enable Rich Content.
Select Shared Attachments as the Default Attachment Field.
Enable Create a text search index.
When you finish creating the Shared Text field, click OK.
4. Create the Text field. This step allows you to create an FVA through the References field to the Shared Text field.
In the Name field, type Text.
In the Display Name field, Windchill RV&S automatically enters the same selected name. Display names are the field titles users see in Windchill RV&S.
Under the Values tab:
Select Field Value Attribute as the Data Type.
Select References as the Relationship.
Select Shared Text as the Field.
Under the Editability tab:
Disable Never Editable to make the Text field editable.
Select Compare the value of a field with a constant and set Reference Mode!=Share.
Click Add. The new condition displays in the text box.
For more information on defining conditions and the options available on this tab, see Defining Rules.
When you finish creating the Text field, click OK.
5. Create the Text Attachment field. This step allows you to create an FVA through the References field to the Shared Attachments field.
In the Name field, type Text Attachment.
In the Display Name field, Windchill RV&S automatically enters the same selected name. Display names are the field titles users see in Windchill RV&S.
On the Values tab:
Select Field Value Attribute as the Data Type.
Select References as the Relationship.
Select Shared Attachments as the Field.
Under the Editability tab:
Disable the Never Editable to make the Text Attachments field editable.
Select Compare the value of a field with a constant and set the Reference Mode!=Share.
Click Add. The new condition displays in the text box.
For more information on defining conditions and the options available on this tab, see Defining Rules.
When you finish creating the Text Attachment field, click OK.
Step 3: Verify values for the Shared Category field
The Shared Category field is a built-in field with several predefined values. It is used to define the categories of content for your documents. You do not have to use all of the predefined values for your environment. To learn more about categories in a document, see Categories.
1. From the Fields view, edit the Shared Category field. The Edit Field dialog box displays.
2. Add additional values, or wait until you know the required categories.
3. Ensure Allow Multiple Values is disabled.
4. Ensure Set Default Value is disabled and no values appear in the list. Instead, use an override on each type that uses this field so that the defaults are appropriate for the types.
For information on how to use type overrides, see Setting Type Overrides.
5. When you finish reviewing and changing the Shared Category values, click OK.
Step 4: Create the Shared Item type
1. Ensure that the applicable fields and states were created and the values for the Shared Category field are correct, as described in the three previous steps.
2. From the Types view, select Type > Create. The Create Type dialog box displays.
For information about all fields and nodes in this dialog box, see Creating Types.
* 
This procedure only notes the type properties required to set up the Shared Item type.
3. In the Name field, create a domain name for the Shared Item type. For the purposes of this procedure, use Shared Requirement.
4. Select the Attributes node and define the following in the General box:
Enable Display Workflow and ensure that Phase Field is set to -none-.
Enable May have their tree copied and May be branched.
To learn more about these options, see Configuring Type Attributes.
Enable Use Custom Image, and specify an image to use as the icon for the Shared Requirement.
Enter a descriptive statement for Description, if desired.
5. Select the Visible Fields node and select the following fields:
State
Shared Attachments
Shared Text
6. Select the Document Model node, and define the following:
Specify the role as Shared Item. Setting this field adds other built-in fields required for this role to the selection lists.
Specify the following Significant Edit fields:
Shared Text
Shared Attachments
* 
Whenever you add fields to the Shared Item type that are considered shareable data, you want to add those same fields to the Significant Edit Fields list. Failure to do so can result in overwritten data. Edits to fields in this list update the Input Revision Date on the Shared Item, and, as a result, update the Significant Edit Date on the Node. This list also controls whether content items in trace relationships are marked as suspect when the aforementioned fields are edited. It is possible that the Shared Category field is not listed in the Significant Edit Fields list. However, this field is always treated as significant.
The Significant Edit Date field is synonymous with the former Revision Date field in previous releases of Windchill RV&S.
7. Select the Workflow node, and define the following state transitions, making them available to everyone:
Unspecified --> Available
Available --> Available
8. Define the required additional type attributes for the Shared Requirement type, such as presentation templates.
* 
By default, all fields on the Shared Item are copied, even though the list appears blank and unavailable.
The Types documentation explains all type attribute options.
9. When you finish creating the Shared Requirement type, click OK. The type displays in the Types view in the Windchill RV&S administration client.
10. From the Types view, edit the existing Shared Requirement type that you just created. The Edit Type dialog box displays.
11. Select the Constraints node, click Create, and select the following:
Basic as the Constraint Method.
Shared Category as the Constrained Field.
In Allowed Values, set all shared category values relevant for content associated with this domain type.
12. Select the Overrides For Fields node, click the Shared Category field in the list, and select Edit.
13. Select Override Default Value and set a value. When you create content in this domain, the initial default category is this value.
14. When you finish creating the Shared Item type, click OK.
Step 5: Create the Node type
1. Ensure that the applicable fields, states, and Shared Item type were created and that the values for the Shared Category field are correct, as described in the four previous steps.
2. From the Types view, select Type > Create. The Create Type dialog box displays.
Only the type fields, properties, and attributes in the Create Type dialog box that are required to set up the Node type are described in this procedure. For information about all fields, nodes, and general options in this dialog box, see Creating Types.
3. In the Name field, type a domain name for the Node type. For the purposes of this procedure, use Requirement.
4. Select the Attributes node and define the following:
Enable Display Workflow and ensure that the Phase Field is set to -none-.
Enable May have their tree copied, May be branched and May have labels applied.
To learn more about these options, see Configuring Type Attributes.
Enable Use Custom Image and specify an image to use as the icon for the Node.
Type a Description, if required.
You can optionally permit document versioning on the Node type. To do this, enable May have versions applied.
To learn more about document versioning, see Document Versions.
5. Select the Visible Fields node, and add the following fields to the visible field list:
Project
State
Text
Text Attachments
It is possible that other metadata fields are relevant only on the Node, not as an FVA to a field on the Shared Item. These fields do not require an editability rule to prevent edits when Reference Mode!= Share>.
6. Select the Document Model node and define the following:
Specify the role as Node. Setting this field adds other built-in fields required for this role to the selection lists.
Additionally, a checkbox for hiding this type on a specific menu appears: Hide under Insert Content menu. This checkbox is cleared by default. You would select it only if you wanted to hide the type from the Insert Content menu and related dialog boxes.
* 
Hiding a type affects only the Windchill RV&S GUI and Web interfaces. It does not prevent creation of these items from the CLI and API.
On the settings for the Node, specify the Shared Requirement type you created in Step 4: Create the Shared Item type.
Specify the following Significant Edit fields:
* 
This list controls which edits affect the Input Revision Date on the Node (which also effects the Significant Edit Date). Because the Significant Edit Date on the Node is also updated by significant edits on the Shared Item (Shared Requirement), this list is not as important for updating the Significant Edit Date, or for setting items as suspect.
Text
Text Attachments
Category
* 
It is possible that the Contains and Contained By fields are not listed in the Significant Edit Fields list. However, these fields are always treated as significant.
7. Select the Copy Fields node and add the fields that you want to copy to the list. These fields are copied by default when the Node is copied, branched, or a related item is created. Users can override these default fields by adding and removing any fields that they can view and edit.
8. Select the Workflow node and define the following state transitions to make them available to everyone:
Unspecified --> Active
Active --> Active
9. Define any required additional type attributes for the Node type, such as presentation templates. All type attribute options are described in the Types documentation.
10. When you finish creating the Node type, click OK. The new Requirement Node type displays in the Types view in the Windchill RV&S administration client.
11. Edit the Requirement Node type that you just created. The Edit Type dialog box displays.
12. Select the Constraints node, click Create, and select the following:
Field Relationship as the Constraint Method.
Referenced Item Type as the Field (under Source Field and Values).
Shared Requirement as the Value (under Source Field and Values).
Category as the Constrained Field.
Under Value Constraints, you want the Allowed values for category to match the list on the Shared Item constraint list. See Step 4: Create the Shared Item type for details.
* 
You need to create the second constraint after the Document Referenced Item Type is created.
13. When you finish setting constraints for the Node, click OK.
Step 6: Create the Segment (Document) type
1. Ensure that the applicable fields, states, Shared Item type, and Node type were created and that the values for the Shared Category field are correct, as described in the five previous steps.
2. From the Types view, select Type > Create. The Create Type dialog box displays.
For more information about all fields and nodes in this dialog box, see Creating Types.
* 
This procedure only notes the type properties required to set up the Segment type.
3. In the Name field, type the domain name for the Segment (document) type. For the purposes of this procedure, use Requirement Document.
4. Select the Attributes node and define the following:
Enable Display Workflow and ensure that Phase Field is set to -none-.
Enable May have their tree copied, May be branched, and May have labels applied. To learn more about these options, see Configuring Type Attributes.
Enable Use Custom Image and specify an image to use as the icon for the Segment.
Type a descriptive statement for Description, if desired.
You can optionally permit document versioning on the Segment type. To do this, enable May have versions.
To learn more about document versioning, see Document Versions.
5. Select the Properties node and define the following two (suggested) properties:
MKS.RQ.Domain
Type Requirement as the domain Value. You can use this property in conjunction with the Segment Shared Category value to define the values in the Create Document dialog box.
For more information, see article CS122709 on the PTC eSupport Portal.
MKS.RQ.item.editissue.title
Type Properties for {Summary} as the Value. This property gives a meaningful title to the edit dialog box for the Document Properties item.
6. Select the Visible Fields node and the following fields:
Project
Summary
State
Shared Attachments
Shared Text
7. Select the Document Model node and define the following options:
Specify the role as Segment. Setting this field adds other built-in fields required for this role to the selection lists.
Additionally, two checkboxes for hiding this document type on specific menus appear: Hide under Create Document menu and Hide under Insert/Include New Document menu. Neither of these checkboxes is selected by default. You would select one or both of these checkboxes only if you wanted to hide the type from the respective menu and related dialog boxes.
* 
Hiding a type affects only the Windchill RV&S GUI and Web interfaces. It does not prevent creation of these items from the CLI and API.
On the settings for the Segment, specify Requirement as the Node type that you created Step 5: Create the Node type.
8. Specify the following Significant Edit Fields:
* 
This list control which edits affect the Input Revision Date on the Segment, which in turn affects the Significant Edit Date.
Shared Attachments
Shared Text
* 
It is possible that the Shared Category, Contains, and Contained By fields are not listed in the Significant Edit Fields list. However, these fields are always treated as significant.
9. For Print Report, select the format that you want for the printed output that the user sees when they print a document of this type in Windchill RV&S. You want to design reports to print the entire document. You can use any administration report for printing a document. For more information, see article CS229164 on the PTC eSupport Portal.
10. Select the Group Document checkbox if you want to use this item type to reorder or group content. You cannot create or edit meaningful content in a group document.
For example, you can use the Test Group to collect test cases for test execution. Tests can be authored in test suites, based on functional or architectural structures, and linked to the requirements that they verify. Grouping tests makes it easy for the author to ensure complete testing coverage. In some testing environments, not all tests in a suite are executed at the same time. The Test Group can be used to organize a subset of test cases for each environment, with unique testers and scripts. For more examples of using grouping in test management, see the PTC eSupport Portal at:
https://www.ptc.com/en/support
11. Set Default Reference Mode to Reuse or Share.This setting controls how copied content is copied or branched into documents of this type. The typical default mode is Reuse.
12. Select the Copy Fields node and add the following fields and any other relevant fields to the list. These fields are copied by default when the Document item is copied, branched, or a related item is created:
Summary
Shared Text
Shared Attachments
Shared Category
Users can override these default fields by adding and removing any fields that they can view and edit.
13. Select the Workflow node and define the following state transitions to make them available to everyone:
Unspecified --> Open
Open --> Open
14. Define the required additional type attributes for the Segment type, such as presentation templates. All type attribute options are described in the Types documentation.
15. When you finish creating properties for the Segment type, click OK. The new Segment type now displays in the list of Types.
16. Edit the existing Requirement Document Segment type that you just created. The Edit Type dialog box displays.
17. Select the Constraints node, click Create, and select the following:
Basic as the Constraint Method.
Shared Category as the Constrained Field.
Document as the Allowed Values.
Click OK.
18. Select the Overrides for Fields node and edit the Shared Category field.
19. Select Override Default Value and select Document as the Value. When you create content in this domain, the initial default category is Document.
20. When you finish setting the properties for the Segment type, click OK.
Step 7: Update Constraints on the Node type
1. Edit the existing Requirement Node type that you created in Step 5: Create the Node type. The Edit Type dialog box displays.
2. Select the Constraints node, click Create, and select the following:
Field Relationship as the Constraint Method.
Referenced Item Type as the Field (under Source Field and Values).
Requirement Document as the Value (under Source Field and Values).
Category as the Constrained Field.
Document as the Allowed values (under Value Constraints).
3. When you finish updating constraints on the Node, click OK.
Step 8: Update the References field to add the new allowed types for heterogeneous document support
1. From the Fields view, edit the References field. The Edit Field dialog box displays.
2. Under Types, select the new Node type. For this case, select Requirement.
3. Select the correct Segment type from the list of Available Types. For example, select Requirement Document and move it to the Allowed Subsegment Types section using the arrows.
4. Save your changes.
Step 9: Testing the Document Type Configuration in Windchill RV&S
After you finish setting up the document type in the Windchill RV&S administration client, you can test it by creating a document using the Document view in Windchill RV&S.
1. Create a project in the Windchill RV&S administration client.
For more information on creating projects, see Creating Workflow and Document Projects.
2. From the Document view, select Document > Create > New.
3. For the document that you are creating, select the project that you created.
4. In the Short Name field, type a name for your document.
5. Edit the properties of the document as required.
For information about using Documents in the Windchill RV&S client, see the Documents topic in the user documentation.
6. Save your changes. The document that you created opens in the Document view containing a single virtual row.