Compute Aggregating Product of Component (L2P_ComputeFatherForPlacingComponent)

An opening ID is an entry point used to customize business logic. The Compute Aggregating Product of Component opening ID is available in the Logical to physical synchronization resource set and is used to define the aggregating product in which electrical devices are placed during synchronization.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked during the analysis of the logical components to be placed in the physical structure.

This opening ID is used in various synchronization cases:

  • Case 1: Physical equipment connector generated from a logical equipment port
  • Case 2: Physical harness connector instantiated from a logical harness connector
  • Case 3: Pair of physical connectors generated from a logical inline connector
  • Case 4: Physical splice generated from a logical splice

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID: L2P_ComputeFatherForPlacingComponent
Customization intent: Computation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject corresponds to the logical component or part which is analyzed for synchronization.

    ThisObject should be of type LogicalOccurrence or, considering the four cases depicted above, of the following derived types:

    • Case 1: LogicalEquipment
    • Case 2: EleLogicalConnectorOcc
    • Case 3: EleLogicalInlineConnectorOcc
    • Case 4: EleLogicalSpliceOcc

  • Parameters corresponds to the context object. Standard context, Message attribute are displayed in the synchronization report.
  • Severity messages:
    • Severity= 0: Synchronization is validated (no message).
    • Severity= 1: Synchronization is validated and a warning message is computed from the rules context.
    • Severity= 2: Synchronization is forbidden and a warning message is computed from the rules context.

Context Object Parameters

Parameter NameTypeRead/WriteComments
L2PPhysicalRootPLM Entity ReadThe input physical root in which corresponding physical parent element is to be searched.
L2PPhysicalFatherPLM EntityWriteThe output physical product in which the component is to be instantiated. If the business rule output L2PPhysicalFather is invalid, default behavior is applicable.
Additional Context Object Parameter (Case 1 only)
Parameter NameArgument TypeRead/WriteComments
L2PConnectorPortEleLogicalConnectorPort Valid input only when ThisObject is LogicalEquipment and the intent is to define the aggregating physical parent for the physical equipment connector to be generated.
Additional Context Object Parameters (Case 3 only)
Parameter NameArgument TypeRead/WriteComments
L2PConnectorPortEleLogicalConnectorPort Valid input only when ThisObject is EleLogicalInlineConnectorOcc and the intent is to define the aggregating physical parent for the physical single insert connector to be generated.
L2PLogicalParentEleLogicalHarnessOccValid input only if ThisObject is EleLogicalInlineConnectorOcc and L2PConnectorPort is valuated by a port aggregated by ThisObject in Logical.

When valid, this argument holds the electrical logical system linked to the L2PConnectorPort via "harness content link".

Sample

The following sample explains how to compute the father of electrical components.

/* CATRule signature (do not edit) : (ThisObject : #In LogicalOccurrence, Parameters : #In RuleContext) : VoidType */

let thisObjReference (RFLVPMLogicalReference)
let LogParentElem (LogicalOccurrence)
let LogicalPortElem(RFLVPMLogicalPort)
let PhysRootElem(VPMReference)
let ChildInstance(VPMInstance)
let ChildReference(VPMReference)
let Instance(VPMInstance)
Let ProductOccurrence1 (ProductOccurrence)
let listChild(LIST)
let listChild2(LIST)
let nbChild(INTEGER)
let index(INTEGER)
let index2(INTEGER)
let sName(STRING)
let sRootName(STRING)
let sInstName(STRING)
let sParentName(STRING)
let sSearchID(STRING)
let sSearchIDTitle(STRING)
let sSearchIDName(STRING)
let sMessage(STRING)
let Child(Feature)
let bParentFound(BOOLEAN)

/* Get the info from Parameters */
set PhysRootElem = Parameters.GetAttributeObject("L2PPhysicalRoot")
set LogParentElem = Parameters.GetAttributeObject("L2PLogicalParent")
set LogicalPortElem = Parameters.GetAttributeObject("L2PConnectorPort")

/* Get the name of father based on type of ThisObject */
set bParentFound = false
set sMessage ="Input enitity type is Unknown" 
set thisObjReference = ThisObject.Reference
if( (true == thisObjReference.IsASortOf("EnsLogicalEquipment")) or (true == thisObjReference.IsASortOf("EleLogicalBusbar")) ) /* Equipment or Busbar*/
{
	if(NULL <> LogicalPortElem) /* Place all  Equipment connectors in Equipment_Connectors */
	{
		set sSearchIDTitle = "Equipment_Connectors"
		set sSearchIDName = "Equipment_Connectors"
	}
	else /* Place all  Equipments in Equipments */
	{
		set sSearchIDTitle = "Equipments"
		set sSearchIDName = "Equipments"
	}
}
else if ( (true == thisObjReference.IsASortOf("EleLogicalInlineConnector")) and (NULL <> LogicalPortElem) ) /* Disconnect */
{
	/* Logical Disconnects have no corresponding physical. Place connectors corresponding to its port in Inline_Connectors */
	set sSearchIDTitle = "Inline_Connectors"
	set sSearchIDName = "Inline_Connectors"
}
else /* All other connectors are to be placed in Harness_Connectors */
{
	set sSearchIDTitle = "Harness_Connectors"
	set sSearchIDName = "Harness_Connectors"
}

/* Search the physical aggregating product in physical root */
if( (NULL <> PhysRootElem) and (sSearchIDTitle <> "") and (sSearchIDName <> "") )
{
	  sRootName = PhysRootElem.PLM_ExternalID	
	  listChild = PhysRootElem.Children
	  if(listChild <> NULL)
	  {
		index = 1
		for index while index <= listChild->Size()
		{
			  set Child = listChild->GetItem(index)
			  if( (Child <> NULL) and (bParentFound == false) )
			  {
				sName = ""
				set Instance = Child
				set ProductOccurrence1  = Child
				if(ProductOccurrence1 <> NULL)
					set Instance  = ProductOccurrence1.Instance					
				if(NULL <> Instance)
				{
					sName = Instance.PLM_ExternalID
				}
				if( (0 <= sName.Search(sSearchIDTitle, 0, true)) or (0 <= sName.Search(sSearchIDName, 0, true)) )
				{
					bParentFound = true
					Parameters.SetAttributeObject("L2PPhysicalFather", Child)
					Parameters.SetAttributeInteger("Severity", 0)
					Parameters.SetAttributeString("Message", "Entity Father found")
				}
				if(bParentFound == false)
				{
					/* Add children of this reference to list of child for recusrive Search */
					set ChildInstance = Child
					set ChildReference = ChildInstance.Reference
					set listChild2 = ChildReference.Children
					if(1 <= listChild2->Size())
					{
						set index2 = 1
						for index2 while index2 <= listChild2->Size()
						{
							listChild.Append(listChild2->GetItem(index2))
					                }
					}
				}
			}
		}
	}		
}
if(bParentFound == false)
{
  sMessage = sMessage + "Enitity Father not found"
  Parameters.SetAttributeInteger("Severity", 2)
  Parameters.SetAttributeString("Message", sMessage)
}