Introduction
This Wiki page provides guidelines to customize the Business Logic (BL) to copy custom attributes on an instance of an Mfg. item (if you have any) when the position of the Mfg. Item is changed in the tree structure.
Note :- In the settings of the custom attribute you can set the property "Reset when duplicated" as false and that would obtain the same result as using this BL.
This BL gets triggered after an Mfg. Item is moved in the tree structure.
The below provided example describes how this can be achieved.
Version – 2024x FD06 (FP2450) & 2025x FD01 (FP2506).
Pre-requisites:
Licenses –
PPL(Process Engineer): required to create Mfg. Assembly object.
Disclaimer: Licenses mentioned above are as per 2024x and 2025x documentation.
| PLM Opening ID | DELPLMFProcessInstance_BLInitAfterMoveID |
| Customization intent | Execution |
| Execution context | Client |
| Usage | Executed after an Mfg. item is moved in the tree |
OOTB Behaviour
When an Mfg. Item is moved within the tree structure the reference of the Mfg. Item is not altered but the instance of that Mfg. Item changes. In OOTB behavior the new instance which is created gets the same instance name, description and other OOTB attributes copied from the original instance information. But if you have any custom attribute value set in the original instance, that value doesn't get copied in the newly created instance. To achieve that we can use the Business Logic (BL) in the below provided example.
| Input | Results |
| Scenario | Drag and drop Sub Assembly from Root Assembly 1A to Root Assembly 2A |
|
Only the OOTB attributes like Name and Description are copied, but custom attributes are reset |
Example: Initialize custom instance attribute values when changing the position of Mfg. Item in the tree
In this example we are using a custom attribute "tor_TorqueValue" which is present in the instance information of an Mfg. Item.
When an Mfg. Item is relocated in the tree using this BL we can copy the value of this custom attribute "tor_TorqueValue" from the old instance to the newly created instance of that item.
Logical Flow
Business Rule
Detailed Description
In this BL the first step is to get the original instance information from the Parameters of the Opening ID.
Logic to get the original instance information
//fetch the original instance from the Parameters
if ( true == Parameters.HasAttribute("iOriginalInstance"))
{
set originalInstance = Parameters->GetAttributeObject("iOriginalInstance")
}After getting the original instance we check whether the instance information has the attribute "tor_TorqueValue" and if yes, we copy it and paste it onto the new instance.
Logic to get the value of custom attribute tor_TorqueValue and initializing it in the new instance.
//check if the instance has attribute "tor_TorqueValue" and if yes fetch it
if( originalInstance->HasAttribute("tor_TorqueValue") and ProcInst->HasAttribute("tor_TorqueValue"))
{
TorqueValue = originalInstance->GetAttributeReal("tor_TorqueValue")
//initialize the "tor_TorqueValue" value to the newly created instance
ProcInst->SetAttributeReal("tor_TorqueValue", TorqueValue)
}Example Scenario
| Input | Results |
| Scenario | Drag and drop Sub Assembly from Root Assembly 1A to Root Assembly 2A |
|
The custom attribute tor_Torque Value gets copied onto the new instance
|
Note:-This business logic doesn't influence perimeter where item is implemented - new placement of the item must respect existing scope links
Business Rule Deployment
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:
Deploy the BL using Data Setup for "Fact type" = "DELFmiFunctionIdentifiedInstance"
Reference
Documentation: After an Item Move (DELPLMFProcessInstance_BLInitAfterMoveID)
Author
Person of Contact - @Sattwik CHAKRABORTY
