Context Object Parameters
Parameter Name |
Type |
Read/Write |
Comments |
AssociatedInterface |
List |
Read |
The plm object or path of plm objects representing the interface associated to
this system (definition or usage) that will be connected:
Logical: RFLVPMSystemTypeExpositionInstance {RFLVPMSystemTypeInstance} |
RFLVPMLogicalPort
Functional: RFLPLMFlowExpositionInstance {RFLPLMFlowInstance} |
RFLPLMFunctionalConnector
(See ‘Wirth syntax notation’)
|
TargetSystem |
SysConnectable |
Read |
The reference or instance corresponding to a System definition or a System
usage.
|
TargetInterface |
List |
Read |
The plm object or path of plm objects representing the interface associated to
the target system (definition or usage) that will be connected:
Logical: RFLVPMSystemTypeExpositionInstance {RFLVPMSystemTypeInstance} |
RFLVPMLogicalPort
Functional: RFLPLMFlowExpositionInstance {RFLPLMFlowInstance} |
RFLPLMFunctionalConnector
(See ‘Wirth syntax notation’)
|
Connection |
SysConnection |
Read |
The functional or logical connection being established.
|
Sample
Let'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."
}