Administration spécialisée > Personnalisation des objets métier > Administration des règles d'initialisation d'un objet > Understanding Object Initialization Rules > Changing Versioning Schemes > Harvard Series Versioning Schemes > State-based Scheme
  
State-based Scheme
The state-based versioning scheme is an extension of file-based versioning. It involves the use of <seed name> elements within the file-based versioning XML file.
In the out-of-the-box XML file (StateBasedVersioning.xml), the seed names correspond to the items in the Life Cycle Template Administration utility Version Series drop-down list and are used in the One Phase Development and Two Phase Development out-of-the-box life cycle templates. With this setup, the values are used for versioning when the object is revised in a particular state. If an object moves forward in the state phases (such as from Prototype to Released), then the versioning series being used changes as defined in the life cycle. If a revision or set state action moves the object back to an earlier state (such as from Released back to Prototype), then the versioning series used continues to be the series in use in the most forward state. A new version of an object always uses a higher revision value than its predecessor, even if it is moved to an earlier lifecycle state.
The XML file must have the following format:
<?xml version="1.0" encoding="UTF-8"?>
<scheme>
<series name = "name1">
<seed name = "seed_name1">
<value>P1</value>
<value>P2</value>
<value>P3</value>
</seed>
</series>
</scheme>
* 
You must have at least two value elements in your XML file.
The same general information listed under File-based Scheme holds for a state-based scheme. In addition, when using the out-of-the-box Life Cycle Template Administration utility Version Series drop-down list and using the Two Phase Development and One Phase Development life cycle templates (which are the default life cycle templates defined in the Product Design template), the seed names you can include are limited to the following:
NUMERIC
MILSTD
The loaded XML file that is used in the Product Design template contains the seed names and corresponding values, as follows:
Seed Name
Values in the Seed
NUMERIC
The integers 1 through 99.
MILSTD
The hyphen character (-) followed by the alphabetic characters A through Y and AA through AY, but not including I, O, Q, S, X, Z, AI, AO, AQ, AS, AX, and AZ.
You can add BA, BB, ... BY (skipping BI, BO, BQ, BS, BX, and BZ) if you want to make these values available in the series.
* 
This seed conforms to the U.S. military specification (ASME Y 14.35M revision standard).
The loaded XML versioning file is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<scheme>
<series name = "StateBased">
<seed name = "NUMERIC">
<value>1</value>
<value>2</value>
<value>3</value>
:
<value>98</value>
<value>99</value>
</seed>
<seed name = "MILSTD">
<value>-</value>
<value>A</value>
<value>B</value>
<value>C</value>
:
<value>W</value>
<value>Y</value>
<value>AA</value>
<value>AB</value>
<value>AC</value>
:
<value>AW</value>
<value>AY</value>
</seed>
</series>
</scheme>
The load file that loads the Product Design template loads the XML versioning file described earlier in this section and sets the versioning for parts, documents, and CAD documents to use the values in the file. For details on the out-of-the-box versioning in the Product Design template, see Out-of-the-box Product and Library Context Templates.
* 
You can modify the state-based versioning values that are established through the XML versioning file; however, all changes should be made before the versioning is used. Changing values that have already been used can cause unpredictable results when versions are being updated. If you must make a change to a versioning scheme, ensure that the values you specify for the revision labels are unique within the entire versioning scheme and that you do not remove any values from a series that are already in use; however, you can include the legacy attribute for those values that you do not want used for new revision labels as described in Accommodating Legacy Values in Revision Labels. Specifying the same value multiple times is not allowed. Also, removing a series name after the series has been in use causes problems for any existing objects that use the series. For example, those objects could not be revised and the object iteration history could not be displayed.
The out-of-the-box XML versioning file lists the NUMERIC seed first and then the MILSTD seed. When assigning seeds to life cycles, the seeds must be assigned in the order that they are defined. To assign the MILSTD seed before the NUMERIC seed, you must modify the XML file so that the MILSTD seed is before the NUMERIC seed.
* 
You can create additional state-based versioning schemes by adding additional seed names and values to the out-of-the-box file loaded into the database. However, the out-of-the-box Life Cycle Template Administration utility Version Series drop-down list and the One Phase Development and Two Phase Development life cycle templates are not automatically updated to use the additional seed names. To use the additional seed names, you must customize the Life Cycle Template Administration utility and modify the life cycle template you want to use.
The details on how to create or modify a state-based series are the same as those for a file-base series.