Edit Token State (PLMEditionTokenChange)

An opening ID is an entry point used to customize business logic. PLMEditionTokenChange defines the objects to be automatically delegated or waived when users export content with the Export 3DXML batch file.

For more information, see Social and Collaborative | System Exchange | Exchange Management | Exchange Management | 3DXML Exchanges | Using B.I. Essentials | Site Information | About Site Ownership.

Note: For more information about customization by business rules, see Customization by Business Rules.

This page discusses:

General Information

This opening ID is invoked when users export content to 3DXML with the Export 3D XML batch file. It applies to all the objects selected for the export, and the objects corresponding to the expand depth users specify.

This opening ID is used to customize which exported objects are automatically delegated or waived, so that users do not have to manually select these actions for each object.

Users can choose to use this business logic or not from native apps preferences, with the Automatically delegate or waive objects during export option. By default, only references and instances are delegated. Users can select the Delegate representations when using the Export 3D XML batch option to extend the delegation scope to the representation references and representation instances. For more information, see 3DEXPERIENCE | Preferences | Desktop Apps Preferences | Desktop Apps Preferences | App Preferences | Social and Collaborative | Global Design Management | Exchange Management: 3DXML.

Definition Description
PLM Opening ID PLMEditionTokenChange
Customization intent Computation
Execution context Client

Input Objects

Input objects must be of the following types:

  • ThisObject
  • Parameters corresponds to the context object.
  • Validation

Context Object Parameters

Parameter Name Type Read or Write Comments
OperationId String Read The opening ID is invoked only if you specify this operation ID: ExportWithDelegationAndWaive
CurrentEditionTokenStatus String Read The current Edit Token Status of the object (for example, LOCAL).
Policy String Read The policy of the object.
NextEditionTokenState String Write The required Edit Token Status for the object after export, to specify whether delegation or waive is performed during the export.

Possible values depend on the current status of the object :

Current Status (CurrentEditionTokenStatus) Required Status After Export (NextEditionTokenState) Operation Performed During the Export
LOCAL or EXCHANGED DELEGATOR Delegation
DELEGATED FORWARD Delegation
DELEGATED DISTANT Waive
Keep current status NONE None

Sample

The following sample explains how to specify whether Delegation or Waive operations are applied during the export to 3DXML.

  1. Create a .CATRuleExit file in resources/knowledge/scripts.
    <Scripts>
      <Script OpeningID="PLMEditionTokenChange" Type="Feature" ScriptName="NotifyObjectsForDelegationWaive">
      <Condition Attribute="OperationId" Value="ExportWithDelegationAndWaive"/>
      </Script>
    </Scripts>

    with the following elements:

    • OpeningID: always PLMEditionTokenExchange
    • Type: Feature to invoke the business logic for all object types, or the name of the specific object type you want to call the business logic for (for example, VPMReference).
    • ScriptName: The name of the CATRule file implementing the business logic.
    • Condition Attribute="OperationId": always ExportWithDelegationAndWaive

  2. Create a .CATRule file containing the details of the business logic in resources/knowledge/scripts. Name the file according to the ScriptName element you specified in the .CATRuleExit file (here: NotifyObjectsForDelegationWaive.CATRule).
    • To apply a Delegation operation:
      Let OperationIdType(string)
      Let CurrentEditionTokenStatus(string)
      
      Let vExternalId(string)
      Let vV_Name(string)
      
      vExternalId=""
      vV_Name=""
      
      OperationIdType = Parameters->GetAttributeString("OperationId")
      CurrentEditionTokenStatus = Parameters->GetAttributeString("CurrentEditionTokenStatus")
      
      if( ThisObject->HasAttribute("V_Name") == true )
      {
          vV_Name   = ThisObject->GetAttributeString("V_Name")
      }
      
      if( ThisObject->HasAttribute("PLM_ExternalID") == true )
      {
          vExternalId   = ThisObject->GetAttributeString("PLM_ExternalID")
      }
      
      if( OperationIdType == "ExportWithDelegationAndWaive" )
      {
      	if((CurrentEditionTokenStatus == "Local"))
      	{
      		if(vV_Name == "ChildProduct_001")
      		{
      			Parameters->SetAttributeString("NextEditionTokenState","Delegator")
      		}
      		else if(vExternalId == "ChildProduct_001.1")
      		{
      			Parameters->SetAttributeString("NextEditionTokenState","Delegator")
      		}    }
      }
      
    • To apply a Waive operation:
      Let OperationIdType(string)
      Let CurrentEditionTokenStatus(string)
      
      Let vExternalId(string)
      Let vV_Name(string)
      
      vExternalId=""
      vV_Name=""
      
      OperationIdType = Parameters->GetAttributeString("OperationId")
      CurrentEditionTokenStatus = Parameters->GetAttributeString("CurrentEditionTokenStatus")
      
      if( ThisObject->HasAttribute("V_Name") == true )
      {
          vV_Name   = ThisObject->GetAttributeString("V_Name")
      }
      
      if( ThisObject->HasAttribute("PLM_ExternalID") == true )
      {
          vExternalId   = ThisObject->GetAttributeString("PLM_ExternalID")
      }
      
      if( OperationIdType == "ExportWithDelegationAndWaive" )
      {
      	if((CurrentEditionTokenStatus == "Delegated"))
      	{
      		if(vV_Name == "ChildProduct_002")
      		{
      			Parameters->SetAttributeString("NextEditionTokenState","Distant")
      		}
      		else if(vExternalId == "ChildProduct_002.1")
      		{
      			Parameters->SetAttributeString("NextEditionTokenState","Distant")
      		}    }
      }