General InformationThis opening ID is invoked everytime an interactive command or a programming interface (API) triggers an operation of functional/logical connection creation. The functional/logical connection creation operation means: A connection is established between two interfaces; each interface being in context of its reference or of an instance coming from its reference. This opening ID is used to customize an interface of a function. This can be either:
The table below provides you with information related to the definition of the Opening ID.
Input ObjectsInput objects must be of the following types: A plm object supporting the SysConnectable type:
Context Object Parameters
SampleLet's implement the following rule (on the logical domain): The logical connection can be created only if the implied interface usages (RFLVPMSystemTypeExpositionInstance type) share the same value for 'V_description' attribute. To achieve this particular business logic implementation, a CATRuleExit file, known as family, declares the script to run everytime a functional or logical connection is about to be established:
<Scripts>
<Script OpeningID="FLSystemConnectionCheck"
Type="SysConnectable"
ScriptName="CATMyFirstSystemConnectionCheckRule" />
</Scripts>
This family tells to run the script CATMyFirstSystemConnectionCheckRule whenever a connection creation operation is launched with a functional or logical object of PLM type SysConnectable. This script is a CATRule file that contains the following business logic implementation:
let FromSystem(SysConnectable)
let FromInterface(List)
let TargetSystem(SysConnectable)
let TargetInterface(List)
let Connection(SysConnection)
let FromInterfaceExpositonUsage(SysInterface)
let FromItfExpositonUsageDescription(String)
let ToInterfaceExpositionUsage(SysInterface)
let ToItfExpositonUsageDescription(String)
Let DescriptionAttrName(String)
DescriptionAttrName=”V_description”
set FromSystem = ThisObject
set FromInterface = Parameters->GetAttributeObject("FromInterfaces")
set TargetSystem = Parameters->GetAttributeObject("TargetSystem")
set TargetInterface = Parameters->GetAttributeObject("TargetInterfaces")
set Connection = Parameters->GetAttributeObject("Connection")
if(FromInterface->Size() >= 1)
{
// Retrieve a RFLVPMLogicalSystemTypeExpositionInstance object
set FromInterfaceExpositonUsage = FromInterface->GetItem(1)
FromItfExpositonUsageDescription = FromInterfaceExpositonUsage->GetAttributeString(DescriptionAttrName)
}
if(ToInterface->Size() >= 1)
{
// Retrieve a RFLVPMLogicalSystemTypeExpositionInstance object
set ToInterfaceExpositonUsage = ToInterface->GetItem(1)
ToItfExpositonUsageDescription = ToInterfaceExpositonUsage->GetAttributeString(DescriptionAttrName)
}
if (FromItfExpositonUsageDescription == ToItfExpositonUsageDescription)
{
Validation = true
}
else
{
Validation = false
}
if (Validation == false)
{
Parameters.Message = "The logical connection cannot be created because of not compliant interfaces."
}
| |||||||||||||||||||||||||||||||||