Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
SourceSupportInstance | VPMInstance |
Read | Selected source support. Its reference has a SharedSupportPart type. |
TargetSupportInstance | VPMInstance | Read | Selected target support. Its reference has a SharedSupportPart type. |
Sample
The following sample illustrates the business rule syntax.
/* CATRule signature (do not edit) : (ThisObject : #In Support,
Parameters : #In RuleContext, Validation : #Out Boolean) : #Void */
let SrcSpt(Support)
let TgtSpt(Support)
let SrcName(STRING)
let TgtName(STRING)
let SubType(STRING)
set SrcSpt = Parameters.GetAttributeObject("SourceSupportInstance")
set TgtSpt = Parameters.GetAttributeObject("TargetSupportInstance")
if((NULL == SrcSpt) or (NULL == TgtSpt))
{
Validation = false
Parameters.Severity = 2
Parameters.Message = "Param NULL"
}
else
{
set SrcName = SrcSpt.Name
set TgtName = TgtSpt.Name
}
{
if (SrcName == TgtName)
{
Validation = false
Parameters.Severity = 2
Parameters.Message = "Not allowed"
}
else
{
Validation = true
Parameters.Severity = 1
Parameters.Message = "allowed with warning"
}