transition Command

The Transition command supports the migration of a database from one revision to another. The Transition command does not change base-level schema definitions, but supports cases where it is necessary to combine a change to administration definitions (policy, relationship) with a corresponding adjustment of the data stored for business objects and/or connections controlled by those definitions.

The Transition command manages its own transaction and will not run within another transaction and should never be run on a server in a concurrent environment.

This page discusses:

User Level

Business Administrator

Syntax

The command uses this syntax.

transition [TRANSITION_ITEM];
  • TRANSITION_ITEM can be one of the following:
    Transition Item Description For More Information
    attribute Copies or converts the existing values for an attribute to values for another attribute.

    This command modifies the attribute, it does not create a new attribute.

    Transition Attribute
    cestamp Updates the cestamp for specified attributes. Transition cestamp
    changesov Changes the Secondary Ownership Vector (SOV) for policies. For more information, see . Transition ChangeSOV
    dynamic-relationship Mutates existing PLMInstance relationship types and instances to be dynamic relationships. Transition Dynamic-Relationship and MQL Concepts: Dynamic Relationships
    interfacerulesflag Updates the cInterfaceRulesFlag on business objects. Transition Interfacerulesflag
    relationship Changes a relationship into a pathtype. Transition Path Relationship
    path split Changes the pathtype based on an existing pathname and two matching attribute/value pairs. Transition Path Split
    project_org Updates the project and organization for all objects governed by specified policies. Transition Project_Org
    published-flags Fixes the published/best-so-far bits in the mxIdent or lxRev field based on the state of the object. Transition Published-Flags and MQL Concepts: Published States
    relationship Changes the relationship type of an existing connection to another relationship. Transition Relationship
    revisions Creates major versions from existing data that has been mapped to minor revisions by the upgrade command. Transition Revisions
    updatestamp Updates the values of the updatestamp for an attribute. Transition Updatestamp

Transition Attribute

The Transition Attribute command migrates attribute values by copying or converting the existing value. You can also convert the attribute from one type to another, such as converting from string to shortbinary or from string to enum.

Transition Attribute Syntax

Use this syntax to execute the transition attribute command.

transition attribute |copy ATTRIBUTENAME to ATTRIBUTENAME                                                      |
                     |convert ATTRIBUTENAME to ATTRIBUTENAME map [VALUE_SRC VALUE_DEST]+                       |
                     |from SOURCEATTRIBUTENAME relationship SOURCERELNAME [orderby ORDERBYATTRNAME [start N]] 
                           to TARGETATTRNAME [cleanup]                                                         |
                     |keepformat ATTRIBUTENAME [vault VAULT] [override [X,Y]]                                  |
                     |split ORIGINAL_ATTRNAME NEW_ATTRNAME for TYPE|RELATIONSHIP TARGETTYPE                    |

Copy Clause

The copy clause uses this syntax to copy values from one attribute to another.

transition attribute copy ATTRNAME1 to ATTRNAME2;

The copy clause copies the current value of ATTRNAME1 to ATTRNAME2. If ATTRNAME2 is not associated with any business object type or relationship type, the command copies the value atomically with the data copy. If ATTRNAME2 is associated with business types, relationship types, or interfaces, the set of types must exactly match the set of types associated with ATTRNAME1. If not, the command errors out.

ATTRNAME1 and ATTRNAME2 must be the same data types, cannot be multi-values attributes. If the attribute value is missing on an object, the new attribute value will also be missing.

For string attribute values that overflowed to the lxDesc table, the Transition Attribute Copy command copies and inserts new rows in lxDesc in addition to the rows in lxString.

The command manages its own transaction and will not run within another transaction. If the attributes do not exist, the command errors out.

Convert Clause

The convert clause converts the datatype of the attribute and maps the values from the source attribute to the destination attribute. You can also convert the datatype of the attribute.

Converting Attribute Values

The convert clause changes the value from ATTRNAME1 to ATTRNAME2 for the specified object type based on a defined map:

transition attribute convert ATTRNAME1 to ATTRNAME2 type TYPENAME 
map VALUE_SOURCE VALUE_DESTINATION +;

Each value is a single MQL token, and you can use the MQL escape to support embedded quotes in values. ATTRNAME1 can be an integer or real data type, or a string type with a limited number of values. ATTRNAME2 can be an integer, real, or string data type. ATTRNAME1 and ATTRNAME2 cannot be dates, Booleans, or binary datatypes.

The convert clause allows you to make these datatype conversions:

  • String to integer
  • String to real
  • Real to string
  • Integer to string

For multi-value attributes, you can only convert from integers to strings. You cannot convert multi-value attributes to an attribute defined with a dimension.

When converting to or from a string, the integer or real attribute can have a dimension defined, but it can only be a single-value attribute and the command can only specify units defined for the dimension. All values specified for the dimensioned-attribute in the command must use the same units.

The attribute values must be compatible:

  • For all existing values of ATTRNAME1 (distinct values in the corresponding lx table), ATTRNAME2 must have a corresponding range value AND the map must define that correspondence.
  • If ATTRNAME2 is a real or integer data type, the <VALUE_DESTINATION> values must provide valid integer or real values.
  • If ATTRNAME2 has an associated dimension, the <VALUE_DESTINATION> values must correspond to the default dbunits.
  • If ATTRNAME1 is a multi-value attribute, ATTRNAME2 must also be a multi-value attribute.

If ATTRNAME2 is not associated with a business or relationship type, the command changes the value atomically with the data conversion. If ATTRNAME2 is associated with business types, relationship types, or interfaces, the set of types must exactly match the set of types associated with ATTRNAME1. If not, the command errors out.

The command manages its own transaction and will not run within another transaction. If the attributes do not exist, the command errors out.

Converting Attribute Types

Use this syntax to convert the type of an attribute:

transition attribute convert OLDATTRNAME to NEWATTRNAME attribute ATTR_TYPENAME;

For example, you can convert an attribute originally defined as string to an enum attribute:

transition attribute Colors to ColorRange attribute enum;

When converting a string attribute to a shortbinary attribute, the values in the string attribute must be hexadecimal. For example:

transition attribute String1 to Hex1 attribute shortbinary;

Example Converting Integers to Range Values

This example converts an attribute named ColorInt that contains integer values to an attribute named Color that contains text range values of red, green and blue. The command for this example is:

transition attribute convert ColorInt to Color map 1 red 2 green 3 blue;

If the ColorInt attribute has any values other than 1, 2, or 3, the command aborts.

Example Converting String Attribute to Real Attribute

This next example shows how to convert attribute values from a string attribute with range values to a real attribute with a dimension. The string attribute, Lead Time, has these range values defined:

  • Unassigned
  • 1 Week
  • 2 Weeks
  • 3 Weeks
  • 4 Weeks

You want to migrate these values to an attribute named Lead Time Duration, that includes a dimension named Duration. The Duration dimension defines these units:

unit "Day default" label "Day" multiplier 1.0 offset 0.0 Default
unit "Week" label "Week" multiplier 7.0 offset 0.0

You use the mapping values to translate from the source weeks to the target days (the default value for the dimension must be used):

transition attribute convert "Lead Time" "Lead Time Duration" map
    unassigned 0 "1 Week" 7 "2 Weeks" 14 "3 Weeks" 21 "4 Weeks" 28;

keepformat Clause

You can use the transition attribute command with the keepformat clause to modify an existing real attribute that was not previously defined with this clause or the format clause. Such attributes do not maintain the input value for attribute instances. If the keepformat clause had been used, the input values (the values as entered by the user) were stored in addition to the normalized value for the attribute. after this command executes successfully for an attribute, it cannot be executed again for the same attribute.

This command adds the keepformat clause to the attribute (for use when new attribute instances are defined) and defines input values for existing attribute instances.

You cannot use this clause with any data type other than real. You cannot use modify attribute to add keepformat to the attribute.

The history of the attribute is not updated when you use this clause.

Use this syntax to execute this clause:

transition attribute keepformat ATTRIBUTENAME [override [X,Y]];

  • override [X,Y] lets you override the default of 19,8, where X is the number of significant digits and Y is the number of floating point digits to the right of the decimal point. You cannot exceed 19 for X.
    Note: The override option can be used with MSSQL and NuoDB databases but not with Oracle databases.

Do not specify a vault option with this command.

The value of MX_DECIMAL_SYMBOL in the enovia.ini file is ignored when writing input values: the database determines the decimal symbol.

You can use the keepformat clause with multi-value real attributes. Input values already exist for multi-value attributes (even though the keepformat clause was not in effect, so those input values are not updated. Any override values specified when transitioning a multi-value real attribute are ignored.

If you do not specify X,Y values for override, some input values might not have a decimal component. For example, if the original attribute value is .0, the input value will have no decimal component. If errors occur, add values for X and Y.

If the transition command cannot properly general an input value, the current value is retained.

If an existing real attribute value causes an error (such as numeric overflow during conversion), the error text might contain a clue that can be used to write an SQL script to find the problematic row.

Any app that uses a transitioned attribute must take these possible values of the input value into account. The app can use select attribute.inputvalue to verify the input value.

Possible Value Description
Has blank padding Possible for MSSQL databases based on the interpretation of specified override numbers.
####### The existing value could not be transitioned. The number of # symbols can vary.
******* On MSSQL databases, real numbers that result in bad values will result in this inputvalue and no error is produced.

Transition cestamp

Use the Transition cestamp command after running the upgrade command to update the cestamp column for the attribute. This command allows Product Structure Design apps to access the cestamp (stored in a different system table than the cestamp for ENOVIA apps).

transition cestamp ATTRIBUTE_NAME;

CEStamp (Concurrent Engineering Stamp) implements optimistic offline lock, a method to prevent conflict between concurrent transactions by detecting a conflict and rolling back the transaction. When you have the cesstamp value, you can pass it to a program to validate a modification.

Transition ChangeSOV

The Transition ChangeSOV command appends changesov access if the rule of a policy includes changeowner access. That is, whenever changeowner access is granted, changesov access is also granted. The rule can be owner, public, or user in any state, including allstate). Wildcards are not supported for the Transition ChangeSOV command.

The changesov access allows a user to change explicit SOV or inherited SOV access.

The MQL syntax for the Transition ChangeSOV command is:

transition changesov policy POLICY_NAME {POLICY_NAME};
transition changesov access OLD_MAKS NEW_MASK SEARCH_CRITERIA {SEARCH_CRITERIA}

The transition changesov policy command lets you define the policies to be modified to add changesov access.

The transition changesov access command lets you change any accessbits except read and show on a set of objects identified by SEARCH_CRITERIA consisting of:

comment COMMENT {,COMMENT}...
policy POLICY_NAME {,POLICY_NAME}...
type TYPE_NAME {,TYPE_NAME},,,

The search criteria is met if the comment for a business object is in (comment1 OR comment2 …) AND the policy is in (policy1 OR policy2 …) AND type is in (typ1 OR type2 …).

You cannot use the transition changesov access command to add or remove read or show access.

Using this business object as an example:

business object t1 bo 0
    access[12920.19594.16848.60946|key2].access = changeowner
    ownership[org1|prj1|key1].access = read
    ownership[12920.19594.25120.26862|key2].access = changeowner
    ownership[12920.19594.1572.29463|key3].access = changeowner

Execute this transition command:

transition changesov access changeowner changesov,checkout comment key1,key2 type t1;

In this command, the OLD_MASK is changeowner, and the NEW_MASK is changesov,checkout. The comment is key1 OR key2, and the object type is t1.

The business object is evaluated because its type matches the type in the transition command. The access definition is not updated because the transition changesov command only affects explicit or inherited SOV, not access.

The first ownership definition, ownership[org1|prj1|key1].access, is not modified because its existing mask does not match the mask in the transition command ( read vs. changeowner).

The second ownership definition, ownership[12920.19594.25120.26862|key2].access, is modified from changeowner to changesov,checkout because both the mask and comment match the mask and comment in the transition command.

The third ownership definition, ownership[12920.19594.1572.29463|key3].access, is not modified because the comment does not match (key3 vs. key1 OR key2). The modified business object is modified:

business object t1 bo 0
    access[12920.19594.16848.60946|key2].access = changeowner
    ownership[org1|prj1|key1].access = read
    ownership[12920.19594.25120.26862|key2].access = changesov,checkout
    ownership[12920.19594.1572.29463|key3].access = changeowner

Transition Dynamic-Relationship

The Transition Dynamic-Relationship command makes existing relationship types and instances dynamic. A relationship type cannot be mutated to become dynamic with the Modify Relationship command. The administration-only MQL Transition command can perform this change for Product Structure Design data.

transition dynamic-relationship type REL_TYPE;

This command converts the administration definition of the relationship type, and also migrates all connections that are of that type. It toggles the dynamic bit on the MXRELTYPE entry. It also removes the data from LXRO and creates new data in LXDRO/ MXFAMILY to make those PLMInstances point to the now major versions.

Transition Interfacerulesflag

Use this transition command to update the cInterfaceRulesFlag on business objects when the system adds or removes rules from an interface, or when an interface is removed from business objects that have multiple interfaces. This flag indicates if the business object has rules added by an interface that need to be evaulated when calculating access. If this transition command is not run, access to affected business objects might not be evaluated correctly.

If the interface you add or remove is the only interface for a business object, you do not need to run the transition command.

transition interfacerulesflag;

Transition Path Relationship

The Transition Path Relationship command converts a relationship into a pathtype.

transition path relationship RELTYPE ATTRIBUTENAME ATTRIBUTENAME ATTRIBUTENAME ATTRIBUTENAME 
ATTRIBUTENAME ATTRIBUTENAME filename FILENAME separator [SEPARATOR_STRING] recordseparator [SEPARATOR_STRING];

Or:

transition path relationship RELTYPE ATTRIBUTENAME ATTRIBUTENAME ATTRIBUTENAME ATTRIBUTENAME 
ATTRIBUTENAME ATTRIBUTENAME map TYPE_MAP_ENTRY;
  • RELTYPE is the relationship to transform into a pathtype.
  • ATTRIBUTENAME are attributes currently defined for the relationship to be moved to the pathtype. Only the attribute listed here are moved to the pathtype. Any other attributes on the relationship are not moved.
  • FILENAME is a file that contains a list of relationships and their attributes to be transitioned to pathtypes.

    The filename option is used instead of supplying the list of attribute names. Use one method or the other, not both.

  • SEPARATOR_STRING for the separator defines the separator between attributes, and for the recordseparator defines the separator between relationships.
  • TYPE_MAP_ENTRY
    string string BusinessObject [TYPE_MAP_ENTRY]  
    string string Connection 
    string string Connection [TYPE_MAP_ENTRY]  

For more information, see pathtype Command.

Transition Path Split

The Transition Path Split command migrates instances of a specified pathtype to another pathtype based on matching two pairs of attributes/values. The installation procedure must create any new pathtype prior to executing the transition command.

transition path split ORIGINAL_PATHTYPE NEW_PATHTYPE 
attribute ATTRNAME1 ATTRVAL1 ATTRNAME2 ATTRVAL2 ownertype 
TYPE kind businessobject|connection;

For any ORIGINAL_PATHTYPE , if the specified attributes have the specified values, then the Transition Path Split command transforms the ORIGINAL_PATHTYPE to the NEW_PATHTYPE. The Transition Path Split command ensures that the NEW_PATHTYPE includes all attributes of the ORIGINAL_PATHTYPE.

The ownertype defines the name of the type or relationship, and the kind clause defines whether that type is a business object or a relationship (connection).

The Transition Path Split command will not create the new pathtypes and will throw an error if the pathtype referenced in the command does not exist. The mxPathType table must be upgraded with any new pathtypes prior to running this command.

Examples:

transition path split SemanticRelation NewSR attribute Role 1 Semantics 3 ownertype t2 kind businessobject;
transition path split SemanticRelation NewSR attribute Role 1 Semantics 3 ownertype r2 kind connection;

Transition Project_Org

The transition project_org command sets the project (collaborative space) and organization for objects governed by the provided list of policies if the objects do not have a project or organization already defined. This command updates the lxBO table.

transition project_org policy POLICYNAME [project PROJECTNAME] 
[organization ORGNAME] [!overwrite];

By default, the overwrite flag is false.

POLICYNAME can be a comma-separated list of policies. You cannot use wildcards to specify the policies. You can use the defaultproj and defaultorg keywords.

You can only define a single project (collaborative space) and a single organization. You can specify a single project AND a single organization, or a project OR an organization, but you must specify at least one project or organization.

This table describes the actions taken depending on the combination of parameters:

Project Specified Organization Specified Overwrite flag Description
Yes Yes !overwrite Two SQL statements are executed for each vault: one to set the project and one to set the organization. Only business objects that do not have a project or organization set are updated.
Yes Yes overwrite Updates the project and organization for all business objects governed by the listed policies even if an existing policy or organization had been set.
Yes No !overwrite Updates all business objects governed by the listed policies t hat do not have a project set with the specified project.
Yes No overwrite Updates all business objects governed by the listed policies with the specified project even if an existing project had been defined.
No Yes !overwrite Updates all business objects governed by the listed policies t hat do not have an organization set with the specified organization.
No Yes overwrite Updates all business objects governed by the listed policies with the specified organization even if an existing organization had been defined.

This command generates SQL statements. For example, if you specify this command:

transition project_org policy pol1,pol2,pol3 project defaultproj 
organization defaultorg

The generated SQL command is:

update lxBO_<latticesuffix> set lxLxaltown1=<defaultprojid>,lxAltown2=
<defaultorgid> where lxPolicy in (pol1_id,pol2_id,pol3_id);

The overwrite flag was not included, but is false by default.

Transition Published-Flags

The transition published-flags command fixes flags on business objects depending on their current state. After a policy has been modified to have "published" states, existing business object data in those states is out of date. It needs to have the best-so-far/published bits turned on in lxBO.lxFLAGS.

transition published-flags policy NAME;

This command finds business objects governed by the specified policy that are in published states, sets the new bit in lxBO.lxFLAGS, and creates mxFamily entries for the business objects’ minor revision families.

Transition Relationship

The transition relationship command changes the relationship type of an existing connection to another relationship. This command updates the lxRO table.

transition relationship totype RELPATTERN;

This command changes the relationship type of an existing connection to the relationship specified by RELPATTERN. You can include the force option to force updates to the lxRO table.

Transition Relationship Type

The transition relationshiptype command finds all relationships of one type in a set of business objects and changes the relationship type to another type. This command updates the mxIdent, IxHist, Attribute, lxRO, and IxDRO tables.

transition relationshiptype from OLD_RELTYPE to NEW_RELTYPE set SET_NAME [size N];

Here OLD_RELTYPE and NEW_RELTYPE are the relationship type names. SET_NAME is the name of the set of business objects. size N is an optional parameter. If you define this parameter, the process is broken into chunks of size N instead of processing the entire set in one operation.

The following actions are performed.

  • All relationships of type OLD_RELTYPE are identified in the set of business objects defined in SET_NAME.
  • The identified relationships are changed to relationship type NEW_RELTYPE.
  • Attributes that are in OLD_RELTYPE, but not in NEW_RELTYPE are removed.
  • Attributes, with standard default values where appropriate, that are in NEW_RELTYPE, but not in OLD_RELTYPE are added.
  • A history entry is added for the relationship type change.
  • If the MX_CHANGE_CESTAMP environment variable is specified as true, the CEStamp is updated.
  • If the MX_CHANGE_MODIFIED_DATES environment variable is specified as true, the modified date is updated.

Transition Revisions

The Transition Revisions command creates major versions out of existing Product Structure Design data by performing the following operations.

  1. Fix the lxBO.lxRev field to concatenate existing revision strings with the new major-minor revision string using the first string from the new major-minor sequence.
  2. Calculate majororder-minororder and update mxIdent based on previous/next pointers. (If data has resulted in v_order values that are in conflict with the previous/next order, this would be considered a mismanagement of the attribute.)
  3. Set the lxBO next pointers to NULL.
  4. Adjust the Ixprev/Ixnext chaining.

The syntax for the transition revisions command is:

transition revisions policy NAME_PATTERN major;

This command allows the modification of a policy to add a major or minor sequence definition, and to update all business objects that are governed by the policy to update their policies.

The NAME_PATTERN argument can be either the name of a single policy or a pattern to specify a list of policies (either a comma-separated list or a wildcard pattern). When a pattern is specified, all policies matching that pattern are transitioned atomically. If during processing business objects are found that are in a policy that is not in the list specified by NAME_PATTERN, the command errors out and leaves the data untouched.

The command also modifies the access masks on all states to ensure that any access rule that specifies revise access is updated to specify both revisemajor/reviseminor access in the same way. It also examines access filters to determine whether they use the "revise" string to refer to an access. If so, it replaces this reference with "revisemajor" or "reviseminor."

Since the Transition Revisions command changes the revision string for the business objects in the specified policy, this would require an update of any unique keys (including mxTNR) and indices that contain the revision selectables. The Transition Revision command detects any such problematic unique keys and indices and refuses to work until these were explicitly disabled. You can use the additional force modifier, which when used indicates that Transition Revision should itself temporarily disable the unique keys and indices, run the transition, and then re-enable everything that was disabled. This ensures that unique keys and indices are kept in synchronization with the updates to the business object’s revision strings.

You can use transition revisions policy NAME_PATTERN major to convert a minor-only sequence into a major-only sequence.

Transition Updatestamp

The Transition updatestamp command updates the value of the updatestamp column for the specified attribute.

transition updatestamp ATTRIBUTE_NAME;

The stamp value is a DCE UUID 16 byte ID used by applications to mark significant changes to the businessobject.

Persistent Data

In addition to changes to tables described in the preceding sections, the mxStateReq table also has a new upgrade step that is used to detect that a new bit is being used in its MXFLAGS column.

The dynamic relationship feature adds an additional requirement for the definition of the database user for Oracle installations: the user must now have Create View privileges.

Transition commands produce no history records. Apart from the fact that a policy is transformed in such a way as to give it a new majorsequence and a new minorsequence, there is no way to tell that the policy was migrated using a Transition command.