CATRule for Unique Names for Textual Instructions

Using this CATRule, you can verify if you have entered a name (title), in Work Instruction Quick-Edit-UI, which is unique for the WI under its parent-operation. The data created in Work Instructions is published and imported in Manufacturing Operation Management (MoM). The duplicate names of Work Instructions cause an error in MoM importing and then necessitate rework: modification, re-export, and routing to MoM.

This page discusses:

General Information

The following table provides you with information related to the definition of the opening ID.
PLM Opening ID DELWKIUniqueNameCheck_BL_ID
Customization intent Execution
Execution context Client
CATRuleExit DELWKIUniqueNameCheck.CATRuleExit
Sample CATRule DELWKIUniqueNameCheck_SAMPLE.CATRule
This BL is invoked only when you specify a valid CATRule file for DELWKIUniqueNameCheck_BL_ID in CATRuleExit (DELWKIUniqueNameCheck.CATRuleExit).
  • The CATRule specified for this open ID (DELWKIUniqueNameCheck.CATRule) does not exist by default in the installation (..\resources\knowledge\scripts).

    Hence, the unique-name-check is not invoked with default installation.

  • If you make a valid CATRule file available, then the BL is executed successfully.
  • There is an example BL (DELWKIUniqueNameCheck_SAMPLE.CATRule) in the installation for guidance.
This BL is invoked in the following cases to verify the uniqueness of the name:
  1. You edit the name of WI in Quick-Edit-UI and it loses focus.

    A yellow-message warns you if the name is not unique.

  2. When you click Apply or OK.

    If the name you provided is not unique following modal error, a message appears, and you can commit the changes from Quick-Edit-UI only if you provide a unique-name.



Input Objects

Input Object Read/ Write Type Comments
ThisObject

WorkInstruction instance edited in Quick-Edit-UI.

Notes: “ThisObject” would be one of the following types - DELWkiInstructionInstance, DELWkiDataCollectInstance, DELWkiAlertInstance, DELWkiSignOffInstance, DELWkiDataCollectPlanInstance.

in_NameFromEditBox Read String Name (title) you entered in the Title field in Quick-Edit-UI.

Output Objects

Output Object Read/ Write Type Comments
out_IsNameUnique Write Boolean Output status provided by the BL.

Sample

A complete example file is available in ..\resources\knowledge\scripts\DELWKIUniqueNameCheck_SAMPLE.CATRule.

Sample-BL does the following:

  • Gets the name that you entered in the edit field (in BL-parameter - in_NameFromEditBox )
  • Gets the sibling of current Work Instruction Instance.
  • Loops over each sibling:
    • Gets the Work Instruction Reference for the item
    • Checks if the name provided in the edit field is already a name of WI-Reference.
    • If it is the same, the BL-Parameter out_IsNameUnique is specified as FALSE.