This Wiki page provides guidelines to customize the Business Logic (BL) to activate the "Replace by Proposal" command and suggest Mfg. Items to replace an existing Mfg. Item in the model tree.
Introduction
The Opening ID "DELPPRReplaceByProposal_ID" is triggered upon launching the "Replace" command from the right click menu (activated by right clicking on the object). This Opening ID enables the display of a command "Replace by Proposal" within the list of sub-commands available in the "Replace" command. This opening ID and the BL can be useful to suggest Mfg. Items to replace an existing Mfg. Item based on some user defined criteria's instead of manually searching and selecting the Mfg. Item for the replacement.
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 | DELPPRReplaceByProposal_ID |
| Customization Intent | Execution |
| Execution Context | Client |
| Usage | This opening ID is run to activate the "Replace by Proposal" command under the list of sub-commands of "Replace" command. |
Explanation
After the BL for opening ID "DELPPRReplaceByProposal_ID" is deployed "Replace by Proposal" command is activated/displayed. This command is available in the list of commands in the "Replace" menu as shown below:
After executing the "Replace by Proposal" command, it will open a window suggesting Mfg. Items which can be used to replace the selected Mfg. Item as shown below:
The Mfg. Items are suggested based on the logic written in the BL for the opening ID "DELPPRReplaceByProposal_ID"
Use Case
The BL for the opening ID "DELPPRReplaceByProposal_ID" receives the Item, system or operation occurrence as input. This occurrence can be used to suggest the objects to replace the existing object in the model tree.
In this wiki, two uses are covered for the Mfg. Items:
A. Suggest another Mfg. Item from data base, that are scoped to the Engineering Item (Physical Product) linked to the selected Mfg. Item by scope link
Sometimes, an Eng. Item may be scoped to multiple Mfg. Items as shown below:
In the provided sample BL, logic is written to get the scoped Eng. Item of the selected Mfg. Item and fetch all the scoped Mfg. Items to that Eng. Item from database. These Mfg. Items are suggested in the list to replace the selected Mfg. Item.
The code for this logic is as given below:
currProcName = MyInputMBOMRef.PLM_ExternalID
set CurrScopedProduct = MyInputMBOMRef->GetProductScope() //Get the scoped product from the session
if (CurrScopedProduct <> NULL)
{
PrcsScopeList = CurrScopedProduct.NavigateFromPartOrPrdToProcessThroughScopeLink() //Get all the scoped Mfg. Items to the product from database
ii=1
For ii while ii<= PrcsScopeList.Size()
{
set scopedProcessRef = PrcsScopeList.GetItem(ii) //Get the process from the list
If scopedProcessRef <> NULL
{
procToProposeName = scopedProcessRef.PLM_ExternalID //Get the PLM_ExternalID of Mfg. Item from the list
//Propose the Mfg. Item to replace if its Name (PLM_ExternalID) is not same as current Mfg. Item
If procToProposeName <> currProcName
{
OutputList.Append(scopedProcessRef) //Add the Mfg. Item in the list of Objects to Propose
}
}
}
}B. Suggest "Alternate Mfg. Items" of current Mfg. Item.
A "Manufacturing Alternates" can be set for a Mfg. Item using the "Manage Alternates Substitutes" command as shown below.
In the provided sample BL, logic is written to get the "Alternate" Mfg. Item of the selected Mfg. Item and suggest them in the list to replace the selected Mfg. Item.
The code for this logic is as given below:
ListOfAlternateRelShip = MyInputMBOMRef.GetRelatedProcessesFromAlternate() //Retrieves a list of alternate relations on the current Mfg Product Transformation Reference through the "to" end.
NbRelship = ListOfAlternateRelShip.Size()
ii = 1
for ii while ii <= NbRelship
{
set CurAlternateRel=ListOfAlternateRelShip.GetItem(ii)
set FROMProcessRef = CurAlternateRel.Owner //Get the owner of the relationship
OutputList.Append(FROMProcessRef) //add the owner of the alternate relation in the list of Mfg. Items to Propose
}
ListOfAlternateRelShip = MyInputMBOMRef.ListAlternateProcesses() //Retrieves a list of alternate relations on the current Mfg Product Transformation Reference through the "from" end.
NbRelship = ListOfAlternateRelShip.Size()
ii = 1
for ii while ii <= NbRelship
{
set CurAlternateRel=ListOfAlternateRelShip.GetItem(ii)
set ListOfChildren = CurAlternateRel.Children //Get the children of the relationship
set NbMBOM = ListOfChildren.Size()
if (NbMBOM == 1)
{
set TOProcessRef = ListOfChildren.GetItem(1)
OutputList.Append(TOProcessRef) //add the owner of the alternate relation in the list of Mfg. Items to Propose
}
}Logical Flow
Note: For more details, please checkout the provided well commented script.Sample Script
Scenario
Here is a sample data set used for the demonstration:
Here the Physical Product "P0_1" is scoped to two Mfg. Items- Provided Part "P0_1" (From Current Data or PPR Context) and Manufacturing Assembly "P0_1" (From database or another data set). Also, the Manufacturing Assembly "Mfg_Asm_1" is set as "Manufacturing Alternate" to the Provided Part "P0_1".
When the "Replace by Proposal" command is executed on Provided Part "P0_1", it suggests both the Manufacturing Assembly "P0_1" and Manufacturing Assembly "Mfg_Asm_1" which can be used to replace the Provided Part "P0_1" as shown below:
Here, if we select the Manufacturing Assembly "P0_1", it will replace the Provided Part "P0_1" as shown below:
It will also work in the same way for the "Manufacturing Alternates"
Note: If there are no other Mfg. Items available to propose as per the logic written in the BL and the output list is empty, the "Replace By Proposal" window will be blank as shown below.
References
User Assistance: Replace by Proposal (DELPPRReplaceByProposal_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: FProcessOccurrence
