The implementation of Attribution Collections increases the efficiency of data model management, performance and becomes very apparent when working with a large number of attributes (500+). Attribute Collections were introduced to simplify the management of large sets of attributes. Instead of working with an entire attribute group, it is possible to work on a functional subset of attributes.
The subset of attributes can be used to create views, tabs, workflows, inheritance rules, privileges, etc. Associating a subset is more efficient than associating individual attributes.
With the use of Attribute Collections, data is modeled in a more efficient and organized manner. Instead of managing a large amount of attributes for an item, managing them in subsets creates a more manageable dataset.
Attribute Collections were designed to improve performance when fetching and saving an item category where only the attribute selected for a view are retrieved and saved. Limiting the fetching and saving to the attributes in the view could cause issues by saving invalid items. Therefore, core attributes were introduced.
There are two types of core attributes:
- Default core attributes
- User define core attributes
When fetching and saving a record, the attributes included come from the default core attributes, the user defined core attributes and the superset of the attributes included in the single edit and multiple edit views
Default Core Attributes are system defined attributes that are retrieved and saved for every object and include only the attributes that are critical to making sure an item is not saved to the database in violation of key rules; this includes:
- The primary key
- The path attribute (for categories only)
- Any required attributes (either from a primary or a secondary spec)
For other attributes, it is not possible for the system to determine if they are needed or not. In some cases, some validation errors should run for every item, and therefore should be included in the core attributes. For this reason, user-defined core attributes can be added to the total set of core attributes. These attributes are included in an Attribute Collection. For each catalog and category tree, it is possible to associate an Attribute Collection as the user defined core attributes.
User Defined Core Attributes: attributes that are required when an attributes needs to be retrieved and saved for every object; these core attributes are defined per container and could include attributes that need to be validated or calculated every time an item or category is saved; one set of user defined core attributes will be associated per container. When creating user defined core attribute collections, include any required attributes located in secondary specs.
Note: It is recommended for the user defined core attributes to be kept at a minimum to achieve optimal performance. Therefore, remove any unnecessary attributes if they are not needed.
What is an Attribute Collection?
An attribute collection is a group of attributes that will be associated or behave the same way in a given context.
For example, a subset of attributes can be created for an electronic product catalog with an attribute set for features. This section can have multiple feature "types" (technical, marketing, etc.) Therefore, an attribute subset can be created for "technical" attributes and "marketing" attributes.
When defining an Attribute Collection, there are two types available for definition:
- General – used for a collection of attributes that are not associated with inherited attributes (i.e. views, tabs, workflow, etc.). Selecting this type allows the selection of primary or secondary spec attributes.
- Inheritance – used for a collection of attributes that are used to define inheritance rules. Selecting this type allows the selection of sub spec attributes only.
When defining an Attribute Collection, if it is known that the attributes will not be inherited, then select the type "General", otherwise select "Inheritance".
Note: For type "Inheritance", refer to the section "Attribute Collections for Inheritance Rules"
What is the difference between an attribute group, a spec and a subspec?
Subspec
Primary/Secondary Spec
Attribute Collections
A sub-spec is a collection of attributes that could be edited at different levels in the data model. Sub specs are used for inheritance purposes.
Primary specs and secondary specs are full or partial item or category templates. They define the object that will belong to it. They can be made of sub-spec attributes or individual attributes
Note: What was formerly known as hierarchy specs and catalog specs have been replaced by Primary Specs.
Attribute Collections are a group of specs and attributes that will behave the same way in all contexts
Where are attribute collections used?
When the association of an attribute is made to an Attribute Collection, the attribute is made available wherever the Attribute Collection is used. Attribute Collections are used to define the following:
- Access privileges
- Views
- Tabs
- Workflow steps
- Inheritance rules
When are attribute collections created?
An Attribute Collection is defined as a group of attributes that will be associated or behave the same way in a given context. Specifically, a new attribute collection is created to group attributes that share the same characteristics for the following purposes:
- Security – Create a collection of attributes that is used to setup Access Privileges, thus following the same security guidelines (i.e. create a group for all the merchandising attributes that should be edited only by the merchandising users)
- Function – Create a collection of attributes that will be edited or viewed together, as part of the same process, or step; these groups will be used to set up Views, Tabs and Workflow steps (for example, create a group for all the attributes needed for the creation of an item by a supplier in a supplier product introduction workflow)
- Behavior – Create a collection of attributes that inherit their content following the same path (for example, create a group for all marketing attributes that are used for a worldwide catalog and are inherited by a regional catalog)
What is the attribute picker?
The attribute picker is a portion of the attribute collection edit screen that is used to search and select specs and/or nodes to add to an attribute collection. It is planned for this feature to be used in other areas of the application in a future release.
What changes have been made to the GUI to support Attribute Groups?
Several changes were made to the GUI to support Attribute groups and are identified in the following sections.
Attribute Collections are organized in a typical WebSphere Product Center Console format, thus the following standard characteristics apply:
- Console displays Attribute Collection names and descriptions
- Sort names and descriptions by clicking on the column headings
- Console paginates when more than twenty groups exist
- Configure Console to sort and hide columns
- Available buttons to Add, Delete, or Edit an Attribute Collection
- Attribute Collection names are hyperlinked, click to edit a collection
- Click on the checkbox next to an Attribute Collection to delete, then click the Delete button
- Attribute Collections cannot be deleted if the group is associated with a view, a tab, an access privilege, an inheritance rule, or workflow. If this is the case, deletion is not permitted and if attempted, a pop up message indicates where the group is associated
Attribute Collection Console
The Attribute Collection Console is accessed using the menu bar options:
- Console: Data Model Manager > Attribute Collections > Attribute Collection Console
- Create New Attribute Collection: Data Model Manager > Attribute Collections > New Attribute Collection
Attribute Collection Screen
The attribute screen is used to create a new attribute collection or edit an existing one. The screen is segmented into three parts:
- Attribute Collection – Enter Attribute Collection information, display specs and attributes that are associated to the attribute collection
- Attribute Picker - Search for specs or attributes
- Results – View the search results for specs or attributes and make selection for attribute collection
Attribute Collection Information
- Each Attribute Collection requires a name. This can be modified at any time
- A description is optional and can have up to 2000 characters
- Locales can be selected for the given collection; if needed, locales can be added/removed after the collection has been set-up. The implication of selecting a locale means that any localized attributes added to the spec already in the collection will be part of the collection only if they belong to the selected locale.
- The attribute collection type can be either "Inheritance" or "General"
- When creating an attribute collection, click Save in order to display the bottom portion of the screen that allows for searching and adding individual specs, individual attributes or localized node parents. Adding a spec will not add the individual attributes of a spec, rather all the attributes in the spec at the moment the group is called upon will be considered part of the group. Adding individual attributes creates a static list of attributes. It is also possible to add a grouping node when a node is localized.
Attribute Associations to Attribute Collections
View Attribute Collection Association
- To view the Attribute Group(s) that an attribute is associated with, click on the icon next to "Attribute Collection Associations" from the attribute's Detail screen. The "Attribute Collection Associations" screen is displayed.
- Click to view Attribute Group association
- Attribute Collection association screen
- Edit Attribute Collection Associations
- Removing attributes or specs from an attribute collection is performed in the Attribute ollection definition screen.
Note: Generated Default Core Attributes cannot be edited, as they are system generated.
Attribute Picker
The Attribute Picker screen is new to 4.2 and is used to define attribute collections. In future releases, it is planned for this feature to be used throughout the application to select attributes.
- Specs are displayed alphabetically
- Attributes are presented in the order they were setup in the spec
Searching for an Attribute
The search feature in the Attribute Picker was designed to reduce the need to browse through longs lists of attributes. Several search methods are available to the user and are located in the Search section of the Attribute Picker. All results are displayed at the bottom of the screen.
Search by field A user can search using one of the two following fields:
- A Spec Name field where a portion of a spec name can be entered
- An Attribute Path field where a portion of an attribute name can be entered
Search Type
- Specs and Attributes - Display results of Specs and Attributes
- Specs Only – Display results of Specs
Search by Spec Type Select a Spec Type to search for
- Search by Locale(s)
- Select to search by Locale
Results:
The results will either present specs only or specs and attributes depending on the option selected
A locale selection list presents a list of the locales for this company where multiple locales can be selected
A file spec list that allows selecting one or multiple attributes; the list of spec type will be filtered depending on the context (for example, to create a group of type inheritance, the only spec type available should be "subspec")
When a locale is selected and the Spec Only option is selected, the specs that are listed are the spec that have that locale associated with the spec, regardless of whether there are any nodes localized or not
When a locale is selected and the spec and attribute option is selected, the specs that are listed are the specs that have that locale associated with the spec and have localized nodes for the selected locales
The list displays up to 50-100 results per page, with the ability to navigate back and forth between pages. For each page, up to 20-50 attributes are displayed, with a scroll bar to view the rest of them. Going from one page to the next will lose selected attributes. The list will present a list of specs, leaf nodes and localized nodes. Localized node should have a special indication next to them.
Selecting Specs and Attributes
After a search is performed for a spec and/or attribute, the results are displayed in the results section of the Attribute Picker. Select from the list of results and click Selected, or just click All to select the complete list of results. It is possible to also right click on the spec and select "Add Spec" from the short menu.
Localized parent nodes can be selected for an attribute collection.
This section describes how to associate an Attribute Collection to Catalog Access Privileges and Views
Access Privilege Setup
- Previously, access privileges were setup by selecting individual attributes., simply select an Attribute Collection
- Use the search field if there exists a large list of Attribute Collections
- Only Attribute Collections of type "General" is available for selection for access privileges
Setting up Views
Similar to catalog access privileges, Views are created by selecting Attribute Collections, rather than individual attributes. The following are general characteristics of creating views:
- Attributes Groups are ordered, which determine the order in which the specs are displayed.
- The order of the attributes is dependent on their order in the Primary or Secondary Spec to which they belong
Note: Only Attribute Collections of type "General" are available for selection.
Tab Views
Previously, it was necessary to select individual attributes to create Tab Views. This can be can be a huge task when working with items with many attributes. With the introduction of Attribute Collections, the user simply selects from a list of attribute collections to create a Tab View. Any changes to the Attribute Collection will be reflected in the Tab View.
Note: If changes were made to an Attribute Collection, it is necessary to log out and log back in for the changes to take effect in the Tab Views.
If an entire Attribute Collection is not needed, it is possible to select individual attributes as needed.