Rule for Architecture Components Post-Processing (EscItm_PostprocessAfterItemAssociation)

An opening ID is an entry point used to customize business logic. The Rule for post-process after association with Items opening ID defines the post-processing rules to generate the description that appears in every logical object linked to an architecture component.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when post-processing the architecture component architecture number.

  • Create Architecture Components
  • Associate Architecture Components with Logical Objects
  • Replace by Logical Facet
  • Create and Edit a Logical Facet
  • Create or Reuse Logical Facet
  • Remap Symbol Using Exposed Ports
  • Break Link with Architecture Components

Definition Description
PLM Opening ID Rule for post-process after association with Items
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Logical Occurence
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter Name Type Read or Write Comments
Fact object (Input) Occurrence Read The occurrence containing the piping/electrical/HVAC design and linked to the architecture component system.
Input_ListItemizedObjs (input) List Read You can modify the attributes of those objects. It contains logical occurrences.
Input_ListAssociatedItems (input) List Read The list of architecture components associated to the objects. It contains logical instances.
Input_OperationID(input) Integer Read The operation ID corresponding to the command that is calling the rule:

0: calls the rule from Create Architecture Components

1: calls the rule from Associate Architecture Components with Logical Objects

2: calls the rule from Break Link with Architecture Components

Write Architecture Number in Logical Objects Description

The following sample write the architecture number of the architecture component in the description of its related logical objects.

let ListSelectedObjects(List)
let ListObjectsToItemize(List)
set ListSelectedObjects = Parameters.GetAttributeObject("Input_ListSelectionOccurrence")
//Go through the list and remove pipes
let LogicalPipeRef(Piping_Logical_Pipe)
let LogicalReducerRef(Piping_Logical_Reducer)
let LogicalOcc(LogicalOccurrence)
for LogicalOcc inside ListSelectedObjects
{	
	set LogicalPipeRef = LogicalOcc.Reference	
	set LogicalReducerRef = LogicalOcc.Reference
	//Keep only the objects that are not Pipes or Reducers
	if(LogicalPipeRef == NULL and LogicalReducerRef == NULL)
	{
		ListObjectsToItemize.Append(LogicalOcc)
	}	
}

Parameters.SetAttributeObject("Output_ListObjectsToItemize", ListObjectsToItemize)

Rule for post-process after association with Items
Execution Mode: Execution

Parameter Name	Type	Comments
Fact object (Input)	Occurrence	The Occurrence containing the Piping/Electrical/HVAC design and linked to the Item system.
Input_ListItemizedObjs
  (Input)	List	The user can modify the attributes of those objects. It contains Logical Occurrences.
Input_ListAssociatedItems
  (Input)	List	The list of Items associated to the objects. It contains Logical Instances.

For example, the following rule will write the architecture number of the Item in the description of its related applicative object:
let ListItemizedObjects(List)
let ListAssociatedItems(List)
set ListItemizedObjects = Parameters.GetAttributeObject("Input_ListItemizedObjs")
set ListAssociatedItems = Parameters.GetAttributeObject("Input_ListAssociatedItems")
//Go through the list and remove pipes
let LogicalObject(LogicalOccurrence)
let AssociatedItemInst(RFLVPMLogicalInstance)
let AssociatedItemRef(RFLVPMLogicalReference)
let CurrentIndex(Integer)
set CurrentIndex = 1
for LogicalObject inside ListItemizedObjects
{
	set LogicalObject = ListItemizedObjects.GetItem(CurrentIndex)	
	set AssociatedItemInst = ListAssociatedItems.GetItem(CurrentIndex)
	set AssociatedItemRef = AssociatedItemInst.Reference
	let ArchitectureNumber(String)
	set ArchitectureNumber = AssociatedItemRef.GetAttributeString("V_ArchitectureNumber")
	let LogicalInst(RFLVPMLogicalInstance)
	set LogicalInst = LogicalObject.Instance
	//Copy the title of the Item in the description of the logical object
	LogicalInst.SetAttributeString("V_description", ArchitectureNumber)
	
	set CurrentIndex = CurrentIndex + 1