Method of selecting and presenting data from a database using a query language to a user of a computer system5715450Abstract A thread management system for implementation within a computer system having a database disposed to be accessed through queries provided by a system user is disclosed herein. In this environment the thread management system provides a mechanism for subsequent replication of a sequence of one or more of such queries made by the system user. In a preferred implementation, a first thread step object is generated upon a first of the queries being provided to the database. The thread step object is formed so as to include information relating to a first state of the database. A representation of the first thread step object is then presented to the system user via a display of the computer system. Upon the system user selecting the representation of the first thread step object, the first of the queries to the database is replicated. A second thread step object may be generated upon provision of a second of the queries to the database. The second thread step object is created so as to include information relating to a second state of the database. In an exemplary implementation a thread object is then formed from the first and second thread step objects, and a representation of the thread object is displayed to the system user. Upon the system user selecting the representation of the thread object, the first and second queries to the database are replicated. Claims What is claimed is: Description A portion of the disclosure of this patent document contains material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent disclosure, as it appears in the Patent and Trademark Office patent files or records, but otherwise reserves all copyright rights whatsoever.
______________________________________
public:
CString m.sub.-- queryName;
// name of query
CString m.sub.-- viewName;
// name assigned screen
CObArray m.sub.-- frameArray;
// array of frame objects
______________________________________
As is described below, Screen View Object 60 additionally contains functions and private data to be used by these public functions. It should be understood that Screen View Object 60 may also include additional functions and data unrelated to the storage and retrieval of previously executed queries. FIG. 4 depicts a Frame Object 64 in further detail. A Frame Object 64 is an object representative of a Frame 32. In this regard a Frame Object 64 provides a template used to define the type of data to be displayed by a Frame 32. Frame Object 64 comprises Active Field Name 66, Frame Name 67, and Business Component Object Pointer 68. Active Field Name 66 contains the name of the field, if any, that is selected by the user. Frame Name 67 contains the name assigned to Frame 32. Business Object Pointer 68 points to a Business Component Object 70 that is used in conjunction with the Frame Object 64. The public data portion of Frame 64 may be represented with the following C++/MFC code, in which CSSBusComp refers to a C++ class derived from the MFC class CObject:
______________________________________
public:
CString m.sub.-- activeFieldName;
// name of active field
CString m.sub.-- frameName;
// name of frame
CSSBusComp* m.sub.-- pBusComp;
// pointer to Business
Object
______________________________________
Frame Object 64 additionally contains functions and private data to be used by these functions as more fully disclosed herein. Also, Frame Object 64 may contain additional functions and data unrelated to the storage and retrieval of previously executed queries. FIG. 5 depicts a Business Component Object 70. Business Component Object 70 is used to define that data displayed in the template defined by Frame Object 64. Business Component Object 70 comprises a Business Component Name 72, a Business Query 74, a Sort Specification 76, and a Row ID 78. Business Component Name 72 contains the name of the business object. Business Component Name 72 is set to the same value as the Frame Name 67 of the Frame Object 64 that points to the Business Component Object. Business Query 74 includes a description of the query used to retrieve the data represented by the business object (e.g., an SQL or QBE query). Sort Specification 76 contains a list of fields by which the data is ordered, and an indicator of whether the data is ordered in an ascending or descending sequence. RowID 78 contains a value that indicates the number of the row at which the data displayed in the Frame 32 is positioned. The public data portion of Screen View Object 70 may be represented with the following C++/MFC code:
______________________________________
public:
CString m.sub.-- busCompName
// name of business object
CString m.sub.-- busQuery
// query used to retrieve data
Cstring m.sub.-- sortSpec
// specification of sort order
CString m.sub.-- selRowId
// Number of current row displayed
______________________________________
As more fully disclosed herein, Business Component Object 70 additionally contains other functions and private data to be used by the above public functions. Also, Business Component Object 80 may contain additional functions and data unrelated to the storage and retrieval of previously executed queries. In summary, a Screen Object 60 serves to define the form and content of a Screen 30. Just as a Screen 30 comprises multiple Frames 32, Screen Object 60 comprises a plurality of Frame Objects 62. Each Frame Object 62 defines a frame template, and points to a Business Object 70 which includes data used to populate the template defined by Frame Object 32. Stored Objects FIGS. 6 through 11 depict objects that are used to capture and maintain the state of a plurality of Screen View Objects 30, and their constituent Frame Objects 64 and Business Component Objects 70, for later retrieval. These objects stored for subsequent retrieval may be collectively referred to as "Stored Objects." Stored Objects include the Thread Array Object, the Thread Object, the Thread Step Object, the Screen Bookmark Object, the Frame Bookmark Object, and the Business Object Bookmark. FIG. 6 depicts a Thread Array Object 80. Thread Array Object 80 comprises an array of Thread Objects 82. Thread Array Object 80 will be used in the manner described herein to provide the basis for a historical list of previously executed threads. The public data portion of Thread Array Object 80 may be represented with the following C++/MFC program code:
______________________________________
public:
CObArray m.sub.-- threadArray;
// array of thread objects
______________________________________
As described herein, Thread Array Object 80 additionally contains functions and private data to be used by these public functions. Also, Thread Array Object 80 may contain additional functions and data unrelated to the storage and retrieval of previously executed queries. FIG. 7 depicts a Thread Object 82. Thread Object 82 comprises an array of Thread Step Objects 84. Thread Object 82 will be used as further described herein to provide the basis for a historical list of thread steps that have been previously executed within a particular selected thread. The public data portion of Thread Object 82 may be represented with the following C++/MFC program code:
______________________________________
public:
CObArray m.sub.-- stepArray;
// array of thread step objects
______________________________________
As described herein, Thread Array Object 82 additionally contains functions and private data to be used by these public functions. Also, Thread Array Object 82 may contain additional functions and data unrelated to the storage and retrieval of previously executed queries. FIG. 8 depicts a Thread Step Object 84. Thread Step Object 84 contains a Thread Step Field Value 87, a Thread Step Title 85, pointer 86 to a Screen Bookmark Object 88. Thread Step Field Value 87 may be set to a value used to perform a dependent query in the thread step, as is more fully explained herein. Thread Step Title 85 contains a title that will be used in a graphical display of available thread steps. The public data portion of Thread Step Object 84 may be represented with the following C++/MFC program code, in which CSSViewBookmark refers to a C++ class derived from the MFC class CObject:
__________________________________________________________________________
public
CString m.sub.-- fieldValue
// thread step field value
CString m.sub.-- title
// thread step title
CSSViewBookmark*
m.sub.-- pViewBookmark;
// pointer to Screen BookMark
__________________________________________________________________________
As described herein, Thread Step Object 84 additionally contains functions and private data to be used by these public functions. Also, Thread Step Object 84 may contain additional functions and data unrelated to the storage and retrieval of previously executed queries. FIG. 9 depicts a Screen Bookmark Object 88. A Screen BookmarkObject is used to hold information needed to rebuild a Screen Object 60 when selected for retrieval by the user. Screen Bookmark Object 88 includes a Screen Bookmark Query Name 90, a Screen Bookmark View Name 92, an Screen Bookmark Active Frame Name 94, and an array of Frame Bookmark Objects 96. Screen Bookmark Query Name 90, and Screen Bookmark View Name 92 are used as storage for Screen Object 60's Query Name 61 and Screen View Name 63, respectively. Screen Bookmark Active Frame Name 94 is used to store the name of a currently active Frame 62. Frame Bookmark Objects 96 are used to rebuild a plurality of Frame Objects 64 when a Screen Object containing them is rebuilt. The public data portion of Screen Bookmark Object 88 may be represented with the following C++/MFC program code:
__________________________________________________________________________
public
CString m.sub.-- currentQueryName;
// storage for query name
Cstring m.sub.-- viewName;
// storage for screen name
CString m.sub.-- activeFrameName;
// storage for active frame name
CobArray
m.sub.-- frameBookmarkArray;
// array of Frame Bookmarks
__________________________________________________________________________
As described herein, Screen Bookmark Object 88 additionally contains functions and private data to be used by these public functions. FIG. 10 depicts a Frame Bookmark Object 96. A Frame Bookmark Object is used to hold information needed to rebuild a Frame Object 64 when a Screen Object 60 in which the Frame Object 64 is contained is selected for retrieval by the user. Frame Bookmark Object 96 includes a Frame Bookmark Frame Name 98, a Frame Bookmark Active Field Name 100, and a pointer 102 to a Business Component Bookmark 104. Frame Bookmark Frame Name 98 and Frame Bookmark Active Field Name 100 are used as storage for Frame Object 64's Frame Name 67 and Active Field Name 66, respectively. The public data portion of Frame Bookmark Object 96 may be represented with the following C++/MFC program code, in which CSSBCBookmark refers to a C++ class derived from the MFC class CObject:
__________________________________________________________________________
public:
CString m.sub.-- activeFrameName;
// storage for active frame name
CString m.sub.-- activeFieldName
// storage for active field name
CSSBCBookmark*
m.sub.-- pBCBookmark;
// pointer to business component
// bookmark
__________________________________________________________________________
As described herein, Frame Bookmark Object 96 additionally contains functions and private data to be used by these public functions. FIG. 11 depicts a Business Component Bookmark Object 102. A Business Component Bookmark is used to hold information needed to obtain the data to complete a Frame Object 64 when a Screen Object 60 in which the Frame Object 64 is contained is selected for retrieval by the user. Business Component Bookmark Object 102 includes a Business Component Bookmark Name 72, a Business Component Bookmark Query 74, a Business Component Bookmark Sort Specification 76, and a Business Component Bookmark Row ID 78. Business Component Bookmark Name 72, a Business Component Bookmark Query 74, a Business Component Bookmark Sort Specification 76, and a Business Component Bookmark Row ID 78 are used as storage for Business Component Object 70's Business Component Name 72, a Business Query 74, a Sort Specification 76, and a Row ID 78, respectively. The public data portion of Business Component. Bookmark Object 102 may be represented with the following C++/MFC code:
______________________________________
public:
CString m.sub.-- CompName;
// name of business object
CString m.sub.-- Query;
// query used to retrieve data
CString m.sub.-- sortSpec;
// specification of sort order
Cstring m.sub.-- selRowId;
// Number of current row displayed
______________________________________
As described herein, Business Component Bookmark Object 102 additionally contains functions and private data to be used by these public functions. Operation of the Thread Management System The thread management system of the present invention contemplates performance of at least the following operations relating to the archival and retrieval of queries. These operations include: Thread Array Creation; Thread Array Archival; First Thread Creation; Thread Step Creation; Thread Creation other than a First Thread; Thread Step Retrieval; and Thread Restoration. In an exemplary embodiment of the present invention, an object-oriented computer program hereinafter referred to as a Frame Manager, is executed to perform these operations. A description will now be provided of the manner in which the Frame Manager performs each of these operations. Thread Array Creation The archival or retrieval of any threads involves creation of a Thread Array Object 84 upon program initialization. FIG. 12 depicts the creation of Thread Array Object 84. Referring to FIG. 12, in step 120 a Thread Array Object creation routine is seen to begin execution. In step 122, the routine checks as to whether a Thread Array Object 84 is found in persistent storage, e.g., storage implemented as an MFC CArchive object. If a Thread Array Object 84 is found, the routine proceeds to step 124 and loads the previously stored Thread Array Object 84. If no Thread Array Object 84 is found, the routine instantiates a Thread Array Object having a dimension of 0; that is, an object having no entries. Following either step 124 or 126, the routine proceeds to step 128 and exits from the Tread Array Object routine. First Thread Creation After a Thread Array Object has been defined in the manner described above, it will nonetheless lack Thread Objects until a first thread has been initiated by a user. A thread is initiated upon submission by a user of a first query. FIG. 13A is a flow chart representative of the creation of a first Thread Object. In step 140, the user enters a query to begin the process of creation of a Thread Object. This may be effected by, for example, selecting: a Tab Icon 40 on Screen Image 30 with a mouse or other pointing device 16 or a screen from the SCREEN menu item on Menu 41. In response to entry of the user query in step 140, in step 142 the screen name is identified which corresponds to the screen image to be displayed. This may be done, for example, by referencing the title of the Tab Icon 40 or option from SCREEN menu item on menu 41. Because this query bears no relation to a previously submitted query, it is defined as an independent query and a new thread is begun. Also in response to the entry of a query in step 140, control is transferred to a routine hereinafter referred to as BuildView. As is indicated in FIG. 13B, the BuildView routine takes as input two parameters; namely, a value for a screen name and a context value. The screen name from step 142 is used to supply a value for the screen name. The context value is set to "normal," indicating that the operation is neither a dependent query nor a restoration of an archived thread or thread step. In step 144, the BuildView routine instantiates a Screen View Object 60 to represent a screen to be displayed. The BuildView routine sets Screen Query Name 61 to the value of the query that was loaded in step 140. Screen Name 63 is set to the value determined in step 142. Because Frame Objects 64 are contained within Screen View Object 60 (FIG. 3), Frame Objects 64 (FIGS. 3 and 4) are also instantiated when Screen View Object 60 is instantiated. For each Frame Object instantiated, the Frame Name 67 is set to the value of the frame as defined in the screen definition file. For each Frame Object 64, a Business Component Object 70 is also instantiated, and pointer 68 is set to point to the newly instantiated Business Component Object 70 (FIG. 4). For each Business Component Object 70, a query is executed to retrieve data for its corresponding Frame. This results in the retrieval of every record in the database table of the corresponding Frame having a value specified by Key Field 35. At this point, a full Screen View Object 60 has been built and initialized, and can now be rendered into a screen image 30 and displayed to the user. In step 146, the BuildView routine instantiates a Thread Object 82 and then also instantiates a Thread Step Object 60 (FIG. 3). The Thread Step Title 85 is initialized with the value of the screen name (FIG. 8). The Thread Step Field Value 87 and Screen Bookmark Pointer 86 are not initialized (FIG. 8). In this regard such an uninitialized thread step is referred to as an "empty step." In an exemplary embodiment of the thread management system the last (or only) step in a thread comprises an empty step. Upon execution of step 146, Thread Array Object 80 contains a single Thread Object 82, which in turn contains a single Thread Step Object representative of an empty step. Thread Step Creation from a Dependent Query As noted above, a Thread Step Object 84 is created as part of the creation of a Thread Object 82. Additional Thread Step Objects 84 are also created within a Thread Object 82 in response to a dependent query. A dependent query is invoked by selecting a key field in a list frame for a more detailed inquiry. This provides the effect of "drilling down" into a database to get further information on the data displayed. For example, in FIG. 2 the Contacts Frame 32b may be characterized as a list frame containing data. As indicated in FIG. 2, the key field of Contacts Frame 32b is the "Last Name" field. For example, a dependent query may be performed by using pointer 16 to select a row in Contacts Frame 32B. This results in the system performing a dependent query. Specifically, a query associated with the frame is submitted and the Contacts screen is used to display the resulting data. The query is a dependent query in that it is dependent upon data already having been retrieved and displayed by a prior independent query. FIG. 14A is a flowchart depicting the steps performed during the creation of a Thread Step Object 84 in response to a dependent query. In addition, FIG. 14B represents the interrelationships among the various routines involved in the creation of this Thread Step Object 84. Referring now more specifically to FIG. 14, in step 160, the user initiates a dependent query, e.g., by using pointer 16 to select the row as described above. In step 162 the screen name is identified. Typically, the screen name will be the same as the frame name from which the dependent query was invoked, in this example, "Contact." The BuildView routine is then called, taking as parameters the screen name "Contact" and a context parameter referred to as "DRILLDOWN". In this regard the "DRILLDOWN" context indicates that the operation resulting in invocation of the BuildView routine comprised a dependent query (i.e., rather than an independent query). The DRILLDOWN context is an indication to the BuildView routine that data has already been presented to the user in response to a previous query. Therefore, the status of the prior query must be recorded so that it may later be retrieved. In step 164, a Screen Bookmark Object 88 (FIG. 9) is created to preserve the status of the Screen View Object 60 representative of the currently displayed screen image. The BuildView routine calls a Screen::CreateBookMark function, a function located in Screen Object 60, in order to create Screen Bookmark Object 88. As indicated in FIG. 14B, Screen::CreateBookmark instantiates a Screen Bookmark Object 88. Screen::CreateBookmark sets Screen Bookmark Query Name 90 to the value in Screen Query Name 61. Screen::CreateBookmark sets Screen Bookmark View Name 92 to the value in Screen View Name 63. Screen::CreateBookmark sets Screen Bookmark Active Frame Name 94 to the name of the Frame Object 64 currently designated as the active Frame Object in Screen View Object 60. In step 166, for each Frame Object 64 that is contained within Screen View Object 60, Screen::CreateBookmark invokes the function Frame::CreateBookmark. Each invocation of Frame::CreateBookmark instantiates a Frame Bookmark Object 96 within Screen Bookmark Object 88. Frame::CreateBookmark sets Active Field Name 66 to the name of the field that is currently active within the Frame 32 for which Frame::Bookmark is being called. Frame::CreateBookmark sets Frame Name 67 to the frame name of the Frame 32 for which Frame::Bookmark is being called. Each time the routine Frame::CreateBookmark is invoked, it also invokes BusinessObject::CreateBookmark to instantiate and initialize a Business Component Object Bookmark 70 for each Frame 32. Each BusinessObject::Bookmark invocation stores in its Business Component Bookmark Object 70: (i) the name of the business object for that frame in Business Component Name 106; (ii) the search instruction in effect for that frame in Query 108; (iii) the sort specification in Sort Spec 110; and (iv) the ID of the Row at which the frame is positions in Row ID 112. In step 168 the routine ThreadArray::UpdateThread is invoked in order to update the current Thread Object 82. ThreadArray::UpdateThread is passed a field value of the selected field of the current screen (in this example, "Telesales Lan at Best"), as well as the Screen Bookmark Object created in step 164 (which includes as constituent parts of a set of Frame Bookmark Objects and Business Component Bookmark Objects). ThreadArray::UpdateThread selects the last Thread Step Object 84 in the current Thread Object 82, and updates it with the passed field value and the Screen Bookmark Object. ThreadArray::UpdateThread invokes the function ThreadArray::AddStepToThread. ThreadArray::AddStepToThread instantiates a new Thread Step Object 84, adds it into Thread Object 80 as a new empty step, and uses the name of the new screen as the Thread Step Title 85. In step 170, the Frame Manager destroys the current Screen Object 60. In Step 172, the Frame Manager instantiates a new Screen Object. The Screen Object 60 instantiates Frame Objects 64, which in turn instantiate Business Component Objects 70 and directs it to perform the query stored in its corresponding Business Component Bookmark Object. This process is substantially similar to the process of creating a new Screen Object 60 for an independent query (step 144). As each Frame Object 64 is instantiated, the Frame Object calls the function BusinessObject::Execute in order to execute the stored query associated with the frame, and the function BusinessObject::Home in order to request the Business Object to position itself at row 1 of its data retrieved. In response, the Business Component Object 70 calls FrameObject::NotifyNewData to notify the Frame that new data has been loaded in response to the query. FrameObject::NotifyNewData repeatedly calls the Business Component Object 70 to obtain a row-by-row list of data to be displayed. When it has completed displaying the dam, Frame::NotifyNewData returns to BusinessObject::Home, which in turn returns control to the Frame Object 64. In Step 174, the data in the screen image represented by Screen Object 60, including its constituent Frame Objects 64, is displayed. FIG. 15 depicts the result of the steps performed in FIG. 14. Screen Image 30 now reflects the contents of the Screen View Object 60 that was created in step 172. Specifically, Screen Image 30 comprises a Contacts Frame 172, a Contacts Detail Frame 174, and an Activities Frame 176. Thread Bar 42, which serves as a graphical representation of Thread Object 82, now includes two Thread Step Icom 178 and 180. Thread Step Icon 178 represents the Thread Step previously displayed, i.e. as Screen 30 of FIG. 2. Thread Step Icon 178 indicates that the prior screen was an Opportunity Screen, and that the value of its Key Field 35 was "Telesales Lan at Best." In contrast, Thread Step Icon 180 represents the currently displayed screen. Specifically, Thread Step Icon 180 indicates that the screen is a Contacts Screen, and as the last Thread Step in the Thread, is represented as an empty step, i.e., with no value displayed in the Thread Step Icon. Thread Creation Other Than a First Thread Additional threads are formed in a manner that is substantially similar to that described in the preceding sectio. During this process, the current thread, which is being replaced by the new thread, must be recorded through the use of bookmarks. As described below, this recordation of prior thread objects using bookmarks is similar to the manner in which prior thread step objects are recorded during drilldown operation. FIG. 16 is a flow chart representative of the creation of a Thread Object other than a first Thread Object. In step 190, the user enters a query to begin the process of creation of a Thread Object. This may be effected by, for example, selecting one of the following using a pointing device 16: a Tab Icon 40 on Screen Image 30, a screen from the SCREEN menu item on Menu 41, or the QUERY menu item on Menu 41 to request loading a previously stored query. In response to entry of the user query in step 190, in step 192 the screen name is identified which corresponds to the screen image to be displayed. This may be done, for example, by referencing the title of the Tab Icon 40 or option from SCREEN menu item on menu 41. Because this query bears no relation to a previously submitted query, it is defined as an independent query and a new thread is begun. Also in response to the entry of a query in step 190, control is transferred to the BuildView routine. As with the creation of the first thread, the BuildView routine takes as input two parameters; namely, a value for a screen name and a context value. The screen name from step 192 is used to supply a value for the screen name. The context value is set to "normal," indicating that the operation is neither a dependent query nor a restoration of an archived thread or thread step. In step 194, a Screen Bookmark Object 88 is created to preserve the status of the Screen View Object 60 that represents the currently displayed screen image. The BuildView routine calls the Screen::CreateBookMark function, which instantiates a Screen Bookmark Object 88. The Screen::CreateBookmark function sets Screen Bookmark Query Name 90 to the value in Screen Query Name 61, and sets Screen Bookmark View Name 92 to the value in Screen View Name 63. In addition, the Screen::CreateBookmark function sets Screen Bookmark Active Frame Name 94 to the name of the Frame Object 64 currently designated as the active Frame Object within the Screen Object. In step 196, for each Frame Object 64 that is contained within Screen View Object 60, the function Screen::CreateBookmark invokes the function Frame::CreateBookmark. Each invocation of Frame::CreateBookmark instantiates a Frame Bookmark Object 96 within Screen Bookmark Object 88. Frame::CreateBookmark sets Active Field Name 66 to the name of the field that is currently active within the Frame 32 for which Frame::Bookmark is being called. In addition, Frame::CreateBookmark sets Frame Name 67 to the frame name of the Frame 32 for which Frame::Bookmark is being called. The function Frame::CreateBookmark also invokes the function BusinessObject::CreateBookmark to instantiate and initialize a Business Component Object Bookmark 70 for each Frame 32. Each invocation of BusinessObject::Bookmark stores in its Business Component Bookmark Object 70: (i) the name of the business object for that frame in Business Component Name 106; (ii) the search instruction in effect for that frame in Query 108; (iii) the sort specification in Sort Spec 110; and (iv) the ID of the Row at which the frame is positioned in Row ID 112. In step 198, the function ThreadArray::EndThread is invoked in order to end the current thread in anticipation of its replacement by the new thread. In order to to update the current Thread Object 82, the function ThreadArray::EndThread invokes the function ThreadArray::UpdateThread. The function ThreadArray::UpdateThread is passed a field value of the selected field of the current screen (in this example, "Telesales Lan at Best"), and the Screen Bookmark Object created in step 164 (which includes as constituent parts a set of Frame Bookmark Objects and Business Component Bookmark Objects). ThreadArray::UpdateThread selects the last Thread Step Object 84 in the current Thread Object 82, and updates it with the passed field value and the Screen Bookmark Object: Because the process of FIG. 16 concerns replacement of an entire Thread, the function ThreadArray::AddStepToThread is not invoked for an independent query. Instead, in step 200, the EndThread function stores the current Thread Object in Thread Array Object 80. In step 202, the current Screen Object 60 is destroyed by the Frame Manager. In step 204, the BuildView routine instantiates a Screen View Object 60 to represent a screen to be displayed. The BuildView routine sets Screen Query Name 61 to the value of the query that was loaded in step 140. Screen Name 63 is set to the value determined in step 142. Because Frame Objects 64 are contained within Screen View Object 60 (FIG. 3), Frame Objects 64 (FIGS. 3 and 4) are also instantiated when Screen View Object 60 is instantiated. For each Frame Object instantiated, the Frame Name 67 is set to the value of the frame as defined in the screen definition file. For each Frame Object 64, a Business Component Object 70 is also instantiated, and pointer 68 is set to point to the newly instantiated Business Component Object 70 (FIG. 4). For each such newly instantiated Business Component Object 70, a query is executed to retrieve data for its corresponding Frame. This results in the retrieval of those records specified by key field 35 from this corresponding Frame. At this point, a full Screen View Object 60 has been built and initialized, and can now be rendered into a screen image 30 and displayed to the user. In step 206, the BuildView routine instantiates a Thread Object 82 and in then also instantiates a Thread Step Object 60 (FIG. 3). The Thread Step Title 85 is initialized with the value of the screen name (FIG. 8). The Thread Step Field Value 87 and Screen Bookmark Pointer 86 are not initialized (FIG. 8). As in the instantiation of the first Thread Object, the last (or only) step in a thread comprises an empty step. Upon execution of step 206, Thread Array Object 80 contains a new Thread Object 82, which in turn contains a single Thread Step Object representative of an empty step. In step 208, the screen image represented by the new Screen View Object 60 is displayed. Thread Step Retrieval The thread management system of the invention allows Thread Steps that have previously been stored to be subsequently retrieved. FIG. 17 is a flow chart representative of the steps involved in such restoration of a Thread Step. In step 220, the user identifies a Thread Step within the current thread to be restored. This will typically be accomplished by selecting a Thread Step Icon from Thread Bar 31 (e.g., Thread Step Icon 178 (FIG. 15)). In step 222, in response to the user identification of a Thread Step to be restored, the Thread Step Object 84 corresponding to the selected Thread Step is located in the current Thread Object 82 by the Frame Manager. Also in response to the identification of the Thread Step on step 222, control is transferred to the BuildView routine. The BuildView routine takes as input three parameters. As discussed above, BuildView takes as input a value for a screen name and a context value. The screen name used in this invocation comes from the Screen View Name 92 found in the Screen Bookmark Object 88 that is associated with the identified Thread Step Object 84. The context value is set to "restore," to indicate restoration of an archived thread or thread step. In addition, a third parameter, unique to restoration operations, is supplied to the BuildView routine. In the exemplary embodiment, the third parameter comprises a Screen Bookmark object 88. In step 226, the BuildView routine constructs a new Screen View Object 60 in the usual manner, including Screen View Object's 60 constituent Frame Objects 64 and Business Component Objects 70. In step 228, the BuildView routine calls the Screen::GoToBookmark function. The Screen::GoToBookmark function initializes the name and active fields of Screen View Object 60 from the values stored in the Screen Bookmark Object 88. The Screen::GoToBookmark function then, for each Frame in the Screen Object, calls the Function Frame::GoToBookmark. In each invocation of Frame::GoToBookmark, the Frame Name 67 is set from Frame Bookmark Object Frame Name field 98, and Active Field Name 66 is set from Frame Bookmark Object Active Field Name 100. Additionally, each invocation of Frame::GoToBookmark invokes its associated Business Object Bookmark by invoking BusinessObject:: GoToBookmark. Each invocation of BusinessObject::GoToBookmark sets: (i) the Business Component Name 72 from the saved value Business Component Name 106; (ii) the Business Component Query Name 74 from the saved bookmark value Business Component Query Name 108; (iii) Business Component Sort Spec 76 from saved value Business Component Bookmark Sort Spec 110; and (iv) Business Component Row ID 78 from saved value Business Component Bookmark Row ID 112. In step 230, the Screen View Object 60 is populated. Each Frame Object 64 is consecutively processed to execute ots stored query. Each Frame Object 64 in turn calls its associated Business Component Object 70. Each Business Component Object 70 sets an execution indicator that it has previously been executed. In addition, each Business Component Object 70 calls Frame::NotifyNewData to notify the associated Frame Object 64 that its data is ready for display. The Execution indicator informs Frame::NotifyNewData that the RowID 78 in the Business Component Object 70 reflects meaningful data; that is, that the Business Component Object 70 is positioned to a valid table row according to direction from a Business Component Bookmark Object. The function Frame::NotifyNewData thus does not call BusinessObject::Home in order to reposition the Business object to the first row of data in the table displayed in the frame. Frame::NotifyNewData will instead prepare the table for display starting at the row identified by RowID 78. In step 232, the screen image corresponding to the newly recovered Screen View Object is displayed. Thread Restoration In addition to facilitating the restoration of thread steps in a current thread, the present invention also enables restoration of a previously saved thread. FIG. 18 depicts an exemplary sequence of steps to be performed in restoration of a previously saved thread. In step 240, the user requests a graphical representation of Thread Array 80 to be displayed. This can be requested, for example, by clicking on Thread Array Icon 44 (FIG. 2). In response, a display of the names associated with all previously stored threads is displayed. Specifically, the names stored in the first Frame Objects 64 in each of the Thread Objects 82 are presented for display. FIG. 19 depicts one such possible display. In step 242, the user selects a thread desired to be restored. In step 244, the frame manager finds and selects the Thread Object 82 corresponding to the Thread Object name selected by the user in step 242. This may be done, for example, by iterating through each of the Thread Objects 82 and comparing the name selected in step 242 to the name stored in the Frame Object 64 contained in the Thread Object 82 until a match is found. In step 246, the Frame Manager similarly searches for the last Thread Step Object in the Thread Object selected in step 244. Finally, in step 248; the invention performs a step restore process, as has previously been discussed in connection with FIG. 17 above. Thread Array Archival Generally, the Thread Array 80 is read from disk or other persistent storage at time of initialization. The manipulations of the Thread Array and its constituent objects (including all bookmarks) is contemplated to be performed on an image of the Thread Array 80 in storage. Therefore, it is necessary to provide a means by which the Thread Array may be stored on disk or other persistent storage so as to be available for reloading at a future time. Typically, this is performed only at program termination. FIG. 20 depicts steps that may be taken at program termination to store Thread Array 80 on a disk or other persistent storage. In step 260, the invention determines whether a thread is in progress. If so, in step 262, the current thread is stored. The steps required to store the current "in progress" thread are substantially similar to those previously described with reference to FIG. 16. However, there is of course no need to create a new thread and the objects attendant thereto during the process of storing the current "in progress" thread. MFC provides a SERIALIZE function that serves to save an object to persistent storage. In step 264, a SERIALIZE function is performed on Thread Array Object 80, causing the Thread Array Object 80 to be stored. In step 266, the Thread Array Object performs a SERIALIZE function on each of its constituent Thread Objects 82, causing each of the Thread Objects 82 to be stored. In step 268, each of the Thread Objects 82 performs a SERIALIZE function on each of its constituent Thread Step Objects 84 to be stored. In step 270, each of the Thread Step Objects performs a SERIALIZE function on its respective Screen Bookmark Object 88, causing each such respective Screen Bookmark Object 88 to be stored. In step 272, each of the Screen Bookmark Objects 88 performs a SERIALIZE function on each of its Frame Bookmark Objects 96, causing each of the Frame Bookmark Objects to be stored. In step 274, each of the Frame Bookmark Objects 96 performs a serialization function on its respective Business Component Bookmark Object 104, causing each such respective Business Component Bookmark Object 104 to be stored. In step 276, termination of the frame manager program involves storing all of the Thread Array 80 and its constituent components. All publications and patent applications mentioned in this specification are herein incorporated by reference to the same extent as if each individual publication or patent application was specifically and individually indicated to be incorporated by reference. The invention now being fully described, it will be apparent to one of ordinary skill in the art that many changes and modifications can be made thereto without departing from the spirit or scope of the appended claims.
|
Same subclass Same class Consider this |
||||||||||
