Syntax
For more information, see Using Select and Related Clauses. To maintain revision history, the new object should be created with the revised business object command even though it is possible to create what looks like a new revision by manually assigning a revision designator with the Add or Copy Businessobject command. (However, you can add existing objects to a revision chain, if necessary. For more information, see MQL Concepts: About Revision Sequences.) Not all business objects can be revised. If revisions are allowed, the Policy definition can specify the scheme for labeling revisions. This scheme can include letters, numbers, or enumerated values. Therefore you can have revisions with labels such as AA, 31, or “1st Rev.”
If the
If there is no defined revision sequence or if you decide to skip one or more of a sequence’s designators, you can manually specify the desired designator as the
For example, assume you entered the following command:
Since no revision designator is given, the new business object can be called the following (assuming the revision scheme of 1, 2, 3 ...):
If you want to skip over the next revision number and assign a different number, you can do so as:
This command will produce a new business object labeled:
Now the revised business object has a revision designator equal to ten. You cannot use a designator that has already been used. If you do, an error message will result. Handling FilesIf you want to revise an object without including the original files in the new object, use the following syntax. For more information, see Handling Files (in Copy Business Object). To add an object to an existing revision sequence, use the Revise Businessobject command:
Creating Major and Minor RevisionsUsing the major or minor keyword with the Revise command specifies whether to create a new major revision or a new minor revision, respectively. A major revision is a family of minor revisions that share the same majorid value. Creating a new major revision also starts a new minor revision family.
If neither the major nor minor keyword is specified, a new minor revision is created and existing revisions become minor revisions. Revise Major/Minor commands affect several basic business object properties, as shown in the following table.
If an object policy does not have a minor revision sequence defined, then Revise Minor produces an error. If an object policy does not have a major revision sequence defined, then Revise Major produces an error. If an object policy has both major and minor revision sequences defined, the majorrevision and minorrevision strings are calculated as in the table above, and the two strings are joined with the delimiter defined in the policy and stored in the existing revision field. For more information, see Majorsequence and Minorsequence Clauses for the Add Policy Command.
Storage of major/minor in the existing revision field allows the Type-Name-Revision combination to continue to be the default uniqueness criteria without requiring an update to the out-of-the-box table that governs TNR uniqueness. It also allows all commands that reference objects by TNR criteria to continue to work as before. For objects that have both major and minor revision strings, the revision field is of the form
Changing policy on a business object is allowed as long as the new policy does not change a delimiter or add/remove either a major or minor sequence to/from the existing policy. Legacy policies with no sequences defined are considered to have a minorsequence, which is empty, and no majorsequence. Major and minor revisioning has these effects on selectables:
The majorid and majorids selectables support these subselects that can be applied to each minor revision family:
For example, you can create these objects:
Now, you can use these subselect commands to get the shown results: MQL<131>print bus t2 mm1 A.1 select majorid.*; business object t2 mm1 A.1 majorid.id = 42DBCF62000052A857F502D6000001B5 majorid.lastpublished = t2 mm1 A.2 majorid.bestsofar = t2 mm1 A.2 majorid.majorrevision = A majorid.majororder = 0 majorid.minorrevisions = A.1 majorid.minorrevisions = A.2 majorid.previousmajorid = majorid.nextmajorid = 42DBCF62000052A857F502FB000001C2 majorid.firstmajorid = 42DBCF62000052A857F502D6000001B5 majorid.lastmajorid = 42DBCF62000052A857F502FB000001C2 majorid.modified = Wed Oct 5, 2016 9:41:20 AM EDT MQL<133>print bus t2 mm1 A.1 select majorids.*; business object t2 mm1 A.1 majorids[42DBCF62000052A857F502D6000001B5].id = 42DBCF62000052A857F502D6000001B5 majorids[42DBCF62000052A857F502FB000001C2].id = 42DBCF62000052A857F502FB000001C2 majorids[42DBCF62000052A857F502D6000001B5].lastpublished = t2 mm1 A.2 majorids[42DBCF62000052A857F502FB000001C2].lastpublished = t2 mm1 B.1 majorids[42DBCF62000052A857F502D6000001B5].bestsofar = t2 mm1 A.2 majorids[42DBCF62000052A857F502FB000001C2].bestsofar = t2 mm1 B.1 majorids[42DBCF62000052A857F502D6000001B5].majorrevision = A majorids[42DBCF62000052A857F502FB000001C2].majorrevision = B majorids[42DBCF62000052A857F502D6000001B5].majororder = 0 majorids[42DBCF62000052A857F502FB000001C2].majororder = 1 majorids[42DBCF62000052A857F502D6000001B5].minorrevisions = A.1 majorids[42DBCF62000052A857F502D6000001B5].minorrevisions = A.2 majorids[42DBCF62000052A857F502FB000001C2].minorrevisions = B.1 majorids[42DBCF62000052A857F502D6000001B5].previousmajorid = majorids[42DBCF62000052A857F502FB000001C2].previousmajorid = 42DBCF62000052A857F502D6000001B5 majorids[42DBCF62000052A857F502D6000001B5].nextmajorid = 42DBCF62000052A857F502FB000001C2 majorids[42DBCF62000052A857F502FB000001C2].nextmajorid = majorids[42DBCF62000052A857F502D6000001B5].firstmajorid = 42DBCF62000052A857F502D6000001B5 majorids[42DBCF62000052A857F502FB000001C2].firstmajorid = 42DBCF62000052A857F502D6000001B5 majorids[42DBCF62000052A857F502D6000001B5].lastmajorid = 42DBCF62000052A857F502FB000001C2 majorids[42DBCF62000052A857F502FB000001C2].lastmajorid = 42DBCF62000052A857F502FB000001C2 majorids[42DBCF62000052A857F502D6000001B5].modified = Wed Oct 5, 2016 9:41:20 AM EDT majorids[42DBCF62000052A857F502FB000001C2].modified = Wed Oct 5, 2016 9:41:15 AM EDT Another example for revision A.1: MQL<134>print bus t2 mm1 A.1 select majorid previous next previousminor nextminor majorid.previousmajorid majorid.nextmajorid; business object t2 mm1 A.1 majorid = 42DBCF6200005CBC57FB8F420000000B previous = next = A.2 previousminor = nextminor = A.2 majorid.previousmajorid = majorid.nextmajorid = 42DBCF6200005CBC57FB8F4E00000021 In these results:
The same command issued for revision A.2 shows these results: business object t2 mm1 A.2 majorid = 42DBCF6200005CBC57FB8F420000000B previous = A.1 next = previousminor = A.1 nextminor = majorid.previousmajorid = majorid.nextmajorid = 42DBCF6200005CBC57FB8F4E00000021 In these results:
The same command issued for revision B1 shows these results: business object t2 mm1 B.1 majorid = 42DBCF6200005CBC57FB8F4E00000021 previous = A.1 next = previousminor = nextminor = majorid.previousmajorid = 42DBCF6200005CBC57FB8F420000000B majorid.nextmajorid = In these results:
The previous/next functionality in use before major/minor revisions were introduced is preserved for revision sequences that are ONLY minor (default) or ONLY major (migrated VPLM), since the sequences are strictly linear in both cases. For revision sequences that use major/minor, the previous pointer for any object created by revise major OR revise minor points to the object from which it was created. The set next pointer is set for the revise minor command, and NOT for the revise major command. In summary, for families built with BOTH major/minor revisions:
|