This Wiki page provides guidelines to customize the Business Logic (BL) to choose parent in MBOM Structure during the execution of "Create/Update Item Structure" command.
Introduction
The opening ID "DELMA_ChooseParentInCUPS_ID" is an entry point used to customize business logic for command "Create/Update Item Structure". This opening ID is run to retrieve the parent item in the MBOM structure when creating a new node for Eng. Items using the "Create/Update Item Structure (CUIS)" command.
Note: The "Create/Update Item Structure (CUIS)" command was previously known as "Create/Update Process Structure (CUPS)" in previous releases. The abbreviation "CUPS" is still used in the name of the opening ID.
Version Tested on – 2025x FD01 FP.CFA.2506
Pre-requisites:
Licenses –
PPL (Process Engineer): Required to create Mfg. Item Structure, Process Structure & Resource Structure
Disclaimer: Licenses mentioned above are as per 2025x documentation.
| PLM Opening ID | DELMA_ChooseParentInCUPS_ID |
| Customization Intent | Execution |
| Execution Context | Client |
| Usage | This opening ID is run to retrieve the parent item in the MBOM structure when creating a new node using the "Create/Update Item Structure (CUIS)" command. |
Explanation
The command, "Create/Update Item Structure (CUIS)" can be used to automatically create an Item Structure (MBOM).
After executing the command for a Mfg. Item, a window pops up showing the selected Mfg. Item and it's scoped EBOM Structure
After clicking on the "Next" button, it gives three options:
"Generate item structure based on "Make-Buy"
"Create complete structure for Design Assembly"
"Restrict to Reused Items Only"
After clicking on the "Next" button, its askes to select preferences to create the Mfg. Item nodes and few additional options.
After clicking on the "Finish" button, it will generate the Mfg. Item Structure based on the selected options.
Use Case
The opening ID "DELMA_ChooseParentInCUPS_ID" can be used to customize the logic to select the parent Mfg. Items for the Mfg. Item nodes that are getting created for their respective Eng. Item nodes after the execution of CUIS command.
In the provided sample script, a logic is written to select the parent Mfg. Item for the MBOM Node to be created based on the "Description (V_description)" attribute of the Eng. Item Instance for which the node is being created.
If a Mfg. Item with the same instance description as of a Eng. Item instance is available under the first upper scoped Mfg. Item, that Mfg. Item will be used as the parent to insert the Mfg. Item node for the current Eng. Item.
If no Mfg. Item with the matching instance description is available, a new Manufacturing Assembly node is created to act as a parent under the first upper scoped Mfg. Item with "Title" and instance description same as the "V_description" of the current Eng. Item Instance and the node for the current Eng. Item is created under that parent node.
If the "Description (V_description)" of the Eng. Item is empty, the Mfg. Item node for the Eng. Item is created directly under the first upper scoped Mfg. Item.
Logical Flow
Sample Script
Scenario
The following data set will be used to explain the working of the provided sample business logic.
Here the "Create/Update Item Structure" command is executed for the "Root Product 14052025" Mfg. Assembly. The options are selected as shown below:
Scenario 1: Mfg. Item with same instance description as of the Eng Item Instance is available in the First Upper Scoped Mfg. Item
Here, for Physical Product Instances "WISHBONE Suspension RIGH.1" and "WISHBONE Suspension LEFT.1", the Mfg. Item Instance "Front Suspension Assembly.1" is available in the First Upper Scoped Physical Product, which have the same instance description "Front Suspension" as that of the Eng. Items.
Therefore, the Mfg. Item nodes for "WISHBONE Suspension RIGH.1" and "WISHBONE Suspension LEFT.1" are created under the Mfg. Item "Front Suspension Assembly.1".
Same is done for Physical Product "Rack & Pinion Mechanism.1" and "Steering Wheen Assembly.1" and Mfg. Item "Steering System Assembly.1" as shown below:
The following lines of code in the provided sample script is responsible for this behavior:
set index = 1
if( NULL <> iFirstUpperScopedMfgItem)
{
set listChilds = iFirstUpperScopedMfgItem.Children //Get the childrens of first upper scoped Mfg. Item
for index while index <= listChilds->Size()
{
set MfgItemOccChild = listChilds->GetItem(index) //Get Item in the list
if(NULL <> MfgItemOccChild)
{
MfgItemDescription = MfgItemOccChild->GetAttributeString("V_description") //Get Instnace Description of the Mfg. Item
//Check if the Part Description and Mfg. Item description is same
if(0 <= PartDescription.Search(MfgItemDescription, 0, true))
{
oMfgItemOccurence.Append(MfgItemOccChild) //Upend the Mfg. Item in list of parents
Parameters.SetAttributeObject("OutputParentMfgItemOcc", oMfgItemOccurence) //Update the output parameter
Validation=true //Set validation to true
Notify("Inserting: ", PartInstance.Name)
Notify("Under: ", oMfgItemOccurence->GetAttributeString("Name"))
}
else
{
listChilds2.RemoveAll() //Empty the list
set listChilds2 = MfgItemOccChild.Children //Get the children of current item
index2 = 1
for index2 while index2 <= listChilds2->Size()
{
listChilds.Append(listChilds2->GetItem(index2)) //add item of listChilds2 to listChilds
//This step is performed to manage the scenario, where, the Mfg. Item with Matchin Instanace Name ...
//may be available multiple levels below the First Upper Scoped Mfg. Item
}
}
}
}
} Scenario 2: Mfg. Item with same Instance Description as that of the Eng Item is not available in the First Upper Scoped Mfg. Item
Here, for Physical Product Instances "Rear Suspension RIGHT.1" no Mfg. Item is available in the First Upper scoped Item structure which have same instances description as these Eng. Items, i.e. "Rear Suspension".
Therefore, a new Mfg. Assembly is created under the First Upper Scoped Mfg. Item with Title (V_Name) = Instance Description (V_description). Also, the Instance Description of the Mfg. Assembly is set to the same value of the Eng. Item Instance Description, which will allow to select the same Mfg. Assembly as parent for further Eng. Items with same Instance Description. Then the nodes for the Eng. Items are created under this newly created Mfg. Assembly as shown below:
The following lines of code in the provided sample script is responsible for this behavior:
if(false == Validation )
{
//If no Mfg. Item with matching Instance Description is found in the First Upper Scoped Mfg. Item, execute this section of code
ParentMfgItemRef = new("CreateAssembly",PartDescription,NULL) //Create New Mfg Assembly with Title = Eng. Item Instanace Description
if(NULL <> ParentMfgItemRef)
{
set MymfgItemOcc = iFirstUpperScopedMfgItem-> InsertPredecessor(ParentMfgItemRef) //Insert the new Assemblyunder First Upper Scoped Mfg. item
if(MymfgItemOcc <> NULL)
{
MfgItemInstance = MymfgItemOcc.Instance
if(NULL <> MfgItemInstance)
{
MfgItemInstance.V_description = PartDescription //Set Mfg. Assembly Instance Description = Eng. Item Instanace Description
}
oMfgItemOccurence.Append(MymfgItemOcc) //Add the new Mfg. Assembly in List of Parent
Parameters.SetAttributeObject("OutputParentMfgItemOcc", oMfgItemOccurence) //Update the Output parameter
Validation=true //Set Validation to True
Notify("Inserting2: ", PartInstance.Name)
Notify("Under2: ", oMfgItemOccurence->GetAttributeString("Name"))
}
}
}Scenario 3: Eng. Item Instance Description is Empty
Here, the Mfg. Item node for Eng. Item "CAR_Body.1" is directly created under the First Upper Scoped Mfg. Item as the Instance Description of the Eng. Item is empty.
In this scenario, the output parameter "OutputParentMfgItemOcc" remains empty, and the Mfg. Item Node for the Eng. Item is created under the First Upper Scoped Mfg. Item
References
User Assistance: To Choose Parent in MBOM Structure in CUPS (DELMA_ChooseParentInCUPS_ID)
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:
This Object Type: ProductOccurrence
Authors
For any queries, please reach out to: @KA @KK
