Compute Synchronization Validity for Logical and Physical Elements (L2P_ComputeSynchronizationValidity)

An opening ID is an entry point used to customize business logic. The Compute synchronization validity for of logical and physical elements opening ID is available in the Logical to physical synchronization resources set and it is used to to compute the synchronization of a pair of logical and physical element linked to each other.

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 Logical to Physical synchronization. For the selected elements, the Business Rule computes if a pair of logical and physical elements can be synchronized through Logical to Physical command.

This computation rule is triggered before analysis of a logical and physical element for synchronization.

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

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

Input Objects

Input objects must be of the following types:

  • ThisObject:The logical element to be synchronized.
  • Parameters corresponds to the context object. Message attribute will be displayed in the synchronization report.

Context Object Parameters

Parameter NameTypeRead/WriteComments
L2PPhysicalElementPLM Entity ReadThe physical element found synchronization with logical element (ThisObject).
L2PSynchronizeElementPLM Entity ReadThe output Boolean, to indicate the physical element should be synchronized with the logical element (ThisObject).
L2PSynchronizeChildrenPLM Entity ReadThe output Boolean, to indicate whether the children of the physical element should be synchronized with respective logical children element of ThisObject.

Severity messages:

  • Severity= 0 the treatment is to be continued (no message).
  • Severity= 1 the treatment is to be continued and only a warning raised.
  • Severity= 2 the treatment is supposed to be undone.

If the output L2PSynchronizeElement is false, the element will not be analyzed for synchronization.

The analysis of its children will depend on output L2PSynchronizeChildren. The children will be analyzed if L2PSynchronizeChildren is true. If both the outputs are false, the physical element and all its children will not be analyzed for synchronization.

Sample

The following sample illustrates the business rule syntax.

let PhysVPMInst(VPMInstance)
let PInstanceName (String)
let LInstanceName (String)
let LDescription (String)

set LDescription = ThisObject.GetAttributeString("V_description")
set PhysVPMInst = Parameters.GetAttributeObject("L2PPhysicalElement")
set LInstanceName = ThisObject.Name

if PhysVPMInst<>NULL
{

set PInstanceName = PhysVPMInst.Name

if PInstanceName <> LInstanceName
{
Parameters.SetAttributeBoolean("L2PSynchronizeElement",FALSE)
Parameters.SetAttributeInteger("Severity", 1)
Parameters.SetAttributeString("Message", "Logical and Physical Instance names are different : No Synchronization  ")
}
Else
{
Parameters.SetAttributeBoolean("L2PSynchronizeElement",TRUE)
Parameters.SetAttributeInteger("Severity", 1)
Parameters.SetAttributeString("Message", "No Blocking Conditions : Element Synchronization Accepted")
}


}

Else

{
Parameters.SetAttributeBoolean("L2PSynchronizeElement",TRUE)
Parameters.SetAttributeInteger("Severity", 0)
}

if ThisObject.Reference.IsASortOf("EleLogicalHarness")
{
	
if (LDescription == "Forbid Children Synchronization")
{	
Parameters.SetAttributeBoolean("L2PSynchronizeChildren",FALSE)
Parameters.SetAttributeInteger("Severity", 1)
Parameters.SetAttributeString("Message", "Children Synchronization forbidden")
}
Else
{
Parameters.SetAttributeBoolean("L2PSynchronizeChildren",TRUE)
Parameters.SetAttributeInteger("Severity", 1)
Parameters.SetAttributeString("Message", "No Blocking Conditions : Children Synchronization Accepted")
}
}

Else
{
Parameters.SetAttributeBoolean("L2PSynchronizeChildren",TRUE)
Parameters.SetAttributeInteger("Severity", 0)
}