Validate the Instance names of Logical and Physical Elements (L2P_ValidateInstanceNameSynchronization)

An opening ID is an entry point used to customize business logic. The Validate the Instance names of Logical and Physical Elements opening ID is used to check the synchronization of the instance names of logical and physical elements.

Important: The business rule is called only if the physical component already exists and is linked to its corresponding logical component.

This opening ID is available in the Electrical physical system design resource set 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 during the Logical to Physical synchronization command, for the selected element, the Business Rule checks whether the instance names of logical and physical elements are synchronized.

This opening ID is used to:

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

By default, the instance name of logical element will be set to the physical instance created through synchronization.

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

PLM Opening ID: L2P_ValidateInstanceNameSynchronization
Customization intent: Validation
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.
  • Validation: Variable to set to know if the validation succeeded or failed.

Context Object Parameters

Parameter NameTypeRead/WriteComments
L2PPhysicalElementPLM Entity ReadThe physical element (It is null if no physical element is created).

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 Boolean of business rule is TRUE, the physical component instance name is synchronized with logical.

Sample

The following sample illustrates the syntax of the business rule:

  • If the instance name of the physical component matches Instance Name To Change, the physical component's instance name is synchronized with the logical component's instance name.
  • If the instance name of the physical component is different from the logical component's instance name, there is no synchronization between the two instance names.

In both cases, a message indicates the outcome of the synchronization.

let sName(String)
let PhysVPMInst(VPMInstance)
let bValidation(BOOLEAN)
let sMsg(STRING)
let severity(INTEGER)
let LogInstName(String)

set PhysVPMInst = Parameters.GetAttributeObject("L2PPhysicalElement")
set LogInstName = ThisObject.Name

if(PhysVPMInst <> NULL)
{
                sName = PhysVPMInst.Name
                
                if( sName == "Instance Name To Change")
                {
                                bValidation = true
                                sMsg = "Instance Name will be modified"
                                severity = 1
                }
                Else
                {
                                severity = 2
                                bValidation = false
                                sMsg  = "Modification of instance name of this component forbidden"
                }
                                
}

Validation = bValidation
Parameters.Message = sMsg
Parameters.Severity = severity