Context Object Parameters
Parameter Name | Type | Read or Write | Comments |
---|
FactType | Any EKL type | — | Type of ThisObject in the business rule body. |
ListSegmentExtremeties (input) | List |
Read | Lists 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")
}
}
}
}