Context Object Parameters
Parameter Name | Type | Read/Write | Comments |
---|
OutputListAttributeNames | List | Write | List of attribute names to display |
OutputListAttributeValues |
List |
Write |
List of attribute values to display. Must be
strings. |
Sample
The following sample is an example of how to use the opening ID in the CATRuleExit file.
<Script OpeningID="DELPPRF5Attributes_ID"
Type="ProdSystemOccurrence"
ScriptName="DELPPRF5Attributes"/>
<Script OpeningID="DELPPRF5Attributes_ID"
Type="FProcessOccurrence"
ScriptName="DELPPRF5Attributes"/>
Sample
The following sample is an example of how the business logic can be implemented in
the CATRule file.
/* ---- input ---- */
Let CurrentSystemOcc(ProdSystemOccurrence)
Let CurrentItemOcc(FProcessOccurrence)
/* ---- output ---- */
/*Edit these lists using BL logic and send as output*/
Let OutputListOfAttributeNames(List)
Let OutputListOfAttributeValues(List)
/*----- local variables ----*/
Let InputObjectReference(PLMCoreReference)
Let InputObjectInstance(PLMCoreInstance)
Let AttributeString(String)
Let AttributeReal(Real)
/* ---- RETRIEVE INPUT PARAMETERS ---- */
Set CurrentSystemOcc = ThisObject
if (NULL <> CurrentSystemOcc)
{
Set InputObjectReference = CurrentSystemOcc.Reference
Set InputObjectInstance = CurrentSystemOcc.Instance
}
else
{
Set InputObjectReference = CurrentItemOcc.Reference
Set InputObjectInstance = CurrentItemOcc.Instance
}
/* ---- CODE ---- */
/* if (NULL <> InputObjectInstance)
{
if (InputObjectInstance.IsSupporting("DELLmiGeneralSystemInstance") == true)
{
OutputListOfAttributeNames.Append("PLM_ExternalID")
Set AttributeString = InputObjectInstance.GetAttributeString("PLM_ExternalID")
OutputListOfAttributeValues.Append(AttributeString)
}
}
if (NULL <> InputObjectReference)
{
if (InputObjectReference.IsSupporting("DELLmiPPRSystemReference") == true)
{
OutputListOfAttributeNames.Append("V_Capacity")
Set AttributeReal = InputObjectReference.GetAttributeReal("V_Capacity")
Set AttributeString = ToString(AttributeReal)
OutputListOfAttributeValues.Append(AttributeString)
}
}
if (NULL <> InputObjectReference)
{
if (InputObjectReference.IsSupporting("DELFmiFunctionReference") == true)
{
if(InputObjectReference.HasAttribute("revision") == true)
{
OutputListOfAttributeNames.Append("revision")
Set AttributeString = InputObjectReference.GetAttributeString("revision")
OutputListOfAttributeValues.Append(AttributeString)
}
}
}
/* ---- FILL OUTPUT PARAMETERS ---- */
if (true == Parameters.HasAttribute("OutputListOfAttributeNames"))
{
Parameters.SetAttributeObject("OutputListOfAttributeNames", OutputListOfAttributeNames)
}
if (true == Parameters.HasAttribute("OutputListOfAttributeValues"))
{
Parameters.SetAttributeObject("OutputListOfAttributeValues", OutputListOfAttributeValues)
}