Perform Pre/Post Process after Modification Action (L2P_ExecutePrePostActionProcess)

An opening ID is an entry point used to customize business logic. The Perform Pre/Post Process after Modification Action opening ID is available in the Logical to Physical Assistant Resources resource set.

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

This page discusses:

General Information

This opening ID is invoked before and/or after a modifying action to update a custom attribute. It also can be invoked outside L2P as well, hence the parameter contains attribute for list of 1D (logical Item), 2D (associated logical), 3D (associated physical) and the associated Article solutions.

Definition Description
PLM Opening ID L2P_ExecutePrePostActionProcess
Customization intent Execution
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: None
  • Parameters corresponds to the context object.
Note: The parameters are different in with & without ITEM scenario.

Context Object Parameters

Parameter Name Type Read or Write Comments
ListInput1DFacet List Read

List of 1D (logical Item).

It may be NULL, if the rule is invoked on Non-Item scenario.

ListInput2DFacet List Read List of corresponding 2D (associated logical).
ListInput3DFacet List Read List of corresponding 3D (associated physical).
ArticleSolutions List Read

List of list of references from the Article solution of the 1D.

It may be NULL, if the rule is invoked on Non-Item scenario.

ActionPerformed String Read Action ID before/ after which the rule is invoked.
IsPreAction Boolean Read

True if the rule is invoked before performing action.

False if the rule is invoked after action.

Sample

let i1DList(list)
let i2DList(list)
let i3DList(list)
let iArticleSolutionList(list)
let index(Integer)
let lsize(Integer)
let bIsPreProcess(Boolean)
let facet3DOcc(ProductOccurrence)
let facet2dOcc(LogicalOccurrence)
let facet3DInst(VPMInstance)
let facet2DInst(RFLVPMLogicalInstance)
let sActionPerformed(String)
let sDescriptionInst(String)
let sMessage (String)

set i1DList = Parameters.GetAttributeObject("ListInput1DFacet")
set i2DList = Parameters.GetAttributeObject("ListInput2DFacet")
set i3DList = Parameters.GetAttributeObject("ListInput3DFacet")
set sActionPerformed = Parameters.GetAttributeString("ActionPerformed")

index = 1
Notify(sActionPerformed)
if (NULL<>i1DList)
{
	set lsize = i2DList.Size()
}

Notify ("Pre-post BR executed#",lsize)
for index while index <= lsize
{
	Notify ("Pre-post BR inside For")
	if (i3DList <> NULL and  NULL <> i2DList)
	{ 
		if (0 < i3DList.Size())
		{
			set facet3DOcc= i3DList.GetItem(index)
			set facet2dOcc= i2DList.GetItem(index)
			if (facet3DOcc <> NULL and facet2dOcc <> NULL)
			{ 
				set facet3DInst = facet3DOcc.Instance
				if (facet3DInst <> NULL)
				{
					set sDescriptionInst = facet3DOcc.Name + "_"+ facet2dOcc.Name
					facet3DInst.SetAttributeString("V_description", sDescriptionInst)
					Notify("3D Description updated with 3d Facet names #", sDescriptionInst)
				}
			}
		}
	}
}