Context Object Parameters
Parameter Name |
Type |
Read or Write |
Comments |
OutputListOfEngItemReference |
List |
Write |
List of engineering item references to be displayed in the
Manage Alternates Substitutes panel. |
OutputListOfContextsInstance |
List |
Write |
List of instance context objects (insert NULL
in case of reference substitute) |
OutputListOfContextsReference |
List |
Write |
List of reference context objects (insert NULL
in case of the instance substitute) |
OutputListOfStatus |
List |
Write |
String list which values can be Proposed ,
Qualified or Obsolete . |
OutputListOfRelationType |
List |
Write |
String list which values can be
ReferenceSubstitute , Alternate or
InstanceSubstitute . |
Sample
/* -------------------------------------------------------------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------*/
/* Variables declaration */
/* -------------------------------------------------------------------------*/
/* ---- input ---- */
/* ThisObject: doesn't need to be declared because it is a default input for all Business Logic */
/* ---- output ---- */
/*Edit these lists using BL logic and send as output*/
Let oListOfEngItemReference(List)
Let oListOfContextInstance(List)
Let oListOfContextReference(List)
Let oListOfStatus(List)
Let oListOfRelationType(List)
/*----- local variables ----*/
Let InputMBOMOcc(MfgProcessOccurrence)
Let InputMfgProcessReference(DELFmiFunctionReference)
Let EngineeringItemReference(VPMReference)
Let ContextOfInstanceSubstitute(VPMReference)
Let ContextOfReferenceSubstitute(VPMReference)
Let NullContext(String)
Let Status(String)
Let RelationType(String)
/* ---- RETRIEVE INPUT PARAMETERS ---- */
set InputMBOMOcc = ThisObject
if( NULL <> InputMBOMOcc)
{
set InputMfgProcessReference = InputMBOMOcc.Reference
if(NULL<> InputMfgProcessReference)
{
/*Customer have his own logic to retrieve the EngineeringItemReference, ContextOfInstanceSubstitute, ContextOfReferenceSubstitute, Status, RelationType */
oListOfEngItemReference.Append(EngineeringItemReference)
oListOfContextInstance.Append(ContextOfInstanceSubstitute)
oListOfContextReference.Append(ContextOfReferenceSubstitute)
oListOfStatus.Append(Status)
oListOfRelationType.Append(RelationType)
}
}
/* ---- FILL OUTPUT PARAMETERS ---- */
if ( true == Parameters.HasAttribute("OutputListOfEngItemReference") )
{
Parameters.SetAttributeObject("OutputListOfEngItemReference", oListOfEngItemReference)
}
if ( true == Parameters.HasAttribute("OutputListOfContextsInstance") )
{
Parameters.SetAttributeObject("OutputListOfContextsInstance", oListOfContextInstance)
}
if ( true == Parameters.HasAttribute("OutputListOfContextsReference") )
{
Parameters.SetAttributeObject("OutputListOfContextsReference", oListOfContextReference)
}
if ( true == Parameters.HasAttribute("OutputListOfStatus") )
{
Parameters.SetAttributeObject("OutputListOfStatus", oListOfStatus)
}
if ( true == Parameters.HasAttribute("OutputListOfRelationType") )
{
Parameters.SetAttributeObject("OutputListOfRelationType", oListOfRelationType)
}