Compute the List of Piping Specification Following the Context (PipSpecListPipingSpecifications)

An opening ID is an entry point used to customize business logic. Compute the list of Specifications following the context allows you to filter the existing list of specifications. This opening ID is available in the Piping/Tubing Specification ResourcesHVAC Specification Resources resource set.

Note: For more information about customization by business rules, see Installation and Setup: Customize: Behavior: Data Setup: Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when using a command that displays a list of specifications. The following commands are impacted:

  • Out of spec
  • Replace with spec
  • Set LineID Spec Attribute

This opening ID is used to customize to filter the list of specifications to only display the applicable specifications for the current context.

The table below provides you with information related to the definition of the Opening ID.

PLM Opening ID:
Customization intent: Computation
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject: feature
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
EnsSpecList_InputList ReadList of Engineering Specifications available in the current resource set
EnsSpecList_OutputListWriteList the Engineering Specifications you want to allow
LineID_OccurenceReadLogical occurrence of the current line ID
ApplicativeOperationNameStringReadString mentioning the operation that calls the business logic. The applicative operation name has five different values depending on the command:
  • Operation_OutOfSpec: Replace with spec and Place a part out of spec commands
  • Operation_SetLineIDSpec: lists the specifications allowed in the Data Information panel
  • Operation_SetLineID_AdditionalSpec: lists the additional specifications allowed in the Data Information panel
  • Operation_SetLineID_InsulationSpec: lists the insulation specifications allowed in the Data Information panel
  • Operation_SetLineID_Insulation_AdditionalSpec: lists the additional insulation specifications allowed in the Data Information panel

Sample

The following sample is an example for filtering specifications for the following context: for "Out Of Spec" operation if the LineID operating temperature lies in between the Min && Max temp of the .

/* Sample Rule - Start*/ 
/* Rule:- For "Out Of Spec" operation if the LineID operating temperature lies in between the Min && Max temp of the PipSpecification. Append it to the list to be sent as OUTPUT */
  
let EnsSpecs_Input (List)
let EnsSpecs_Output (List)
let EnsSpec_CurrentObj (EnsSpecification)
let PipSpec_CurrentObj (PipSpecification)
let NbEnsSpecs (Integer)
let LineIDOcc_Value (LogicalOccurrence)
let OperationName_Value(String) 
let name(String)
let LogRef(RFLVPMLogicalReference)
let LineID_Obj(Piping_Line)
let LineID_Attr_Standard(string)
let LineID_Attr_Temp(TEMPRTRE)
let Spec_Attr_MinTemp(TEMPRTRE)
let Spec_Attr_MaxTemp(TEMPRTRE)
let Spec_Attr_Standard(String)
let j (Integer)

// Attribute names set on the Context to retrieve the value
let EnsSpecList_Input_attr = "EnsSpecList_Input"   /*List of EnsSpecifications */
let EnsSpecList_Output_attr = "EnsSpecList_Output"   /*List of EnsSpecifications */
let EnsSpecList_OperationName_attr = "ApplicativeOperationName" 
let EnsSpecList_LineIDOcc_attr = "LineID_Occurrence"

// Get OperationName attribute Value
set OperationName_Value = Parameters.GetAttributeString(EnsSpecList_OperationName_attr)

// Get LineID Occurrence object and retrieve the required information e.g. LineID Operating   
// Temperature
    set LineIDOcc_Value =  Parameters ->GetAttributeObject( EnsSpecList_LineIDOcc_attr )

    if ( NULL <> LineIDOcc_Value )
    {
        Trace(1,"LineID Occurrence retrieved Successfully !!!")
        set LogRef = LineIDOcc_Value.Reference
        if ( NULL <> LogRef ) 
        {
            set LineID_Obj = LogRef
            if ( NULL <>  LineID_Obj) 
            {
                set LineID_Attr_Standard = LineID_Obj.V_Standard
                set LineID_Attr_Temp = LineID_Obj.V_OperatingTemperature
                Trace(1,"LineID Attributes read successfully !!!")
            }
        }
    }
    // Get Input Spec List to process
    set EnsSpecs_Input = Parameters ->GetAttributeObject (EnsSpecList_Input_attr) 
    set NbEnsSpecs = EnsSpecs_Input.Size()
    let EnsSpecName_Value (String)
    set j = 1
    for j while j <= NbEnsSpecs
    {
      set EnsSpec_CurrentObj = EnsSpecs_Input.GetItem(j)
        if (NULL <> EnsSpec_CurrentObj)
        {
            set EnsSpecName_Value = EnsSpec_CurrentObj.V_Name
            set PipSpec_CurrentObj = EnsSpec_CurrentObj

            if ( NULL <> PipSpec_CurrentObj )
            {
                set Spec_Attr_MinTemp = PipSpec_CurrentObj.V_MinTemperature
                set Spec_Attr_MaxTemp = PipSpec_CurrentObj.V_MaxTemperature
                set Spec_Attr_Standard = PipSpec_CurrentObj.V_Standard
	
if ( OperationName_Value == "Operation_OutOfSpec" ) // For *OUT OF SPEC* operation                     //use the follwing logic to filter the EnsSpecifications
	{
// If the LineID operating temperature less than Max temp of the PipSpecification and 
// Standards are same. Append it to the list to be sent as OUTPUT
if ( ( LineID_Attr_Temp <= Spec_Attr_MaxTemp ) and 
( Spec_Attr_Standard == LineID_Attr_Standard  ))
	   {
	      EnsSpecs_Output.Append( EnsSpec_CurrentObj )
	   }
	}
	else 
	{
	    if ( OperationName_Value == "Operation_SetLineIDSpec" )
	    {
	        if ( ( LineID_Attr_Temp >= Spec_Attr_MinTemp ) and 
( LineID_Attr_Temp <= Spec_Attr_MaxTemp ) 
and ( Spec_Attr_Standard == LineID_Attr_Standard  ) )
	       {
	          EnsSpecs_Output.Append( EnsSpec_CurrentObj )
	       }	        	
	    }	
	}
            }
        }
    }

    // Set the output
    Parameters ->SetAttributeObject (EnsSpecList_Output_attr, EnsSpecs_Output)
    if ( EnsSpecs_Output.Size() > 0 )
   {
    	Trace(1,"Business Rule - Successful Execution !!!")
   }
   else
   {
	Trace(1,"Business Rule - No matching EnsSpecification found as per the criteria !!!")	
   } 

/* Sample Rule - End*/