Controlling Editability of Manufacturing Specifications Using Business Logic (BL)

To ensure process integrity and compliance, as an administrator you can control access to fastener specifications such as drilling parameters, torque values, and other settings using Business Logic (BL).

By defining a BL, you can determine the editability of specifications for an input fastener instance. This returns a Boolean value, which will be used in the Fastening app to either allow or restrict the user from defining specifications.

Notes:
  • The return value true or false is applicable to all specifications.
  • The Fastener Specifications command can work in Authoring context. It automatically evolves the fastener instance if a specification is added or modified. But due to this BL, the modification of specification itself is forbidden and hence the fastener instance is not modified. This stops the automatic instance evolution. In other words, the user loses the advantage of the automatic instance evolution at the end of the Fastener Specifications command.

    In this case, the user must manually evolve the fastener instance using the Evolve Instance command before running Fastener Specifications on the evolved instance.


Before you begin: You are granted the Owner role to access the Data Setup and Engineering Specification Capture & Reuse apps.
See Also
About Editability of Manufacturing Specifications
About Data Setup for Fastening
Optimizing Fastener Specifications
  1. Select Fastening business logic resources in the right panel.
  2. Add a new resource table by right-clicking it.

  3. Select the BL opening that you want to customize, and chose the assigned resource.

  4. In the Select a Business Rule dialog box, create a new rule.

    Example of a script

    Let’s assume that there is an attribute “V_description” on FastenerInstance A rule is applied where if its FROZEN value is true, specification definition is restricted; otherwise, specification definition is allowed.

    //The specification editability computation logic..
    //The below code computes editability of specifications for each fastener instance and returns a list of boolean flags.
    
    let ListOfInstances(list)
    set ListOfInstances = ThisObject
    Let ListOfEditabilityFlags(List)
    set ListOfEditabilityFlags = Parameters->GetAttributeObject("oEditabilityFlagsList")
    if( ListOfEditabilityFlags <> NULL)
    {
        let idx = 1
        for idx while idx <= ListOfInstances.Size()
        {
            let fsxInstance(VPMInstance)
            set fsxInstance = ListOfInstances[idx]
            if( fsxInstance <> NULL)
            {
                let str(String)
                set str=fsxInstance.V_description
                
                if(str == "FROZEN")
                {
                    ListOfEditabilityFlags.SetItem(false, idx)
                }
                else
                {
                    ListOfEditabilityFlags.SetItem(true, idx)
                }
            }
            else
            {
                Trace(1, "instance is NULL")
            }
        }
    }
    else
    {
        Trace(1, "ListOfEditabilityFlags is NULL")
    }
    if( ListOfInstances.Size() <> ListOfEditabilityFlags.Size())
        Trace(1, "Editability flags for all instances are NOT computed!")
    Parameters->SetAttributeObject("oEditabilityFlagsList", ListOfEditabilityFlags)
    Parameters->SetAttributeString("oMessage","For all restricted fasteners Description value is FROZEN")
    
    

    For more information, see About Editability of Manufacturing Specifications.

  5. Add the script in the BL script editor.

  6. Save the information in the database.
  7. Drop this new resource to the required collaborative space.
    The BL script is taken into account.