Initialize Mfg. item attributes from Implemented Eng. item

Introduction

If we have few attributes on EBOM which are useful for manufacturing planning then we can copy those attribute values to MBOM based on scope link or implement link between MI and EI using this BL opening id.

This BL gets triggered when a scope link or implement link is created between the MI and EI.

The following examples describe how this can be achieved.

  • There are two business rule examples here on the same opening id.
  • First example business rule initializes the ‘Reference attributes’ on MI based on scope link.
  • Second example business rule initializes the ‘Instance attributes’ on MI based on implement link.

Here in these examples the attributes on MI are initialized (when a new MI is created). The attributes on MI are not modified once it is saved (in case of reuse of already created MI reference).
 

Version – 2022x FD01 (FP2205) & 2023x FD04 (FP2333) ,2026x GA

Pre-requisites:

Licenses –

  • PPL(Process Engineer): required to create Mfg. Assembly object.

Disclaimer: Licenses mentioned above are as per 2022x & 2023X documentation.

PLM Opening IDDELPLMFProcessOccurrence_ImplementLinkCreationID
Customization intentExecution
Execution contextClient
Usage

Executed after Assignment of EI to MI OR Re-route of an Implement Link or Scope Link.

Typically leveraged to initialize attributes on MI based on EI.

Naming Convention used for this document:

EI Engineering item
MI Manufacturing item

Example 1: Initialize reference attributes on MI from EI based on scope link

This example shows how the reference attributes on MI can be initialized by copying the useful reference attribute values from EI based on scope link.

Example 1: Logical Flow

 

Example 1: Business Rule

 

DELPLMFProcessOccurrence_ImplementLinkCreationReference.CATRule

 

Detail Description:

When we create a scope link between MI and EI, this business rule gets invoked.

If the MI is created new and is not yet saved (no maturity state defined for it: maturity = “”), the ‘Reference Title’, ‘Reference Description’ and ‘Custom_ERP_PartNumber’ of MI are initialized to following values

  • Reference Title of MI = Reference Title of EI
  • Reference Description of MI = Reference Description of EI + Reference Title of EI + Revision of EI
  • Custom_ERP_PartNumber of MI = Custom_ERP_PartNumber of EI (custom attribute on EI and MI reference)

Logic to check if MI object is not yet saved

if( Maturity == "" )

Logic to initialize Reference Title on MI

if ((ProcRef->HasAttribute("V_Name") == true) and (PartReference->HasAttribute("V_Name") == true))
{
               PartName = PartReference->GetAttributeString("V_Name")
               set  NewProcessName = PartName
                                                                                                           
               strRevision = PartReference->GetAttributeString("V_version")

               NameSize=NewProcessName.Length()

               if (NameSize>100)
               {
                               NewProcessName=NewProcessName.Extract(0,96)+ "..."
               }
               ProcRef.V_Name = NewProcessName
}

Logic to initialize Reference Description on MI

if ((ProcRef->HasAttribute("V_description") == true) and (PartReference->HasAttribute("V_description") == true))
{
      ProcRef.V_description =  PartReference.V_description + "  " + ProcRef.V_Name + " rev-" + strRevision
}

Logic to initialize Custom Reference Attribute - Custom_ERP_PartNumber on MI

if ((ProcRef->HasAttribute("Custom_ERP_PartNumber") == true) and (PartReference->HasAttribute("Custom_ERP_PartNumber") == true))
{
     strCustomPartNumber = PartReference.GetAttributeString("Custom_ERP_PartNumber")

     if(strCustomPartNumber <> "")
     {
          ProcRef.SetAttributeString("Custom_ERP_PartNumber",  strCustomPartNumber)
     }
}

In similar way we can extend this functionality to initialize a set of attributes on MI from EI according to the requirement based on scope link creation.

Example 1: Scenarios:

InputResults
Scenario1:Create scope between Root EI and Root MI

 

 

 

 

 

 

 

 

 

 

 

 

 

 

The reference attributes Title, Description and Custom_ERP_PartNumber are copied from Physical Product1 to MI.

Scenario 2:Run CUPS command and select Root EI and Root MI

 

 

 

 

 

 

 

 

 

 

 

 

 

The reference attributes Title, Description and Custom_ERP_PartNumber are copied from Physical Product1 to MI.​​​​​​​

Example 2: Initialize reference attributes on MI from EI based on implement link

This example shows how the instance and reference attributes on MI can be initialized by copying the useful reference and instance attribute values from EI based on implement link.

Example 2: Logical Flow

 

 

Example 2: Business Rule

 

DELPLMFProcessOccurrence_ImplementLinkCreationInstance.CATRule

 

Detail Description:

When we create an implement link between MI and EI this business rule gets invoked.

If the MI is created new and is not yet saved (no maturity state defined for it: maturity = “”), the ‘Instance Title’ and ‘Instance Description’ of MI are initialized to following values

  • Instance Title of MI = Instance Title of EI

  • Instance Description of MI = Instance Description of EI

Logic to check if MI object is not yet saved

if( Maturity == "" )

Logic to initialize Instance Title on MI

if ((ProcInst->HasAttribute("PLM_ExternalID") == true) and (PartInstance->HasAttribute("PLM_ExternalID") == true))  
{
        Trace(1 , "### Process instance naming")

        PartName = PartInstance->GetAttributeString("PLM_ExternalID") 

        set  NewProcessName =  PartName                                      
        NameSize=NewProcessName.Length()
        if (NameSize>100)
        {
             NewProcessName=NewProcessName.Extract(0,96)+ "..."
        }
        ProcInst.PLM_ExternalID = NewProcessName 
}

Logic to initialize Instance Description on MI

if ((ProcInst->HasAttribute("V_description") == true) and (PartInstance->HasAttribute("V_description") == true))  
{
     ProcInst.V_description  = PartInstance.V_description
}

If the MI is of type ‘Provide’ then the ‘Reference Title’, ‘Reference Description’ and ‘Custom_ERP_PartNumber’ of Provide are initialized to those attribute values from EI.

  • Reference Title of Provide = Reference Title of EI

  • Reference Description of Provide = Reference Description of EI + Reference Title of EI + Revision of EI

  • Custom_ERP_PartNumber of Provide = Custom_ERP_PartNumber of EI (custom attribute on EI and MI reference)

Logic to initialize Reference Title on Provide

if ((ProcRef->HasAttribute("V_Name") == true) and (PartReference->HasAttribute("V_Name") == true)) 
{
     /* Set the V_Name attribute (Title in UI) of the Process Reference by copying the V_Name      attribute of the implemented Eng Item */

     ProcRef.V_Name = PartReference.V_Name
}

Logic to initialize Reference Description on Provide

if ((ProcRef->HasAttribute("V_description") == true) and (PartReference->HasAttribute("V_description") == true))
{
      ProcRef.V_description =  PartReference.V_description + "  " + ProcRef.V_Name + " rev-" + strRevision
}

Logic to initialize Custom Reference Attribute - Custom_ERP_PartNumber on Provide

if ((ProcRef->HasAttribute("Custom_ERP_PartNumber") == true) and (PartReference->HasAttribute("Custom_ERP_PartNumber") == true))
{
       strCustomPartNumber = PartReference.GetAttributeString("Custom_ERP_PartNumber")

       if(strCustomPartNumber <> "")
       {
            ProcRef.SetAttributeString("Custom_ERP_PartNumber",  strCustomPartNumber)
       }
}

In similar way we can extend this functionality to initialize a set of attributes on MI from EI according to the requirement based on implement link creation.

Example 2: Scenarios:

InputResults
Scenario 1:Create implement link by drag and drop Part1 on Root Mfg. Assembly

 

 

 

 

 

 

 

 

 

 

The instance attributes Title and Description are copied from Part1 to Provided part.

 

 

 

The reference attributes Title, Description and Custom_ERP_PartNumber are copied from Part1 to Provided part.

 

 

 

 

Scenario 2:Run CUPS command and select Root EI and Root MI

 

 

 

 

 

 

 

 

 

The instance attributes Title and Description are copied from Part1 to Provided part.

 

 

 

The reference attributes Title, Description and Custom_ERP_PartNumber are copied from Part1 to Provided part.

 

 

 

Business Rule Deployment

You may refer the below page for Business Rule deployment.

How to Deploy Business Rule

For deployment using Data Setup app following Resource set ID and opening needs to be used:

Resource Set ID:

 

 

Opening ID:
 

 

 

Reference

Documentation: After Product or Part-Item Implement Link Creation (DELPLMFProcessOccurrence_ImplementLinkCreationID)​​​​​​​

Author

Author: @JJ ​​​​​​​

Person of Contact - @JJ & @KA