Before Item Move (DELMA_ReparentableProcessValidation_ID)

An opening ID is an entry point used to customize business logic. Before Item Move is an opening ID that can be run before moving an item. It checks if the item can be moved under another parent or not.

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 you with information related to the definition of the opening ID.

PLM Opening ID DELMA_ReparentableProcessValidation_ID
Customization intent Validation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject: Item occurrence to be moved.
  • Parameters corresponds to the context object.
  • Validation

Context Object Parameters

Parameter NameTypeRead/WriteComments
iTarget MfgProcessOccurrenceReadOccurrence of the target (that is, the new parent of the moved item).
ValidationBoolean WriteChecks if the item can be moved.

Sample

The following sample checks if an item can be moved.

Let iProcess(MfgProcessOccurrence)
Let iTarget(MfgProcessOccurrence)
Let AttValue(String)
Let ProcessInstance(DELFmiFunctionInstance) 
Let TargetInstance(DELFmiFunctionInstance) 
Let ProcessName(String)
Let TargetName(String)
Let ProcessTest(String)
Let TargetTest(String)
Let ReturnMessage(String)

Validation = true
ReturnMessage =""

set iProcess = ThisObject
if ( NULL <> iProcess)
{
    set iTarget = Parameters->GetAttributeObject("iTarget")
	set TargetInstance = iTarget.Instance
    if (TargetInstance <> NULL )
    {
      TargetName = TargetInstance->GetAttributeString("PLM_ExternalID")
	  TargetTest=TargetName.Extract(0,3)
   }
   
   set ProcessInstance = iProcess.Instance
   if (ProcessInstance <> NULL )
   {
      ProcessName = ProcessInstance->GetAttributeString("PLM_ExternalID")
      ProcessTest=ProcessName.Extract(0,3)
                              if (ProcessTest <> "Yes" OR TargetTest <> "Yes")
     {
         Validation = false
         ReturnMessage = "The business logic does not allow reparent of "+ProcessName+ " on " + TargetName
    }
 }
                     }

                     Parameters.SetAttributeString("Message",ReturnMessage)