17.10. Tutorial: Creating a Widget Catalog

The following tutorial contains step-by-step instructions for creating a catalog in EKM. Sample files are provided for your convenience.

Scenario

Your company produces “widgets”. Currently there are 10,000 widgets that are all fairly similar, except they have different diameters, lengths, materials, and pressure ratings. All of your widgets are stored in a single folder in the EKM repository. Every time you try to browse that folder, it takes a long time for all 10,000 widgets to load. Also, browsing through a list of 10,000 widgets is tedious and time-consuming. Rather than loading the entire list of widgets every time you browse this folder, you would like to be able to specify certain criteria beforehand so that only a targeted list of widgets is displayed. This will decrease load time and make it easier to find the widgets that you are looking for.

Goals

Using the sample files you will:

  1. Add a custom catalog type and object type to your workspace configuration.

  2. Create a Widget catalog in the EKM repository.

  3. Add Widget objects to the catalog.

  4. Search the catalog to find a single Widget out of thousands.

Step 1: Define Custom Types

An administrator needs to define and configure two custom types for your workspace: a catalog type and an object type.

Because the definition and configuration of custom types is beyond the scope of this User’s Guide, we have defined these custom types for you. All you need to do is add the sample files to your workspace configuration. For information about defining custom types, see Defining a New Custom Type in the EKM Administration Guide.


Note:  In order to configure custom types for your workspace, you must perform a restricted configuration, which can only be done by the user designated as the Root User. Starting a restricted configuration logs out other users and locks down the workspace while you are configuring it. You may need to notify other users that the workspace will be inaccessible while you perform this configuration.


To add the sample files to your workspace configuration:

  1. Sign in to the workspace that you want to configure. You must be the designated Root User for the workspace.

  2. Go to the Administration section. Click the Configure button and select Begin Workspace Configuration.

  3. Click OK to continue.

  4. On the Configuration page, open the Custom Types folder.

  5. Upload the following two sample files from the EKM_HOME\examples\conf\customTypes folder:

    Widget.type.xml
    WidgetCatalog.type.xml

    Understanding Custom Types

    It would be a good idea to have a quick look at the content of the files that you added to your workspace configuration, so that you understand how they are used when catalogs are created.

    Widget Catalog Type

    To view the definition of the Widget Catalog type, right-click the WidgetCatalog.type.xml file and select Edit > Custom Type. The Edit Custom Type dialog box appears:

    On the General tab we can see that the file defines a folder type named Widget Catalog, which is an extension of the built-in Catalog type. This means that Widget Catalog will be one of the available folder types when you create a new folder in the repository.

    On the Children tab there is one child defined whose type is Widget. This means that Widget will be an available choice when adding content to a folder whose type is Widget Catalog. The Name field is left blank because each widget will have a unique name. The Is List check box is enabled to specify that widgets will be displayed in a list.

    On the Type Attributes tab, a widget- prefix has been assigned to the child, which means that the name of each widget created will start with widget- (for example, widget-1, widget-2, and so forth).

    Widget Object Type

    To view the definition of the Widget object type, right-click the Widget.type.xml file and select Edit > Custom Type. On the General tab of the Edit Custom Type dialog box, an object type named Widget is defined. The Widget object type extends from the Folder type so that widget objects can contain all the files related to the widget.

    Select the Properties tab to view all of the properties that are to be associated with widgets. When you create a new widget object in the catalog, you will be prompted to define its Diameter, Length, Material and Pressure Rating.

  6. Click Cancel to continue with the configuration.

  7. Click the Configure button and select Accept Workspace Configuration.

  8. In the Accept Workspace Configuration dialog box, click Accept.

Step 2: Create a New Catalog Folder

With your custom types configured, you can now create a folder for the new catalog.


Note:  This task can be performed by any user with Create permission.


  1. Navigate to the folder in the repository where you would like the catalog to reside.

  2. Select   (New) > Folder.

  3. In the New Folder dialog box, type My Widget Catalog in the Name edit box, and then select Widget Catalog from the Type drop box. (Widget Catalog is available in this drop box because you added the custom Widget Catalog type to your workspace configuration.)

  4. Click OK. A new, empty widget catalog is created. Notice that the catalog has a unique icon next to its name to differentiate it from standard folders.


    Note:  Selecting the catalog in the file list window or breadcrumb will launch the Advanced Search dialog box. If this occurs, click Cancel in the dialog box to continue.


Step 3: Add Content to the Catalog

Now you can populate the catalog with widgets.

  1. In the file list window, right-click the new My Widget Catalog item and select New > Widget. This tool is available because it is defined in the WidgetCatalog.type.xml file. The New Widget dialog box appears. Notice that the fields in this dialog box (Material, Diameter, Pressure Rating, and Length), are all items that are defined in the Widget.type.xml file.

  2. Define the following three widgets by filling out the Material, Diameter and Length fields for each widget. Note that the widgets will be named for you automatically based on the childObject-Prefix type attribute in the Widget Catalog type definition.

    widget-1: Material = aluminum, Diameter = 2.0, Length = 2.0
    widget-2: Material = aluminum, Diameter = 1.0, Length = 1.0
    widget-3: Material = steel, Diameter = 0.5, Length = 0.5

    Note:  In a real-world scenario a catalog would likely contain hundreds or thousands of objects and multiple object types. However, the files that you created are sufficient for this demonstration.


Step 4: Search the Catalog

Imagine now that the catalog contains thousands of widgets. You would like to find the widgets that meet the following criteria:

Material: aluminum
Diameter: greater than 1.2

Follow the steps below to find the widgets that meet the above criteria.

  1. In the file list window, select My Widget Catalog. The Advanced Search dialog box appears.

  2. From the Object Type drop box, select Widget.

  3. In the Property pane, select Material. Then, in the Expression pane, define the condition for the Material property, as shown below.

  4. In the Property pane, select Diameter, and then define an expression with a condition of Greater Than and a value of 1.2.

  5. Click OK. The catalog is searched. The search results are displayed in the file list window. In this case you can see that widget-1 meets your search criteria.

Step 5: Save Your Filter Expressions

You can save the filter expressions that you defined as a filter, so that you can instantly load them again in the future without having to redefine them.

  1. In the file list window, click   on the Views toolbar.

  2. In the Save View dialog box, select My View to save the view as a private view, and then type My Widget Search Results in the Name edit box.

  3. Click OK. The saved view now appears in the drop box on the Views toolbar, as shown below:

    You will now be able to load the saved view at any time by simply selecting it in the drop box. Loading a saved view executes the search again.

Summary

By completing this tutorial you have learned how to:


Release 18.2 - © ANSYS, Inc. All rights reserved.