General InformationThis opening ID is invoked during the Harness Content Link command. This opening ID is used to validate the link between a harness and the following entities: wires, cables, disconnects, splices, connector ports.The table below provides you with information related to the definition of the Opening ID.
Input ObjectsInput objects must be of the following types:
Context Object Parameters
SampleThe following example checks whether all components to be linked to the harness are connector components only and checks if the harness is made of less than two connectors (which is forbidden). /* Rule : ELE_ValidateAllocationHarness */
/*
ThisObject : #In RFLVPMLogicalPort
Parameters : #In RuleContext
Validation : #Out Boolean
*/
let sMode (String) /* "Add" or "Remove" modes */
let ActionList (List) /* Ends to validate action on */
let ExistingList (List) /* Existing ends */
let nbActionEnds (Integer)
let nbExistingEnds (Integer)
let ActionEnd (RFLVPMLogicalInstance)
let ExistingEnd (RFLVPMLogicalInstance)
let Connector (PLMElecLogicalConnector)
let i (Integer)
let j (integer)
set sMode = Parameters->GetAttributeString("Mode")
set ActionList = Parameters->GetAttributeObject("ActionList")
set ExistingList = Parameters->GetAttributeObject("ExistingList")
Validation=true
nbActionEnds = ActionList->Size()
nbExistingEnds = ExistingList->Size()
set i = 1
if (sMode == "Add")
{
for i while i <= nbActionEnds AND Validation == true
{
ActionEnd = ActionList.GetItem (i)
if ActionEnd <> NULL
{
set Connector = ActionEnd.Reference
if Connector == NULL
{
Validation = false
Parameters.Message = "End " + ActionEnd.PLM_ExternalID +
" must be a connector component"
Parameters.Severity = 2
}
else
{
Connector = NULL
}
}
else
{
Validation = false
Parameters.Message = "Error"
Parameters.Severity = 2
}
}
}
if (sMode == "Remove")
{
if ((nbExistingEnds - nbActionEnds) < 4)
{
Validation = false
Parameters.Message = "Harness must group at least 3 connectors"
Parameters.Severity = 2
}
}
| |||||||||||||||||||||||||||||