Industry Standards Data Clean Up

When it is necessary for users to update to a newer version of an industry standard already in use, you must first remove the old industry standard. However, the removal process can be complex. For example, products have a lot of values, including those shared between two or more products, and attribute validity is inherited from classifications. These classifications link to attributes, which in turn can use both lists of values and specialized units. There are also specific references and object types.

This guide provides methods for cleaning up old data efficiently, eliminating most manual deletions.

Clean Up Process

To describe this process, consider the following use case example: 'I want to delete ECLASS version 9.1'.

Fully cleaning the system of old data involves:

  1. Deleting all classifications associated with ECLASS 9.1. This is a simple process for application classes, but block and aspect classes are shared under a common root node.

  2. Deleting all attributes with values associated with ECLASS 9.1, unless they are shared with other versions of the standard.

  3. Deleting all LOVs used by the attributes being deleted, unless they are shared with other versions of the standard.

  4. Removing all units used by the LOVs and their attributes, unless they are shared with other versions of the standard.

  5. Removing all ECLASS 9.1 product-to-classification reference and all ECLASS 9.1 object types.

Important: To prevent a user from accidentally starting a clean up process, the process can only be triggered via JavaScript. Additionally, considering the magnitude of the process, each process runs as a background process (BGP).

To accomplish all of this, the user must follow a specific clean up process.

Unlink products from classifications

  1. The user should begin the process by ensuring no products are linked to the 9.1 classification hierarchy. There are two ways to accomplish this: either search all product nodes that include a 9.1 reference, or run the business action—if no references exist, the business action will have no effect. Checking for product links ensures the user can delete the classifications without any objections during the deletion process. If no values were removed from 9.1 during migration to a newer standard, this step will orphan all ECLASS 9.1 attribute values. However, this is not an issue as they will be removed in the next step.

  2. Create a new business action. Much of the needed logic is built into the tool, so set the business action validity to 'All objects'. As an example, the business action might look like this:

    Logger.info(IndustryStandardHome. disconnectClassificationHierarchy(“0173_9.1”, null, null));

    This rule would require the following binds:

    If required, restrictions can be set for deletions to only apply to ECLASS 9.1:

    Logger.info(IndustryStandardHome. disconnectClassificationHierarchy(“0173_9.1”, “ECLASS_EclassVersion”, “0173-1#11-ECLASS9.1#001”));

    If targeting the 9.1 classification root node directly, this extra line is not necessary.

  3. Save the business action.

  4. In System Setup, select the newly created business action, display the right-click menu, and click Test Business Rule. For details, refer to the Testing a Business Rule topic in the Business Rules documentation.

  5. In the Test & Time Business Rule dialog, uncheck 'Rollback changes after test' and click Test. A successful test will return a BGP ID.

  6. Navigate to the BGP via the ID. Runtime depends on the number of products.

Data model clean up

Once the product classification links are deleted, the data model, which is built upon the classification 'Industry Standard Home', can be dismantled:

removeClassificationsInBackgroundProcess(String classification, String attribute, String value)

Note: This step removes the specified classification and all children, attached attributes, units, unit groups, and LOVs:

  • If an attribute value is specified, the value must be present in the node for it to be deleted. The node is assumed to be multivalued (separation is not supported).

  • If it is the only value in the node, the node is deleted.

  • If the value is one of several, the value is removed from the attribute, and the node is marked as 'updated' instead of being deleted.

  • If the attribute is not valid for a particular node's object type, it is ignored.

This operation will run on the main ECLASS root node, and because it is the root node, you must specify that the method will only remove ECLASS version 9.1. The ECLASS version is stored in the multivalued attribute 'ECLASS_EclassVersion', and the ID of the version is used for the LOV.

Run the JavaScript with the same settings and same binds used in the previous section:

Logger.info(IndustryStandardHome. removeClassificationsInBackgroundProcess (“0173_Classification_Root”, “ECLASS_EclassVersion”, “0173-1#11-ECLASS9.1#001”));

As the process runs, it provides updates on what is being done, including the number of classifications, attributes, LOVs, and units deleted. If units are shared between multiple versions of ECLASS, they are either updated to the new version or ignored.

Unit clean up

ECLASS delivers unit definitions as a global file valid for all segments, and if units have never been used by an attribute, they are not deleted by the previous step, so additional work must be done to clean up units.

Run the JavaScript with the same settings and same binds used in the previous section to clean up all units:

Logger.info(IndustryStandardHome.removeUnitsInBackgroundProcess(”0173”, “ECLASS_EclassVersion”, “0173-1#11-ECLASS9.1#001”));

To remove only ECLASS 9.1 attributes, define prefix '0173', which is the organization identifier for ECLASS, and the import version attribute.

Note: JavaScript API is fully documented in the Technical Documentation, available at [SaaS Environment URL]/sdk or accessible from the Start Page.

Manual tasks

Once the previous steps are complete, remove version 9.1 references and object type. ECLASS Advanced is currently the only standard in STEP in which the entire data model is predefined, so this task is not supported by a simplified process. References and object types must be removed manually via the workbench.