Validate Extremity Connection (EHI_ValidateExtremityConnection)

An opening ID is an entry point used to customize business logic. The Validate Extremity Connection (EHI_ValidateExtremityConnection) opening ID validates the connection between two segments provided that they share the same attributes. This enables you to create a consistent network.

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 whenever you connect a segment extremity to another segment extremity.

Important: The opening ID is only invoked during the connection. If you manually edit one of the segments' attribute after the validation, the opening ID is not invoked again and the network consistency may be lost.

The opening ID is not invoked in the following cases:

  • Import of a product with FBDI
  • Generation of a configured harness
  • Extract of your content in Electrical Manufacturing Preparation

DefinitionDescription
PLM Opening IDEHI_ValidateExtremityConnection
Customization intent Validation
Execution contextClient

Input Objects

Input objects must be of the following types:

  • ThisObject: SegmentExtremity
  • Parameters corresponds to the context object.
  • Validation

    When the business rule returns TRUE, the connection is allowed. When it returns FALSE, the connection is not allowed. When connecting two segments while creating a branch point on the fly, the branch point is not created if the business rules returns FALSE.

Context Object Parameters

Parameter NameTypeRead or WriteComments
FactTypeAny EKL typeType of ThisObject in the business rule body.
ListSegmentExtremeties

(input)

List ReadLists the segment extremities that can be connected to ThisObject.

When connecting ThisObject to a junction, all the segment extremities loaded in session and present at the junction are listed.

When connecting ThisObject with a proxy branch point, the segment extremities of the targeted segment are listed.

Sample

The following sample illustrates how to validate the connection of two segments by checking the compatibility of their separation codes.

Let Seg(Segment)
Let OtherSegExt(SegmentExtremity)
Let OtherSeg(Segment)
Let lp(Integer)
Let sz(Integer)
Let InputSegSepCode(String)
Let ListOtherExt(List)

Set Validation = true
Set Seg = ThisObject.Owner
Set ListOtherExt = Parameters.GetAttributeObject("ListSegmentExtremities")

Set lp = 1
Set sz = ListOtherExt.Size()

if(NULL <> Seg)
  Set InputSegSepCode = Seg.Elec_Segreg

for lp while lp <= sz
{
	Set OtherSegExt = ListOtherExt.GetItem(lp)
	if(NULL <> OtherSegExt)
	{
		Set OtherSeg = OtherSegExt.Owner
		if(NULL <> OtherSeg)
		{
			if(InputSegSepCode == OtherSeg.Elec_Segreg)
			{
				Validation = true
			}
			else
			{
				Validation = false
				Notify("Segments " + Seg.Name + " and " + OtherSeg.Name + " are not compatible")
			}
		}
	}
}