Identification Initialization based on input master data

This document is intended to provide a detailed guide about how to customize a Business Rule with opening id PLMIdentificationInitialization to initialize a custom attribute (master attribute) on the custom Mfg. item type.

Introduction

If we need to initialize some attributes (OOTB or Custom) on any specific type (OOTB or Custom) automatically by referring some pre- created data with master attributes (may be file based like csv file), we can achieve it using this opening id.

Version – Example 1&2 :2022x FD01 (FP2205),2023x FD03 (FP.CFA.2323), 2024x FD03 (FP.CFA.2424), 2025x GA

                Example 3: 2022x FD05 (FP.CFA.2241), 2023x FD03 (FP.CFA.2323), 2024x FD03 (FP.CFA.2424), 2025x GA

Pre-requisites:

Licenses –

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

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

Opening ID:PLMIdentificationInitialization
Customization intent:Execution
Execution context:
  • On the cloud: Client

  • On premises: Client/Server

UsageThe goal of the BL is to initialize the identification or attributes values.

Example 1:  Initializing custom attribute on custom Mfg. Assembly type reference by reading master attributes from input csv file

The below example describes how we can initialize a custom attribute value on a custom Mfg. Assembly reference.

The master attribute values are stored in an input csv file which is stored in reffiles folder in the installation.

CSV file path: “ \\win_b64\\reffiles\\plant_code_config.csv”.

The Plant Id values for different plants are saved in a second column of a csv file. Please refer below image for input csv file.

Template CSV Format

Here we have modified the OOTB script “ENONT_PLMReference_BLInitialization.CATRule” to set custom attribute ‘Test_Plant_ID’ on custom type ‘Test_CustoMfgAssembly’ (derived from CreateAssembly).

In similar way it is possible to initialize an OOTB/ Custom attribute on an OOTB/ Custom type.

Example 1 Logical Flow

Below is the logical flow for Example 1 Business Rule

Example 1 Business Rule

ENONT_PLMReference_BLInitialization.CATRule

 

 

Example 1 Detail Explanation

If the plant name (first column in csv file) in the row matches with the current organization name, the Plant ID value for that matching row will be set on the object which is getting created/ cloned/ imported.

For example if the user has logged in with organization ‘”Barcelona”, when user creates a new object of type ‘Test_CustoMfgAssembly’ the BL reads the ‘Plant ID’ value for each row in the csv file. When the Plant Name matches “Barcelona” the attribute ‘Test_Plant_ID’ will be set to value “4502”.

Similarly we can have multiple columns in the csv file. We can use these different attribute values for initialize object attributes as per need of customization.

Logic to open csv file

For iIdxReffilePath while iIdxReffilePath <= iSizeReffilePaths
    {
        let strTempPath (String)
        
        strTempPath = oListReffilePaths.GetItem(iIdxReffilePath)
        strConfigFilePath = strTempPath + "\\\\" + strConfigFileName
        set oConfigFile = OpenTextFile(strConfigFilePath, "r")
        if(NULL  <> oConfigFile)
        {
            //Trace(1,"File # Opened", strConfigFilePath)
            break
        }
    }

Logic to read csv file

strFileContent = oConfigFile->Read()

Logic to match the Plant name and set Plant ID value to attribute ‘Test_Plant_ID’

strListFileContent = SplitString(strFileContent, ",")
if(strListFileContent.Size() > 1)
{
     strPlantNameFromFile = strListFileContent->GetItem(1)
     if(OrgName == strPlantNameFromFile)
     {
         ThisObject->SetAttributeString("Test_Plant_ID",strListFileContent->GetItem(2))
     }
}

Scenarios:

Scenario 1Mfg. Assembly - New Creation
Object creation steps

Please select organization 'Bangaluru' while starting a native client session.

Click on the "+"

icon in the upper right corner and New Content option from the down menu to create Test_CustoMfgAssembly reference object.

 

Result

 

CommentThe Plant_ID attribute value (for Bangaluru Plant) is set with the value from the excel input file.

Other Supported DELMIA Types

When we associate this BL with type ‘DELFmiFunctionReference’ the BL gets invoked on Mfg. Items types and their subtypes. We can extend it to support General System, Workplan, All types of operations as well.

Note:

For different Resource types and Engineering items (Products/ parts) the type ‘VPMReference’ and script ‘ENONT_PLMReference_BLInitialization.CATRule’ can be used for customization.

Example 2:  Initializing Instance Title attribute on Mfg. Assembly by reading prefix value from CATNls file

This example script will initialize the instance name on the Mfg. Assembly.

The script reads the prefix value from CATNls file and sets the Type prefix to the instance name.

CATNls file: "..Installation directory\\win_b64\\resources\\msgcatalog\\PLMEntity.CATNls"

In similar way we can set any other OOTB or custom attributes on the Mfg. item.

Example 2 Logical Flow

Example 2 Business Rule

 

Custom_ENONT_PLMInstance_BLInitialization.CATRule

 

Example 2 Detail Explanation

When we create a new instance of Mfg. Assembly then the instance name attribute gets initialized automatically using this OOTB Business rule.

Here we have modified/ cutomized the OOTB Business Rule "ENONT_PLMInstance_BLInitialization.CATRule".

When the object is being instantiated a Prefix is added to the instance name.

TypePrefix="" 
if ( Reference <> NULL )
{
    if (Reference->IsSupporting("Test_CustoMfgAssembly") == true)
    {
        TypePrefix=BuildMessageNLS("Test_CustoMfgAssembly","PLMInstance.Prefix")
    }
}
else
{
    TypePrefix=BuildMessageNLS("PLMEntity","PLMInstance.Prefix")
}

The required prefix is stored in Test_CustoMfgAssembly.CATNls file for id PLMInstance.Prefix .

Please refer the below entry in CATNls file.

PLMInstance.Prefix          = "Custom_";

In similar way we can initialize any other OOTB or custom attribute on the supported types.

Other Supported DELMIA Types

When we associate this BL with type ‘DELFmiFunctionInstance’ the BL gets invoked on Mfg. Items types and their subtypes. We can extend it to support General System, Workplan, All types of operations as well.

Scenarios:

Scenario Mfg. Assembly - New Creation
Object creation steps

 

 

Result
CommentA new Mfg. Assembly instance is created with instance name prefix: Custom_

Similarly we can initialize attributes for above mentioned types.

Here we can see the instance name of Mfg. Assembly is initialized with the prefix “Custom_”.

In similar way it’s possible to initialize any other existing or custom attribute on the associated type with the required value.

 

Example 3 :  Initializing 'V_SequencingMode' attribute on Header Operation reference by checking the existing value

The below example describes how we can initialize a 'V_SequencingMode' attribute value on a Header Operation reference when it gets instantiated under a workplan object.

 

Example 3 Logical Flow

Below is the logical flow for the Example Business Rule (custom code at the bottom)

 

Example 3 Business Rule

 

Custom_ENONT_PLMInstance_BLInitialization.CATRule

Note: Please copy and paste the custom code at the bottom of this file to your existing 'ENONT_PLMInstance_BLInitialization.CATRule' in the installation folder.

Example 3 Detail Explanation

Here a special API - SetSequencingMode is used to set the "V_SequencingMode" attribute on Header operation reference object.

The commonly used SetAttributeString API does not work here.

 

Note

The SetSequencingMode does not work in 'ENONT_PLMReference_BLInitialization.CATRule' because ThisObject works as a proxy object. Hence, we have used it in 'ENONT_PLMInstance_BLInitialization.CATRule' as a work around.

Please note that the same API SetSequencingMode  works for setting "V_SequencingMode" attribute on Workplan or other similar objects. Simply you have to add the type of object in the initial check in the BL. 

For example: replace the below line from the above EKL code snippet
if (true == plmCoreRef.IsSupporting( "DELLmiHeaderOperationReference"))
with
if (true == plmCoreRef.IsSupporting( "DELLmiWorkPlanSystemReference") OR true == plmCoreRef.IsSupporting( "DELLmiHeaderOperationReference"))

 

Scenarios:

Scenario 

Header Operation - New Creation

Object creation steps

Result

 

Comment

A new Header Operation instance is created with Sequencing Mode = 'Linear'.

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:
 

 

Fact Type for Example 1 : DELFmiFunctionReference

Fact Type for Example 2 : DELFmiFunctionInstance

Fact Type for Example 3: DELLmiHeaderOperationInstance

Reference

Documentation: Attributes Initialization (PLMIdentificationInitialization)

Author

Person of Contact - @Jayshree JADHAV