General InformationThis opening ID is invoked for any action related to allocation connection. This opening ID is used to validate:
Input ObjectsInput objects must be of the following types:
Context Object Parameters
Sample
/* CATRule signature (do not edit) : (ThisObject : #In ProductOccurrence, Parameters : #In RuleContext, Validation : #Out Boolean) : VoidType */ let sActionID (STRING) let sDescription (STRING) let sDescriptionComp (STRING) let listVolumePorts (LIST) let listSystemComponents (LIST) let listSystemPorts (LIST) let volInstance (Sys3D_ComponentVolumeInst) let compOccurrence (LogicalOccurrence) let compInstance(RFLVPMLogicalInstance) let index (INTEGER) // by default all the actions are allowed set Validation = true set volInstance = ThisObject.Instance if(NULL <> volInstance) { set sDescription = volInstance.GetAttributeString("V_description") set listVolumePorts = Parameters.GetAttributeObject("VolumePorts") set listSystemComponents = Parameters.GetAttributeObject("SystemComponents") set listSystemPorts = Parameters.GetAttributeObject("SystemPorts") set sActionID = Parameters.GetAttributeString("ActionID") if(sActionID == "Creation") { // check if the instance description of all the components in list matches with description of volume // if decription of any of the component is different, forbid creation of connection set index = 1 for index while index <= listSystemComponents.Size() { set compOccurrence = listSystemComponents.GetItem(index) set compInstance = listSystemComponents.GetItem(index) if(NULL <> compOccurrence) { set compInstance = compOccurrence.Instance } if(NULL <> compInstance) { set sDescriptionComp = compInstance.V_description if(sDescriptionComp <> sDescription) { set Validation = false Parameters.Message = "Some System component cannot be connected to this volume" Parameters.Severity = 1 break } } else { set Validation = false Parameters.Message = "System component not found from list so this connection is forbidden" Parameters.Severity = 2 break } } } else if ((sActionID == "ChangeContext") and (sDescription == "ContextChangeForbidden")) { set Validation = false Parameters.Message = "Context change not allowed for connection of this volume" Parameters.Severity = 1 } else if( (sActionID == "Deletion") and (sDescription == "DeletionForbidden")) { set Validation = false Parameters.Message = "Context change not allowed for connection of this volume" Parameters.Severity = 1 } } |