Migration Attributes Valuation (PLMMigrationAttributesValuation)

An opening ID is an entry point used to customize business logic. Migration Attributes Valuation (PLMMigrationAttributesValuation) can be used in BatchV4V6 context only for the moment. During the BatchV4V6 migration, the client can pre-valuate the mandatory attributes or customize the free PLM attributes by reading the V4 source data, the migration information and also the original representation properties which need to be migrated. The client can choose the useful information to evaluate the attributes by scripting.

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: PLMBLMigrationAttributesValuation
Customization intent: Execution
Execution context:Client

Input Objects

Input objects must be of the following types:

  • ThisObject
  • Parameters corresponds to the context object.

Context Object Parameters

Parameter NamesTypesRead/WriteComments

ThisObject

PLMEntity

Write

This is a PLM proxy object with the same top modeler type and custo type as the PLM entity to create on which attribute valuation is requested.

During BatchV4V6 migration, its attributes can be modified by the rule defined in the scripts.

OperationId

string

Read

Parameter used to identify the context of usage of the BL. Authorized values is:

BatchV4V6 for BatchV4V6 migration command only for the moment.

IdString

string

ReadParameter used to pre-evaluate the identifier attribute. This information comes from UI (Tools>Options). Can be interpreted as a prefix for instance. May be not used by the Business Logic.

OriginalRepRefPropertiesModel

PLMEntity

Read

Parameter valuated when OperationId="BatchV4V6". This parameter is used to retrieve the list of the attributes of the original representation reference with the V4 model to migrate inside. The content of this list depends on the modeller type to which the proxy (OriginalRepRefPropertiesModel) belongs.

MigrationPropertiesfeatureReadParameter valuated when OperationId="BatchV4V6". This parameter is used to retrieve the list of user’s migration properties. In the list, there are two kinds of information. First, is the information about the migration option like migration structure option, the proposed name of the new component, the second kind of information are about the V4 entity properties like, from which V4 model, from which Workspace etc.
PolicyStringReadPolicy name.

Note: If PLMMigrationAttributesValuation is available, a deployment extension can be added by BL. If BL is not available a default extension will be added to proxy. The modeler explicit-factory creates the component using the proxy..

Sample

The following sample shows how to:

  • Initialize the naming of a Representation Reference from the proposed name in MigrationProperties feature. (V_Name attribute is suffixed by a time stamp)
  • Initialize the description attribute of a Reference from the migration structure option in OriginalRepRefPropertiesModel PLMEntity.
  • Add deployment extension DeploymentExt1. This is an example, please verify the actual extension(s) available.

To achieve this particular business logic implementation, a CATRuleExit file, known as family, declares the script to run each time a BatchV4V6 command is started:

<Scripts>
    <Script OpeningID="PLMMigrationAttributesValuation"
            Type="VPMReference"
            ScriptName="MigrationAttributesValuation_Reference">
            <Condition Attribute="OperationId" Value="BatchV4V6" />
    </Script>
    <Script OpeningID="PLMMigrationAttributesValuation"
            Type="VPMRepReference"
            ScriptName="MigrationAttributesValuation_RepReference">
            <Condition Attribute="OperationId" Value=" BatchV4V6" />
   <Script OpeningID="PLMMigrationAttributesValuation"
            Type="VPMReference"
            ScriptName="MigrationAttributesValuation_Reference_DExt">
            <Condition Attribute="OperationId" Value=" BatchV4V6" />
  </Scripts>

This family references the script that contains the business logic implementation, which looks like the following CATRule file:

  1. MigrationAttributesValuation_RepReference.CATRule: The script is based on a user knowledge package which provides a function DateFormat to get a time stamp.

    Let MigrPropFeat(PLMEntity) 
    Let Name(string)
     
    if(Parameters->HasAttribute("MigrationProperties")== true)
    { 
       MigrPropFeat = Parameters->GetAttributeObject("MigrationProperties")    
       if(MigrPropFeat <>NULL and MigrPropFeat->HasAttribute("ProposedName") == true)
    	Name = MigrPropFeat->GetAttributeString("ProposedName")
       else		
            Name = “No name proposed!”
    }
    if(Name <> "") 
    {
       if ( ThisObject->HasAttribute("V_Name") == true )	
    	ThisObject.V_Name= Name + "_" + DateFormat("%Y-%m-%d_%Hh%M")
    }
    
  2. MigrationAttributesValuation_Reference.CATRule:
    Let OriginalRefRef(PLMEntity) 
    Let Discription(string)
     
    if(Parameters->HasAttribute("OriginalRepRefPropertiesModel")== true)
    { 
       OriginalRefRef = Parameters->GetAttributeObject("OriginalRepRefPropertiesModel")    
       if(OriginalRefRef<>NULL and OriginalRefRef->HasAttribute("OptionStructration ") == true)
    	Discription = OriginalRefRef->GetAttributeString("OptionStructration")
       else		
             Discription = “Error, no structraion option!”
    }
    if(Discription <> "") 
    {
       if ( ThisObject->HasAttribute("V_description") == true )	
    	ThisObject->SetAttributeString("V_description",Description)
    }
    
  3. MigrationAttributesValuation_Reference_DExt.CATRule :
    Let DExt (string)
    DExt = “DeploymentExt1”
    ThisObject->AddExtension("DICIRPC2Deployment")

Recommendations

Before using an input parameter, you have to check its value. For example, to check if the OperationId parameter is valuated or not, use the following code sequence:

...
if (Parameters->HasAttribute("OperationId")== true)
OPId = Parameters->GetAttributeString("OperationId")
if(OPId <> "")
{
...

A typical usage of the IdString parameter is to interpret it as a prefix.