Renaming Operation after Implement Link Creation

This document is intended to provide a detailed guide and examples on how to customize a Business Rule for opening ID DELPLMSystemOperationOccurrence_ImplementLinkCreationID.

Introduction

When a manufacturing engineer is creating process structure, after creating a scope between System/Workplan and Mfg. Item Structure, he may start assigning Mfg. Items to operation and it may be needed to rename the operation based on the type of the operation and the Mfg. Item dragged and dropped on it. Also, some attributes may needed to be copied from the Mfg. Item to the operation.

By default, after creating the implement link, the Operation is not renamed automatically and no attribute is copied from implemented Mfg. Item to the Operation. 

The OOTB behavior can be changed by customizing the BL "DELPLMOperationOccurrence_ImplementLinkCreation.CATRule", which is already available in the "Your Installation/win_b64/resources/knowledge/scripts/" folder

Version – 2022x FD06 (FP2250), 2023x FD04 (FP2333), 2024x FD04 (FP2332), 2025x GA & 2026 GA

Pre-requisites:

Licenses –

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

Disclaimer: Licenses mentioned above are as per 2022x, 2023x, 2024x, 2025x and 2026x documentation.

PLM Opening IDDELPLMSystemOperationOccurrence_ImplementLinkCreationID
Customization IntentExecution
Execution ContextClient
Usage

This BL is invoked when implement link is created between System/Operation and Mfg. Item/Workplan/Operation.

  1. Can be used to rename the Operation/System/Workplan after creating Implement link.
  2. Can also be used to copy some attributes from Mfg. Item to the Operation after creating the implement link.

 In this WiKi page, we will take a example scenario, in which, we will rename the Operation after an implement link is created. We will rename the operation Reference Title and Instance Name according to its type. 

Example: Rename the Operation Reference and Instance after Implement Link Creation.

Here, the BL "DELPLMOperationOccurrence_ImplementLinkCreation.CATRule" is customized to rename the operations reference and instance objects according to its type. The BL checks the type of the operation and then constructs new strings for renaming of operation reference and instance by combining some prefix strings according to the type of operation and the reference/instance name of Implemented Mfg. Item.

For example,

If the implement link is created between an Operation and a Mfg. Item, then the new operation reference name will be = ["Prefix String" + Title of Mfg. Item Reference] and the operation instance name will be = ["Prefix String" + Name of Mfg. Item Instance]. The prefix will change according to the type of operation.
 

The renaming prefix or the whole renaming string can be customized as needed by customizing the strings.

Logical Flow:

 

Example Business Rule:

 

Detailed Explanation of the Scenario

In this section, we will take a look at a scenario, after the BL is customized. Here, we will create implement link between some operations and Mfg. Item. The operations will get renamed automatically as per their type.

Let us consider the example given below:

In above data set, the "Workplan" is scoped with "Mfg_Assembly". The workplan contains one Header Operation having some step operations under it. 

Now, we will create implement link between the "Loading Operation00000526" and the "Part_1" provided part. Implement link can be created by assigning the Part_1 to the operation using assignment manager or drag and drop.

After creating the implement link, the Reference and Instance of loading operation will get renamed automatically as given below.

 

The renaming for Loading Operation is done as given below:

  • Loading Operation Reference Name = "Install " + [Reference Name of implemented Mfg. Item]
  • Loading Operation Instance Name = "Install " + [Instance Name of implemented Mfg. Item]
The renaming prefix will differ as per the type of the operation. 

Now, we will create implement links between remaining operations and Mfg. Item as given below:

 

After creating implement links, the operations will get renamed automatically. The renaming prefix will be different for different types of operation as given below.

 

Note: The prefix for each type of operation can be customized as needed.

Working of the Business Logic

Whenever an Implement link is created between a System/Operation and a Mfg. Item/Workplan/Operation, the opening id “DELMSDAllowOperationAsSystem_ID” gets invoked and the BL "DELPLMOperationOccurrence_ImplementLinkCreation.CATRule" gets executed.

This opening id has three Context Object Parameters.

Parameter NameTypeIs it to Read/Write?Purpose
iProcessOccurrenceMfgProcessOccurrenceRead

Mfg. Item occurrence, implemented by the Operation iSystemOperationOccurrence.

This parameter gives the Mfg. Item implemented by the Operation/System/Workplan

iWorkplanOperationOccurrenceProdSystemOccurrenceRead

WorkplanOperation occurrence, implemented by the iSystemOperationOccurrence.

If any System have implemented an workplan, then this parameter given the implemented workplan object.

iSystemOperationOccurrenceProdSystemOccurrenceRead/Write

System or Operation occurrence, implementing iProcessOccurrence or iWorkplanOperationOccurrence.

This Parameter gives the System/Workplan/Operation on which, the implement link is created.

 

Logic Used:

In this BL, logic is written to check the type of the operation and rename the operation accordingly. In the script, 1st, the Reference and instance names of the implemented Mfg. Item are retrieved. Then the type of the operation is checked and the new name is constructed by adding prefix string according to the type of the operation and attributes from Mfg. Item. After the new renaming string is created, only first 96 characters are extracted to avoid the overflow of the attribute value. At last, the operation reference and instance are renamed with the new names.  

Logic to check operation type and its renaming prefix:

In the business rule, "if else if" blocks are used to decide the prefix string according to the type of operation.

/* ---- Section to decide prefix string according to operation type ---- */
if(OperationRef.IsASortOf("DELLmiLoadingOperationReference"))
{
   Set NewOprRefName = "Install " + MfgItemRefName
   Set NewOprInstName = "Install " + MfgItemInstName
}
else if(OperationRef.IsASortOf("DELLmiUnloadingOperationReference"))
{
   Set NewOprRefName = "Unload " + MfgItemRefName
   Set NewOprInstName = "Unload " + MfgItemInstName
}
else if(OperationRef.IsASortOf("DELLmiPunctualOperationReference"))
{
   Set NewOprRefName = "Point Fasten " + MfgItemRefName
   Set NewOprInstName = "Point Fasten " + MfgItemInstName
}
else if(OperationRef.IsASortOf("DELLmiCurveOperationReference"))
{
   Set NewOprRefName = "Curve Fasten " + MfgItemRefName
   Set NewOprInstName = "Curve Fasten " + MfgItemInstName
}
else if(OperationRef.IsASortOf("DELLmiTransferOperationReference"))
{
   Set NewOprRefName = "Transfer " + MfgItemRefName
   Set NewOprInstName = "Transfer " + MfgItemInstName
}
/* ---- End of: Section to decide prefix string according to operation type ---- */

Once the Prefix string is decided, then the operation reference title and instance name is renamed.

/* ---- Section to Rename the Operation Attributes ---- */
                RefNameSize = NewOprRefName.Length()                
                if (RefNameSize <> 0)
                {
                    if (RefNameSize>100)
                    {
                        NewOprRefName=NewOprRefName.Extract(0,96)+ "..."  //Reduce the string length to 100 characters
                    }
                    OperationRef.V_Name = NewOprRefName  //Set the operation Reference Title
                }
                
                InstNameSize = NewOprInstName.Length()
                if (InstNameSize <> 0)
                {
                    if (InstNameSize>100)
                    {
                        NewOprInstName=NewOprInstName.Extract(0,96)+ "..."   //Reduce the string length to 100 characters
                    }
                    OperationInst.Name = NewOprInstName  //Set the operation Instance Name
                }                
                /* ---- End of: Section to Rename the Operation Attributes ---- */

How to customize the BL?

Customize the BL to support renaming of other/custom operation types.

In the current sample BL, renaming conditions are added for only few of the operation types. "If else if" statement is used to check the type of operation and decide the prefix string. If one wants, they can add conditions to decide prefix for any desired operation type by adding extra "else if" block in the below section of code.

/* ---- Section to decide prefix string according to operation type ---- */
.

.
/* ---- End of: Section to decide prefix string according to operation type ---- */

Customize the BL to Copy Attributes from Mfg. Item to Operation

One can also customize the BL to copy any attribute of Mfg. Item on any attribute of Operation.

If one want different attributes to be copied for different types of operations, one can add the line of code to copy the attributes in the section of code, where the prefix string is decided according to the operation type.

For example, if the operation is of type "Loading operation" then, one want to copy the Mfg. Item reference attribute on Operation reference, then the logic will be added in the section of code as given below:

/* ---- Section to decide prefix string according to operation type ---- */
if(OperationRef.IsASortOf("DELLmiLoadingOperationReference"))
{
  Set NewOprRefName = "Install " + MfgItemRefName
  Set NewOprInstName = "Install " + MfgItemInstName

  /* ---- Section of code to copy attributes ---- */
​​​​​​​  //Copy Mfg. Item Ref. description to Operation Ref. Description
  OperationRef.V_description = ​​​​​​​MfgItemRef.V_description
 
  //Copy Mfg. Item Inst. description to Operation Instance Description
  OperationInst.V_description = MfgItemInst.V_description  
 /* ---- End of: Section of code to copy attributes ---- */
}
.
.
//"Else if" Condition statements for other types of operations
.
.

/* ---- End of: Section to decide prefix string according to operation type ---- */

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:

References

Documentation for Opening ID:DELPLMSystemOperationOccurrence_ImplementLinkCreationID

Authors

Author: @KA ​​​​​​​