Method for locating a versioned object within a version tree depicting a history of system data and processes for an enterprise5701472Abstract The method of the present invention is useful in a computer system having a user interface, a memory, a repository and a database. The method is a repository program executed by the computer system for locating a versioned object within a history of objects stored in the repository. The method comprises the steps of declaring a variable workObject; if the desired variant is equal to the variant of object on which the requesting step is called, setting the workObject to said object; if the desired variant is not equal to the variant of object on which the requesting step is called, setting the workObject to a root object; if the workObject variable is null, pushing a noSuchVariant error onto a notification stack and exiting the method; determining direction for searching the version tree using the desired version and the version of workObject; if the workObject is visible, returning said workObject as the desired version; if the workObject is not visible and the desired version is equal to zero, determining if the workObject has previous versions; if the workObject has no previous versions, returning a null object. Claims What is claimed is: Description FIELD OF THE INVENTION
TABLE I
______________________________________
Type Description
______________________________________
Array Creates a dynamic array of objects in which an
integer index can be used to access array
members. An array can contain duplicate
objects.
List Creates an ordered collection of objects. A
list can contain duplicate objects.
Set Creates an unordered collection of objects.
Objects in a set must be unique.
______________________________________
Operations An operation is a feature that represents a behavior that objects can possess. An operation can be thought of as a function: it has a name, an optional set of parameters, and an optional return type. Like properties, operations are applied to each object within the owning type. Consequently, an operation is generally invoked in the context of a specific object. An operation can have parameters that identify information a caller must provide when invoking the operation. If an operation has no parameters, a caller merely invokes the operation for the desired object. For example, consider the following features:
TABLE II
______________________________________
Domain/Return
Type Feature Type
______________________________________
Employee birthDate (attribute)
Date
age (operation)
Integer
______________________________________
As shown, the birthDate attribute has a domain of Date. Age is an operation (with no parameters) whose return type is Integer. The purpose of age is to compute an employee's current age (in years) from his or her birth date. Because the age operation is invoked for a specific employee, it is able to obtain the value of that employee's birthDate attribute, make the necessary computation, and return the appropriate integer without requiring parameters. When an operation has parameters, each parameter has semantics similar to those of properties. Each parameter has a name, a domain type, and a set of options that can be used to affect the behavior of the parameter. The following table shows an example of an operation, defined for the Employee type, that has parameters:
TABLE III
______________________________________
Parameter Parameter
Operation Parameter Domain Options
______________________________________
setSalary amount Real REQUIRED
authorizedBy
Manager REQUIRED
effective Date DEFAULT today's
date
______________________________________
The setSalary operation has three parameters: The amount parameter is a Real number (floating-point) that is required. Therefore, the caller must specify a value for this parameter. The authorizedBy parameter is a Manager object that also is required. The effective parameter is a date parameter that is not required. However, if the caller does not specify a value for this parameter, the current system date is used by default. A multi-valued parameter is a set, or collection, of values. Such a parameter is useful when the operation must operate on several objects even though it is invoked in the context of a single object. An operation optionally can return an object when it completes processing, just as a program function can return a value. An operation that returns an object is called typed because it has a return type specified. An operation that does not return an object is called un-typed because it does not have a return type specified. A return type must be one of the types recognized by the repository. An operation can return a set of objects by specifying a collection as its return type. An operation can be defined for a type and then redefined for each subtype of the original type. This process is called overriding an operation. when an operation is overridden, a subtype that inherits the operation has a separate method that redefines the functionality of that operation. The technique that the repository uses to choose which method to call for a given operation is called dynamic binding. Dynamic binding (also called polymorphism) means that the repository chooses the method that is most specific for a given object and operation. The most specific method is the one defined in the lowest subtype of which the object is an instance. For example, assume setSalary is an operation defined for the Employee type. An employee object can be an instance of the Employee type or one of its subtypes. If you call the setSalary operation for an object that is an Employee instance, the repository selects the method associated with the setSalary operation defined for the employee type. If you call the setSalary operation for an object that is a Manager instance, the repository selects the method associated with the setSalary operation as it is redefined for the Manager type, if the Manager type does not redefine the setSalary operation, the repository selects the method associated with the setSalary operation defined for the Employee type as the immediate supertype of the Manager type. You can define an operation to be called with different sets of parameters. For example, you might define the setSalary operation to be called with only an amount parameter or with both an amount parameter and an effectiveDate parameter. Each combination of parameters that an operation can accept is called a signature. To define multiple signatures for an operation, you define the operation more than once in the same owner type and use the desired signature for each definition. Methods The operations defined for a model form an interface that can be seen by a caller. Separate from this definition, each operation must be implemented by a module of code called a method. Methods are typically written as separate functions and bound into a set of code libraries. The method code library name for each operation is then identified to the repository as part of the definition of the operation. When a caller invokes an operation, the request is received by the repository, which finds and calls the appropriate method. The operation passes to the method the appropriate parameters. When a method is called, it can then act as a caller and call back into the repository to invoke other operations. Consequently, a method can be thought of as a specialized kind of application program. Objects An object is an abstract representation of a real-world concept or thing-such as a person, a software package, or an event--that is stored in the repository. In the repository, the state of an object is represented by the values of the properties defined for the type. For example, the state of an integer is its numeric value. The state of a person is its name, birthDate, spouse and so on. The behavior of an object is the set of functions that the object can perform. In the repository, the behavior of an object is represented by the operations defined for the owner type. A characteristic of object behavior is the ability to return some of its state to a requester. For example, the object person can return its name. For this reason, some object models describe object behavior as the set of messages that an object can receive and respond to. One example of object behavior is the capability an integer has to perform such functions as addition, square root and absolute value. A Component Object is a versioned object (i.e., a particular historical state of an object) that is part of a composite object. The relationship of the component object to the composite object is defined by a composition relationship. A component object can itself be a composite object. In this case, the component object contains other component objects related to it by composition relationships. A component object can belong to several composite objects. This feature promotes sharing of objects in the repository. A Composite Context is a type that defines the scope of a composite hierarchy. The composite context identifies the top object for the hierarchy and the ghost objects that were created while the context was the current composite context. The term ghost as used herein means a value associated with a changeable object. Objects with ghost status can only be viewed in certain situations, i.e. they are only visible in the context in which they were created. A Composite Hierarchy is a tree structure composed of a composite object and its component objects. The hierarchy also includes the component objects for any component object that is itself a composite object. Thus, this structure defines the component objects of the top, or root object, the components of those components, and so on to the bottom of the hierarchy. A Composite Object is a versioned object (i.e., for which at least one composite relationship is defined thus allowing the object to have components. A composite object can be thought of as owning its component objects. Some examples of these are: a car engine-the component objects include spark plugs, wires and pistons; a program-the component objects include files, record layouts and modules; a menu-the component objects are the various selections on the menu. A Composite Relationship is the relationship that links a composite object to its component objects. The relationship between a car engine and its parts-spark plugs, pistons, wires and so on-can be used to illustrate a composite relationship. The car engine and its components can be treated as a single object, yet each of the parts can be accessed individually. The term Visibility is used with versioned objects whose reserveStatus value is ghost. A ghost object is visible only in the composite context in which it was created. When this composite context is the current context, one can change the attributes of the ghost object, add or remove an object from the attributes of another object and so on. A Versionable Object is a repository object for which the version service records state changes over time. A Versioned Object is a repository object that represents a particular historical state of a versionable object. In FIG. 2 each circle stands for a versioned object that represents a particular state of Module. Referring now to FIG. 2, a version tree is shown which represents the historical states of a versionable object in the repository. In particular, FIG. 2 shows an example of a version tree for a versionable repository object called Module. The following definitions will be helpful in understanding this invention when taken in conjunction with the tree shown in FIG. 2. A Variant Branch, which represents a single line of development, is a subset of versioned objects in a version graph. The variant branch is a linear path that shows the history of changes from one versioned object to another for a particular line of development. In FIG. 2, the version tree has three variant branches-mainline, variant A and variant B. The mainline branch is made up of objects 30 through 33. The variant A branch is the path including objects 34 and 35 (labeled Module v3 {variantA}and Module v4 {variantA}). The variant B branch is the path including object 36 (labeled Module v3 {variant B}). A Variant is a versioned object on a variant branch. A version graph can contain multiple variants at the same level of ancestry. The terms Variant and Versioned Object are interchangeable. In FIG. 2 there are two variants of Module-object 35 on the variant A branch and object 33 on the mainline branch-as the final level (v4) represents in FIG. 2. The method of the present invention identifies each variant by its version number and its variant name. A Version Number is the first of two identifiers used by the method of this invention to distinguish a versioned object in a version tree. This number is an integer that represents a level of ancestry in the version tree. In FIG. 2 the version number is represented by a lowercase "v" followed by an integer. For example, the root Module is labeled v1. At the second level of the tree, the object derived from the root object is labeled v2. The Variant Name is the second of two identifiers used by the method of this invention to distinguish a Versioned Object in a version tree. This name is a string that distinguishes a particular variant branch in the version tree. The Variant Name supports the maintenance of parallel lines of development. A Versioned Object can have many descendant variants representing different lines of development. In FIG. 2 the Variant Name is shown in braces. For example the main line of development is labeled {mainline}. The method of the version service 22D uses the check-in/check-out model for creating and controlling versions of objects. This model requires that a versioned object be checked out before it can be modified. This step places the object in a state in which it can be modified. When the modifications have been completed the versioned object must be checked back in. As the objects are checked in and out, the reserved status changes. The version service enables one to determine whether the history of certain state-changes to versionable objects should be retained. Specifically, the version service 22D enables one to modify properties defined as not significant without checking out the object. If one does not check out the object, the version service does not maintain a record of the changes. It should be pointed out however that the version service automatically checks out an object if a user makes a change to a significant property of that object. The reserve status of a versioned object indicates the visibility and availability of the object for different operations. The reserve status is determined by the value of the reserveStatus property defined for the repository VersionedObject type. The reserve status of a versioned object can be one of the following values:
TABLE IV
______________________________________
Value Description
______________________________________
available indicates that the versioned object has no
successor objects and therefore can be
reserved.
readOnly indicates that the versioned object has a
successor object on the same variant branch
and therefore can be reserved only if the
user defines the variant parameter for the
reserve operation.
source indicates that the versioned object has
successor objects, but that none of the
successor objects are on the same variant
branch as the versioned object. Therefore,
the variant name is optional when reserving
the object.
ghost indicates that the versioned object can be
modified. The object is visible only if it
is checked out in the current composite
context.
______________________________________
The reserve status is set when the following operations defined for the repository VersionedObject type are used:
TABLE V
______________________________________
Operation Description
______________________________________
merge Checks out a versioned object by merging the
current versioned object with a designated
object.
replace Checks in a previously reserved versioned
object and sets the reserveStatus property
value to available.
reserve Checks out a versioned object by creating a
copy of the object, and sets the
reserveStatus property value of the copy to
ghost.
unreserve Deletes the ghost object for a previously
reserved versioned object. If there are no
more next versions, the operation sets the
reserveStatus property value of the object to
available.
______________________________________
Referring now to FIG. 3, a more complex version tree is illustrated, which tree is helpful in understanding the steps performed by the method of the present invention. Like reference numerals are used in FIG. 3 to show expansion of the version tree shown in FIG. 2. To create another variant on the mainline branch, such as module v5 (object 37), the user calls the reserve operation for module v4 ›mainline! (object 33). The user defines the variant parameter of this operation as a "." (period). The reserve operation thus creates the new object 37 on the same variant branch as the object being reserved. The reserve operation sets the reserve status of the new object 37 as ghost; and, it derives the other property values for the new object from the object being reserved, i.e. module v4 ›mainline! (object 33). The reserve operation also changes the reserve status of the object being reserved, module v4 ›mainline! (object 33), to readOnly. To make the new object 37 visible to other users, the replace operation is called for this object. The replace operation sets the reserve status of module v5 ›mainline! (object 37) to available. Object 38 (module v5 ›variantA!) is created the same way off of object 35 as object 37 was created off of object 33. In a similar manner, object 39 is created off of object 36 (module v3 ›variantB!, by repeating the above steps for each of the objects so created. Object 42 (module v5 ›variantD! is created off of object 35 by use of the reserve operation. However, in this case a name is assigned to the branch by defining the variant parameter as variantD. In a similar manner, objects 43 is created off of object 36 by the same reserve operation. The user can merge an object from one variant branch into an object on a different variant branch by calling the merge operation. For example, to merge object 43 into object 40 on the variantB branch, the user calls the merge operation for module v5 ›variantB! (i.e., object 40) and defines the objectToMerge parameter as module v4 ›variantC! (i.e., object 43). The merge operation creates a new object 44 (i.e., module v6 ›variantB! and sets the reserve status of the new object to ghost. After the merged object 44 (module v6 ›variantB!) is created, it is made available by calling the replace operation. At this juncture of the description, the details of the method of the present invention will be more fully appreciated following the description hereinbelow when taken in conjunction with FIGS. 4A through 11B. Referring now to FIG 4A, the first of a two-sheet flow chart illustrates the initial operations performed in locating a versioned object in a version tree such as that shown in FIG. 3 and described hereinabove. More specifically, the flow charts of FIGS. 4A and 4B show how a version tree is searched for a specified version. From a start bubble 50 a variable, such as workObject is declared as depicted by block 51. Next an inquiry is made as to whether or not the variant is equal to the variant of the object on which this operation was called (e.g., myself), as depicted by a diamond 52. If the variant is equal, the workObject variable is set to myself as illustrated by a block 53. If the variant is not equal, then the workObject is set to the result of calling the findRootInternal operation (block 54), which operation will be amplified further hereinbelow with the description of FIG. 9. Following this, another inquiry is made as to whether or not the workObject is null, as represented by a diamond 55. If the workObject is null, then a noSuchVariant error is pushed on the notification stack (block 56) and the operation is exited as depicted by a Return bubble 57. If the workObject is not Null (i.e., no exit from the diamond 55) then a branch is taken to FIG. 4B at a connector A. Another inquiry is next made as to whether or not the version number of workObject is equal to the desired version (diamond 58). If the answer is yes then the process continues with bubble 65 if FIG. 5. On the other hand, if the answer is no then yet another inquiry is made (diamond 59) as to whether or not the version of workObject is "0"(zero). If it is zero then a branch is made to the process shown in FIG. 6 and described hereinafter, which branch operation is depicted by a block 60. If it is not zero, then still another inquiry is made (diamond 61) as to whether or not the version number of workObject is greater than the version desired. If it is then a branch is made to the process illustrated in FIG. 7 and described hereinafter, which branch operation is represented by a block 62. If it is not greater than the version desired, then another inquiry is made (diamond 63) as to whether or not the version number of workObject is less than the version desired. If the version number of workObject is less than the version desired then a branch is taken to the process shown in FIG. 8 and described hereinbelow, which branch operation is illustrated by a block 64. On the other hand if the workObject is not less than the version desired, then another inquiry is made (continued on FIG. 5 as depicted by a bubble 65) as to whether or not the workObject is visible (diamond 66). If workObject is visible then it is returned as the object desired (block 67). On the other hand if the workObject is not visible then an inquiry is made as to whether or not the desired version is not equal to zero (diamond 68). If the desired version not is equal to zero then a null object is returned (block 69). If the desired version is not not equal to zero (i.e., it is equal to zero), then another inquiry is made as to whether or not the workObject has previous versions (diamond 70). If the workObject has previous versions, then a branch is taken to another process shown in FIG. 11 (searching UP), which branch operation is depicted by block 71. Following this step, yet another inquiry is made as to whether or not the object returned by the process of FIG. 11 is null (diamond 72). If the object returned is not a null object, then that object is returned (block 73). On the other hand if the returned object is a null object, then a null UrepVersionObject is returned, as depicted by a block 74. Also, if the workObject does not have previous versions (diamond 70 inquiry), then a null UrepversionedObject is returned. Referring now to FIG. 6, the process step block 60 is shown in greater detail wherein the desired version is equal to zero. Beginning with a start bubble 80, an inquiry is made as to whether or not the workObject has nextVersions (diamond 81). If the answer to this inquiry is yes then the process shown in FIG. 11 for workObject is called (block 82), searching down the tree. Following this step, an inquiry is made as to whether or not the returned object is valid (diamond 83). If the answer to this inquiry is yes then the workObject is set to the returned object (block 84), with the process continuing with bubble 81. However, if the returned object is not valid then a return is made to the process shown in FIG. 5 at bubble 65. Referring now to FIG. 7, a sub-process of that shown in FIG. 4B illustrates the steps for locating a versioned object searching up the version tree. The process block 62 of FIG. 4 is shown in greater detail, which process is performed if the workObject version is greater than the desired version. The process begins with a start bubble 85 followed by an inquiry as to whether or not the workObject has previous versions (diamond 86). If the answer to this inquiry is no, then a null UrepVersionedObject is returned as depicted by a process block 87. On the other hand if the workObject has previous versions, then the process of FIG. 11 for workObject is called (searching up the version tree), process block 88. Next, an inquiry is made as to whether or not the returned object is valid (diamond 89). If the returned object is not valid, then a null UrepVersionedObject is returned as depicted by a process block 90. On the other hand if the returned object is valid, then workObject is set to the value of the returned object as depicted by a process block 91. An inquiry is next made as to whether or not the version of workObject is equal to the desired version (diamond 92), and if it is then a return is made back to the process shown in FIG. 4, as represented by a bubble 93. On the other hand, if the version of workObject is not equal to the desired version then yet another inquiry is made as to whether or not the version of workObject is less than the desired version (diamond 94). If the workObject is less than the desired version then a null UrepVersionedObject is returned (block 95). If it is not less than the desired version then a return is made back to the beginning of this sub-process at the input of the diamond 86. Referring now to FIG. 8, another sub-process of that shown in FIG. 4B illustrates the steps for locating a versioned object searching down the version tree. The process block 64 of FIG. 4 is shown in greater detail, which process is called up if the workObject is less than the desired version. The process begins with a start bubble 96 followed by an inquiry as to whether or not the workObject has next versions (diamond 97). If the answer to this inquiry is no, then a null UrepversionedObject is returned as depicted by a process block 98. On the other hand if the workObject has next versions, then the process of FIG. 11 for workObject is called (searching down the version tree), process block 99. Next, an inquiry is made as to whether or not the returned object is valid (diamond 100). If the returned object is not valid, then a null UrepVersionedObject is returned as depicted by a process block 101. On the other hand if the returned object is valid, then workObject is set to the value of the returned object as depicted by a process block 102. An inquiry is next made as to whether or not the version of workObject is equal to the desired version (diamond 103), and if it is then a return is made back to the process shown in FIG. 4, as represented by a bubble 104. On the other hand, if the version of workObject is not equal to the desired version then yet another inquiry is made as to whether or not the version of workObject is greater than the desired version (diamond 105). If the version of workObject is greater than the desired version then a null UrepversionedObject is returned (block 106). If it is not greater than the desired version then a return is made back to the beginning of this sub-process at the input of the diamond 97. In summary of the processes described hereinabove, the following table provides examples of using the processes illustrated in FIGS. 4 through 8 and described hereinabove to locate objects in a version tree. It is pointed out that the pseudo code for these same processes is set forth in Appendix B hereof. The table text uses the version tree shown in FIG. 3 as the basis for defining the operation parameters and determining the object that the operation returns.
TABLE VI
______________________________________
Operation Object
Search Desired
Called Parameters Returned
______________________________________
Find the latest
findVersion
Variant: " "
Module v5
version in the Version 0 ›mainline!
version tree
Find the latest
findVersion
Variant: Module v5
object of the "variantA" ›variantA!
variantA line Version 0
of development
Find version2
find Version
Variant: " "
Module v2
on the Version 2 ›mainline!
mainline of
development
Find version 5
find Version
Variant: Module v5
on the variantB "variantB" ›variantB!
line of Version 5
development
Find version4
findVersion
Variant: NULL
on the "variantD" (Results in
variantD line Version 4 noSuchObject
of development error
______________________________________
Referring now to FIGS. 9A and 9B, a combined flow chart illustrating the process for finding the root object of a version tree, or a root object of a variant branch, starting from any object in the version tree is shown. The process begins with a start bubble 110 followed by an inquiry to determine if the variant parameter is not specified (decision diamond 111). If the variant parameter is not specified then the root object of the entire tree is desired. The value of the variable workObject is set to the object for which the operation was called (i.e. myself), as depicted by a process block 112. Next, another inquiry is made as to whether or not the workObject has previous versions (i.e., the previousVersions property is null), as depicted by a decision diamond 113. If the workObject has previous versions, then the workObject is set to the first object in the previousVersions property (i.e., previousVersions(O)), process block 114. Following this step, the inquiry is again made as to whether or not workObject has previous versions (bubble 113). When a workObject is found without previous versions, then the root object is found and returned as workObject (process block 115). Returning to the decision diamond 111, if the variant is specified (i.e., not not specified), then an inquiry is made as to whether or not the desired variant is on the current branch (decision diamond 116). That is, either the variant is equal to the version of "myself" or it is equal to ".". (Note that the symbol "." means the variant branch of the myself object.) If this is true, then another inquiry is made as to whether or not the object has previous versions (decision diamond 117). If it is not true then a connector B indicate a branch is to be taken to FIG. 9B If the "myself" object has previous versions then the value of the variable workObject is set to object (process block 118). On the other hand if the object has no previous versions then it must be the root object of the current variant branch and the object is returned (process block 119). Following the step of setting workObject equal to object, as depicted by the process block 118, a connector C indicates that a branch is to be taken to FIG. 9B wherein yet another inquiry is made as to whether or not the workObject has no previous versions (decision diamond 120). If workObject has no previous versions it must be the root object of the variant branch, and the workObject is returned (process block 121). On the other hand, if the workObject has previous versions, then the process shown in FIG. 11 and described hereinabove is called, as represented by a process block 122. That is, a search is made up the version tree in this process step for the workObject and desired variant. Next, an inquiry is made as to whether or not the object returned is valid (decision diamond 123). If it is valid, then workObject is set equal to returned object (process block 124), and the process continues with diamond 120. If the returned object is not valid, then workObject is returned, as depicted by a process block 125. That is, since there are no previous versions for workObject with the desired variant, then it is returned as the root of the variant branch. With reference to the connector B, if the variant branch is not the current branch then call this process (block 126) with object, and a null variant. This step will find the root of the version tree, where steps 111-115 are performed). Set workObject to the value returned. Next, the process shown in FIG. 10 is called with workObject and the desired variant as parameters. Set workObject to the value returned (all as depicted by a process block 127). Following this step, the workObject is returned to the caller (process block 128), and the process is exited (stop bubble 129). The pseudo code for the above-described process is set forth in Appendix A hereof. Referring now to FIG. 10, a process is illustrated which finds any variant branch in a version tree when started with the root object of the entire version tree. The process begins with a start bubble 130 followed by a decision diamond 131 inquiring if the desired variant is equal to the object's variant. If the answer is yes, then the object is returned (process block 132). On the other hand, if the answer is no then another inquiry is made at diamond 133 as to whether or not the object has next versions (i.e., nextVersions property is null). If the answer is yes then yet another inquiry is made at diamond 134 as to whether or not there are more objects to process. If yes, then the object is retrieved from the nextVersions property (process block 135). Next, this process (bubble 130) is called passing in the object (i.e., call this process for the n'th object-process block 136). Following this step, an inquiry is made at diamond 137 if the object returned from the previous step is valid. If no, then the fore-described steps (diamond 134, process blocks 135 and 136 and diamond 137) are repeated. The process steps in diamond 134, and blocks 135, 136 and 137 iterate over the objects in the nextVersions property. If the answer is yes, then the object found is returned (process block 138). Referring back to the decision diamonds 133 and 134, if the answer to either of these inquiries is no, then no object was found with the desired variant, so return a null UrepVersionedObject (process block 139). The process is then exited as depicted by a stop bubble 140. The pseudo code for the above-described process is set forth in Appendix C hereof. With reference now to FIG. 11A and 11B, a process is illustrated for finding the object with the given variant in either the previous versions or the next versions property of an object in the version tree. The process begins with a start bubble 141 followed by a process block 142 representing the declaring of a variable, workVariant, and setting its value to the desired variant. Next, an inquiry is made as to whether or not the variant is equal to "." (i.e., the variant of the object is what is desired --decision diamond 143). If the answer to this inquiry is yes, then the workVariant is set equal to the variant of the object (process block 144). On the other hand, if the answer is no, or after completing the process step represented by block 144, another inquiry is made as to whether or not the direction to be searched is down (decision diamond 145). If the answer to this inquiry is no, then a branch is taken to FIG. 11B at a connector D. If the search is to be made down, then an inquiry is made as to whether or not the object has next versions (i.e., the nextVersions property is not null--decision diamond 146). If the answer to this inquiry is yes, then each object is selected in the nextVersions property. In particular, an inquiry is made as to whether or not there are more objects left to process (decision diamond 147). Next, an object is retrieved from the nextVersions property (i.e., get n'th nextVersions--process block 148). Following this, yet another inquiry is made as to whether or not the retrieved object's variant is equal to the desired variant. If the answer is yes, and the next version with the desired variant was found and this object is returned (process block 150). If the answer to the inquiry at decision diamonds 146 and 147 are either one a no, then a null UrepVersionedObject is returned (process block 151). From the connector D an inquiry is made as to whether or not the search is to be made up the version tree. If the answer to the inquiry at decision diamond 152 is a no, then a null UrepversionedObject is also returned (process block 159). Following this step the process is exited as depicted by a stop bubble 160. If the search is to be made up (i.e., the yes leg of the diamond 152), then an inquiry is made as to whether or not the object has next versions (i.e., the nextVersions property is not null--decision diamond 153). If the answer to this inquiry is yes, then each object is selected in the previousVersions property. In particular, an inquiry is made as to whether or not there are more objects left to process (decision diamond 154). Next, an object is retrieved from the previousVersions property (i.e., get n'th nextVersions--process block 155). Following this, yet another inquiry is made as to whether or not the retrieved object's variant is equal to the desired variant (diamond 156). If the answer is yes, and the next version with the desired variant was found and this object is returned (process block 157). If the answer to the inquiry at decision diamonds 153 and 154 are either one a no, then a null UrepVersionedObject is returned (process block 158). The pseudo code for the above-described process is set forth in Appendix D hereof. In summary, the following table provides examples of the use of the process shown in FIG. 9 and described hereinabove to locate objects in a version tree. The table uses the version tree shown in FIG. 3 as the basis for defining the operation parameters and determining the object that the operation returns.
TABLE VII
______________________________________
Operation Object
Search Desired
Called Parameters Returned
______________________________________
Find the root
findRoot Variant: " "
Module v1
object of the ›mainline!
entire tree
Find the start
findRoot Variant: Module v3
of the variantB "variantB" ›variantB!
line of
development
Find the start
findRoot Variant: NULL
of the VariantE "variantE" (Results in
line of noSuchVariant)
development
______________________________________
Although the invention has been described with reference to a specific embodiment, this description is not meant to be construed in a limiting sense. Various modifications of the disclosed embodiment as well as alternative embodiments of the invention will become apparent to one skilled in the art upon reference to the description of the invention. It is therefore contemplated that the appended claims will cover any such modifications of embodiments that fall within the true scope of the invention. ##SPC1##
|
Same subclass Same class Consider this |
||||||||||
