Important Note:
This wiki page is part of the use case where, the EBOM Tree is restructured after the establishment of MBOM structure, which in turn causes Item-Product Link inconsistencies. This should not be considered as best practice.
To tackle this problem, two use cases are prepared with custom business logics:
Use Case 1: Keep Same Instance Name After Drag and drop [This Page].
Use Case 2: Reroute Item-Product Inconsistent Links After Restructuring of EBOM Structure (Based on alias of Previously Linked Physical Product) [DELPLMFProcessInstance_RerouteUserListCandidates_ID] (Please click on the link)This document is intended to provide a detailed guide and examples on how to customize a Business Rule for opening ID "PLMIdentificationInitialization".
Introduction
In certain situations, it may be necessary to modify the EBOM Structure, allowing for parts to be transferred from one parent Physical Product node to another through a drag-and-drop action. This process results in the cloning of the Physical Product that is being moved, as well as the renaming of the newly created Physical Product Instance with Unique ID as prefix. Typically, if the parent node to which the Physical Product is moved does not already contain another instance of the same Physical Product, the instance name is updated by replacing the suffix with ".1" (though this may not be always guaranteed). Conversely, if another instance exists, a Unique ID is generated for the Prefix.
The opening ID "PLMIdentificationInitialization" is the entry point to customize the business logic to customize the attributes of objects after a "New" object is created, or Duplicated ("Cloning"), "Implicit" creation by factory APIs .etc. Please find the details here.
If the restructuring of the EBOM structure gets performed subsequent to the establishment of the Mfg. Item Structure, the connections/Links between the EBOM and MBOM structures may become inconsistent. In order to utilize the "Manage Item - Product Links Inconsistency" command for addressing these inconsistencies, it may be essential to retain the instance names of the Physical Products following the drag and drop action.
Here, we will see, how to use the opening ID "PLMIdentificationInitialization" to keep the instance names of Physical Products after drag and drop.
Version Tested on – 2024x FD04 FP.CFA.3432, 2025x FD01 FP.CFA.2506
Pre-requisites:
Licenses –
- PPL (Process Engineer): Required to create Mfg. Item Structure, Process objects and Work Instructions
Disclaimer: Licenses mentioned above are as per 2024x and 2025x documentation.
| PLM Opening ID | PLMIdentificationInitialization |
| Environment Availability |
|
| Customization Intent | Execution |
| Execution Context |
|
| Usage | The goal of the BL is to initialize the identification or attributes values. |
Out of the Box Behavior After Drag and Drop
Let's consider the example data set given below.
If the 3DPart "BatteryCell.31" instance is dragged and dropped from "Compartment1" to "Compartment2" as given below:
Then the Instance ""BatteryCell.31" will be renamed to "BatteryCell.1" as given below:
Similarly, if the 3DPart "BatteryCell.32" is moved under the root "Battery", it will be renamed to ""BatteryCell.1"
This conduct may be inappropriate when the "Manage Item - Product Links Inconsistency" command is attempting to locate a Physical Product Instance for rerouting on the inconsistent link. As the search is performed with the Instance Name of the previously linked Physical Product.
Behavior After Customization
Upon the deployment of the customized BL, the "Instance Name" of the Physical Product Instance will remain unchanged following the drag-and-drop action.
For ex. If the 3DPart "BatteryCell.31" is dragged and dropped from "Compartment1" to "Copmartment2" node, the "Instance Name" of "BatteryCell.31" will kept as it is (Basically it is copied from the previous instance).
Also, if the 3DPart "BatteryCell.32" is dragged and dropped under the root "Battery", then also it's "Instance Name" will be kept as it is.
Working of The Business Rule
When the BL is triggered, it checks if the BL is triggered for "VPMInstance" or not. If the BL is triggered for any other Fact Type, the BL gets terminated.
/* checking Rule calling context */
if ((ThisObject->IsSupporting("VPMInstance") == true)){
/*This if section is a custom code. added to check if BL triggered for VPMInstance*/
if (Parameters->HasAttribute("OperationId") == true) {
Trace (1, "PLMIdentificationInitialization ID triggered for Operation: ", Parameters->GetAttributeString("OperationId") )
set CurrentOperationType = Parameters->GetAttributeString("OperationId")
}
if (Parameters->HasAttribute("OperationDetail") == true) {
Trace (1, "PLMIdentificationInitialization ID triigered for, OperationDetails: ", Parameters->GetAttributeString("OperationDetail") )
}
Parameters.Severity=0 //Set theat the BL call is valid
/* Notify("PLMIdentificationInitialization ID Invoked for VPMInstance") */
}
else{
Trace (1, "PLMIdentificationInitialization ID: ERROR, Called on an Invalid Object type" )
/* Custom: Notify("Wrong BL Call for object: ", ThisObject.PLM_ExternalID) */
/* Below lines are OOTB. They are commented as they cause issues if BL is triggered for objects other than VPMReference*/
Parameters.Message="wrong usage of rule PLMIdentificationInitialization"
Parameters.Severity=3 //Set the BL Error Severity to 3
Report("Error",Parameters.Message, Parameters.Message) //Report amassage for BL Call on worng type
}If the object is "VPMInstance", take the instance and its "Reference". Using the V_Name of the reference, generate a unique instance name which can be used to name the instance of the object if it is created "Newly".
set currentVPMInstance = ThisObject //Get the instance of current Physical Product
set CurrentVpmRef = Parameters.GetAttributeObject("Reference") //Get the Reference of current Physical Product
if (CurrentVpmRef <> NULL)
{
set CurrentRefTitle = CurrentVpmRef.V_Name //Get the Title of Current Product Reference
set UniqueKey = GetUniqueKeyFromString(CurrentRefTitle) //Get Unique Key (Suffix) for Current V_Name under the parent object
set NewInstanceName = CurrentRefTitle + "." + UniqueKey //Add V_Name and Unique key (Suffix) together to form unique instance name
/* Notify("Complete Name: ", NewInstanceName) */
} If the object is "Cloned" (Duplicated), then set the "Instance Name" of the current instance with the "Instance Name" of instance from which it was cloned. Else, set the "Instance Name" of current instance with the unique name generated from the "V_Name" of the reference.
if (CurrentOperationType == "Cloning")
{
//If the operation performed is drag and drop (Clonning), get the instance from which it is cloned
set copyFromVPMInstance = Parameters.GetAttributeObject("CopyFrom")
if ((currentVPMInstance <> NULL) and (copyFromVPMInstance <> NULL))
{
IsCreatingNewObject = false //Set the IsCreatingNewObject to false if operation performed is clonning
ThisObject.PLM_ExternalID = copyFromVPMInstance.PLM_ExternalID //Set the current Instance name same as previous instance name
/* Notify("VPMInstance Cloned From: ", copyFromVPMInstance.PLM_ExternalID) */
}
else if(IsCreatingNewObject== true)
{
ThisObject.PLM_ExternalID = NewInstanceName //Set new instance name for current instance
/* Notify("Created VPMInstance with OOTB Logic with Name: ", currentVPMInstance.PLM_ExternalID) */
}
}
else
{
ThisObject.PLM_ExternalID = NewInstanceName //Create new instance name for current instance
/* Notify("New Instance name with OOTB Logic: ", currentVPMInstance.PLM_ExternalID) */
}Sample BL
Important Note: The Opening ID "PLMIdentificationInitialization" gets triggered when any type of PLM Object is created (New, Clone or other operations). When the Opening ID "PLMIdentificationInitialization" gets triggered, it tries to find the BL "PLMIdentificationInitialization.CATRule" in the "3DExperience_Installation\\win_b64\\resources\\knowledge\\scripts" folder. If the BL is not available, it goes for type specific BLs to manage the Attributes Initialization. For example, BL "ENONT_VPMReference_BLInitialization.CATRule" is called for "VPMReference". However, if the BL "PLMIdentificationInitialization.CATRule" is available in "3DExperience_Installation\\win_b64\\resources\\knowledge\\scripts", then it gets called for each type of PLM object after creation and does not go to type specific Attribute Initialization BLs.
Due to the above reason, it is recommended to deploy this sample BL only using "Data Setup" for Fact Type as "VPMInstance". If the BL is deployed using "CATRule", it may cause issues to create objects of another types.Logical Flow of Sample BL
How to Deploy
You may refer the below page for Business Rule deployment.
For deployment using Data Setup app following Resource set ID and opening needs to be used:
Resource Set ID:
Opening ID:
Fact Type:
It is recommended to deploy the BL only using Data Setup for "Fact type" = "VPMInstance"
Authors
For any queries, please reach out to @KA @KK
