Validate Relevant Attributes Synchronization of Logical and Physical Elements (L2P_ValidateAttributesSynchronization)

An opening ID is an entry point used to customize business logic. The Validate relevant attributes synchronization of logical and physical elements opening ID allows you to synchronize the attributes of logical and physical components.

Important: It is only applicable for conductors and conductor groups specifications.

This opening ID is available in the Logical to Physical Synchronization Resources resource set.

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 when there are discrepancies between the attributes of linked logical components and physical components.

The business rule can either:

  • Validate the synchronization (severity=0)
  • Validate the synchronization with a warning message computed from the rule context (severity=1)
  • Forbid the synchronization with a warning message computed from the rule context (severity=2)

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

PLM Opening ID: L2P_ValidateAttributesSynchronization
Customization intent: Validation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject: logical element to be synchronized.
  • Parameters corresponds to the context object.

    A message attribute is displayed in the synchronization report.

  • Validation

    If the Boolean output of the business rule is TRUE, the relevant attributes of the existing physical component are synchronized with the attributes of the corresponding logical component.

Context Object Parameters

Parameter NameTypeRead/WriteComments
L2PPhysicalElementFeature ReadPhysical element linked to ThisObject.

Sample

The following sample illustrates the syntax of the business rule.

Let EleLogicalCable1 (EleLogicalCable)
Let EleLogicalWire1 (EleLogicalWire)
Let Conductor1 (Conductor)
Let ConductorGroup1 (ConductorGroup)
Let sLogName (STRING)Let sPhysName (STRING)
Let physicalObj (Feature)physicalObj = Parameters.GetAttributeObject("L2PPhysicalElement")
if( NULL == physicalObj)
{	
	Parameters.Severity = 2	
	Parameters.Message = "Corresponding Physical NOT found"	
	Validation = false
}
else
{	
	set Conductor1 = physicalObj	
	set ConductorGroup1 = physicalObj	
	set EleLogicalCable1 = ThisObject	
	set EleLogicalWire1 = ThisObject	
	if(  ( (NULL <> EleLogicalCable1) and (NULL <> ConductorGroup1) ) or ( (NULL <> EleLogicalWire1) and (NULL <> Conductor1) ) )	
	{		
		sLogName = ThisObject.PLM_ExternalID		
		sPhysName = physicalObj.Name		
		if( sLogName == sPhysName)		
		{			
			Validation = true			
			Parameters.Severity = 0			
			Parameters.Message = "Copying attributes allowed"		
		}		
		else		
		{			
			Validation = false			
			Parameters.Severity = 2			
			Parameters.Message = "Copying attributes NOT allowed"		
		}
	
	}
	else	
	{		
		Parameters.Severity = 2		
		Parameters.Message = "Invalid Logical or physical objects"		
		Validation = false							
	}
}