After Operation Instantiation (DELPLMRelationAfterEstablishment)

An opening ID is an entry point used to customize business logic. This opening ID is run after the instantiation of an operation to create a product flow between an existing operation and the created operation instance, and then create a time analysis under the operation instance.

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

The table below provides information related to the definition of the opening ID.

PLM Opening IDDELPLMRelationAfterEstablishment
Customization intent Execution
Execution contextClient

Input Objects

Input objects must be of the following types:

  • Parameters: Corresponds to the context object.

Context Object Parameters

Parameter NameTypeRead/WriteComments
SourceList ReadList of size 1 including a DELLmiPPRSystemReference or DELLmiOperationPPRReference
TargetList Read List of size 1 including a DELLmiOperationPPRReference
RelationTypeStringReadIts value is OperationPPRInstance
RelationObjectObjectTypeRead Set with a DELLmiOperationPPRInstance

Sample

The following sample shows how to use the opening ID to create a product flow between an existing operation and the created operation instance, and then create a time analysis under the operation instance.

// Parameters
let PointingObjSystemOperation(List)
let PointedObjOperation(List)
let RelationName(String)
let OpInstance(DELLmiOperationPPRInstance)
let RepInstTimeAnalysisToCreate(DELTimeAnalysisRepInstance)
let SubsystemValue(String)
let OperationInstance(DELLmiOperationPPRInstance)
let TimeConstraintAsTarget(DELLmiTimeConstraintCnx)
let CurrentOperation(DELLmiOperationPPRInstance)
let ChildrenOperationList(List)
let CurentOperationList(List)
let Integ(Integer)
let NbOpInst(integer)
let OperationReference(DELLmiOperationPPRReference)
let FatherSystemOperation(DELLmiPPRSystemReference)
let PointedObjOperationInst(List)

set PointingObjSystemOperation = Parameters->GetAttributeObject("Source")
set PointedObjOperation = Parameters->GetAttributeObject("Target")
set RelationName = Parameters->GetAttributeString("RelationType")
set OpInstance = Parameters->GetAttributeObject("RelationObject")

// get the operation Ref from param
OperationReference = PointedObjOperation.GetItem(1)


// create the TA under the Operation
If (OperationReference <> NULL)
{
                if (RelationName == "OperationPPRInstance")
                {
                                If (OperationReference <> NULL )
                                {
                                      SubsystemValue = OperationReference.V_Subsystem 
                                      set RepInstTimeAnalysisToCreate = new("DELTimeAnalysisRepReference","test",OperationReference)
                                }
                }
}


// get the sister Operations
Set FatherSystemOperation = PointingObjSystemOperation.GetItem(1)
set ChildrenOperationList = FatherSystemOperation.Children

                
// take the first operation that doesn't have a target Time constraint 
set Integ = 1
for Integ while Integ < ChildrenOperationList.Size()
{
                set CurrentOperation = ChildrenOperationList.GetItem(Integ)
                if (OpInstance <> CurrentOperation)
                {
                                CurentOperationList.RemoveAll()
                                CurentOperationList.AddItem(CurrentOperation, 0)
                                set TimeConstraintAsTarget = GetPointedAsTargetTimeConstraintsList(CurentOperationList)
                                if (TimeConstraintAsTarget == NULL)
                                {
                                        break
                                }
                                else
                                {
                                        CurentOperationList.RemoveAll()
                                }
                }
                Integ = Integ + 1
}

// create a product flow betwen this operation and the newly created one
if (CurentOperationList.Size() > 0)
{
                PointedObjOperationInst.AddItem(OpInstance, 0)
                CreateTimeConstraint(CurentOperationList,PointedObjOperationInst)
}