Delta model processing logic representation and execution system6985900Abstract The invention presents novel method, apparatus, and data structures for storing, maintaining, and executing processing logic on a computer system. Processing logic is encoded into its distinct, constituent elements that are flexibly linked, facilitating reuse and reconfiguration. Executable responses are selected for an input signal by identifying a correspondence between the input signal and an expression, evaluating the expression to a resulting value, and identifying a correspondence between the expression and its resulting value, and an executable response. Claims What is claimed is: Description FIELD OF INVENTION
In the presently described embodiment, the executable response template associated with a task-type contains an unordered set of command statements. Furthermore, there is no provision for branching between and among the individual commands in the set. As such, the computer user can make no assumption about the order in which the work units are actually executed in any particular instance. The unordered and unbranched nature of the set renders the representation of the process model in the PMKBS catalog more susceptible to automated analysis because the analyzer does not have to identify and account for operational interdependencies between individual commands. The unordered and unbranched nature precludes such interdependencies. For the same reason, the unordered and unbranched nature also permits easy exploitation of parallel processing capabilities. These represent further advantages of the invention. The source identifier field 625 contains the identity of the computer user or system responsible for creating the instant task-type definition. FIG. 6C depicts the record layout for an event-to-task correspondence record 640 contained in the ETCORR 560 table. The record 640 comprises event-type identifier 641, task-type identifier 643, scheduled-time expression template 645, and source identifier fields 647. The primary key 659 comprises the event-type identifier 641 and task-type identifier 643 fields. The event-type identifier field 641 contains a unique name for a type of event that can occur in the subject process and matches the value stored in the event-type identifier field 601 of a record 600 in the ET table 555. The task-type identifier field 643 contains a unique name for an executable response and matches the value stored in the task-type identifier field 621 of a record 620 in the TT table 565. The scheduled-time expression template field 645 contains an expression that may resolve in any particular instance to a date-time value. The resolved date-time value represents the earliest desired execution time for the executable response associated with the task-type. Inclusion of this field 645 in the present embodiment allows the PMKBS to feature deferred task execution, in addition to immediate task execution. The source identifier field 647 contains the identity of the computer user or system responsible for creating the instant event-type definition. FIG. 6D depicts an alternative embodiment 660 for an event-to-task correspondence record 640 that may be contained in an ETCORR table 560. The record layout 660 depicted in FIG. 6D differs from the record layout 640 depicted in FIG. 6C only by the addition of an expression value field 663 in the primary key area 679 of the record. Using the record layout 660 of FIG. 6D, the table is more appropriately entitled the event-result-to-task correspondence table. This reflects the possibility that in some embodiments, evaluation of the expression stemming from the expression template 605 in the event-type definition record 600 could produce more than one resulting value that should correlate to a task. For example, in an embodiment of a PMKBS an expression may be able to evaluate to a resulting value of 1, 2, or 3. If the resulting value is 1, then it is desired to perform a task-type that sends email; if type 2, a task-type that sends fax; and if type 3, a task-type that sends regular mail. Adding the expression value field 663 to the correspondence record 660 allows it to correlate particular resulting values for an event-type, to task-types, rather than just correlating event-types to task-types. The reason that the preferred embodiment of the PMKBS uses the record layout 640 depicted in FIG. 6C that omits the expression value field is that the preferred embodiment only executes tasks when evaluation of an expression produces a value of "TRUE." A resulting expression value of "TRUE" is implied in every event-to-task correspondence and can thus be omitted. The preferred embodiment could employ the record layout 660 depicted in FIG. 6D that includes the expression value field 663, but the field would contain the value "TRUE" in every record. This would needlessly consume storage space and could slow down the processing of records by forcing the RDBMS to regularly consider the "TRUE" value in each record by virtue of its position in the primary key. In the preferred embodiment, the expression value is implied. PMKBS Operating Data Structures While the data structures in the PMKBS catalog 542 contain declarative information that generally define elements of the processing logic, data structures in the PMKBS operating data space 548 contain information that specifically reflect particular instances, or occurrences, arising during operation of the subject process. For this reason, individual records within the operating tables may be referred to, themselves, as instances or occurrences. Further, an instance or occurrence in an operating table may be derived from an archetype record in the PMKBS catalog. The derivation may involve, for example, variable substitution. In such a case, the process of derivation is called specialization and the record is said to be specialized. FIGS. 7A to 7D depict record layouts for PMKBS operating data structure entries. FIG. 7A depicts the record layout for a Notice record 700 contained in the NOTICE table 580. In the presently described embodiment, the NOTICE table serves as the signal source for the PMKBS. The NOTICE record 700 comprises notice identifier 701, event-type identifier 703, parameter data 705, and time stamp 707 fields. The primary key 719 of the record 700 comprises the notice identifier field 701. The notice identifier field 701 contains a unique value with which to identify the particular row in the NOTICE table from among all others. The event-type identifier field 703 contains a unique name for a type of event that can occur in the subject process and matches the value stored in the event-type identifier field 601 of a record 600 in the ET table 555. The parameter data field 705 may contain a list of data items that contextualize the event that incited the input signal represented by the NOTICE record 700 instance. For example, if a change in the number of a part in inventory is the type of event, then the parameter data 705 may provide context for the event by specifying the particular part number. In the present embodiment, the list of data items is in keyword-value format using the syntax depicted in Table T2. The time stamp field 707 contains a representation of the date and time at which the record 700 was inserted into the table 580. Table T2. Parameter Data Format (Items Appearing in Brackets are Optional)
FIG. 7B depicts the record layout for an event occurrence record 720. Records of this format may occur in multiple tables in the PMKBS operating data area 648 as, in this embodiment, there is one table per declared event-type for storing instance data. The purpose of the event-type occurrence records in the present embodiment is to maintain a log of PMKBS activity. The records may also be used to incite execution of portions of the PMKBS program code as discussed in more detail in relation to FIG. 8A to 8D. The record 720 comprises event-type identifier 721, notice identifier 723, expression 725, expression value 727, and time stamp 729 fields. The primary key 739 of the record 720 comprises the event-type identifier 721 and notice identifier 723 fields. The event-type identifier field 721 contains a unique name for a type of event that can occur in the subject process and matches the value stored in the event-type identifier field 601 of a record 600 in the ET table 555. The notice identifier field 723 contains a unique value that identifies a particular row in the NOTICE table 580. The expression field 725 contains the specialized form of the expression template contained in the active record in the ET table having the matching event-type identifier with that of the instant record. The expression value field 727 may contain the resultant value from the evaluation of the specialized expression contained in the expression field 725. The time stamp field 729 contains a representation of the date and time at which the record 720 is inserted into a table. FIG. 7C depicts the record layout for a task occurrence record 740. Records of this format may occur in multiple tables in the PMKBS operating data area as, in this embodiment, there is one table per declared task-type for storing instance data. The purpose of the task-type occurrence records in the present embodiment is to maintain a log of PMKBS activity. The record may also be used to incite execution of portions of the PMKBS program code as discussed in more detail in relation to FIG. 8A to 8D. The record comprises task-type identifier 741, notice identifier 743, executable response 745, and time stamp 747 fields. The primary key 759 of the record 740 comprises the task-type identifier 741 and notice identifier 743 fields. The task-type identifier field 741 contains a unique name for an executable response, and matches the value stored in the task-type identifier field 621 of a record 620 in the TT table 565. The notice identifier field 743 contains a unique value that identifies a particular record in the NOTICE table. The executable response field 745 contains the specialized form of the executable response model contained in the record in the TT table having the matching task-type identifier with that of the instant record. The time stamp field 747 contains a representation of the date and time at which the record was inserted into a table. FIG. 7D depicts the record layout for a delayed task queue record 750 contained in the Delayed Task Queue (DTQ) table 575. The DTQ table 575 in this embodiment is used to implement deferred tasks. The purpose of the delayed task queue records 750 in the present embodiment is to maintain a log of PMKBS activity and to maintain a record of pending deferred execution requests. The records may also be used to incite execution of portions of the PMKBS program code as discussed in more detail in relation to FIGS. 8A to 8D. The record 750 comprises scheduled time 751, task-type identifier 753, notice identifier 755, and executable response 757 fields. The primary key 769 of the record 750 comprises the scheduled time field 751. The scheduled time field 751 contains a representation of the earliest date and time at which a deferred task is to be executed. The task-type identifier field 753 contains a unique name for an executable response to be deferred, and matches the value stored in the task-type identifier field 621 of a record 620 in the TT table 565. The notice identifier field 755 contains a unique value that identifies the particular row in the NOTICE table that gave rise to the instant DTQ record. The executable response field 757 contains the specialized form of the executable response model contained in the record in the TT table having the matching task-type identifier with that of the instant record. An operational example involving the use of the operating data structures illustrated in FIGS. 7A to 7D is described later in reference to FIGS. 9A-9B. PMKBS Operational Description FIGS. 8A to 8E depict operational flowcharts of functional elements in the PMKBS. In the present embodiment, the depicted functional elements are implemented as software that may execute on a computer hardware configuration as previously described in relation to FIGS. 4A and 4B. FIG. 8A depicts a flowchart of the event discriminator 335 and the expression correlator 340, referring back to FIG. 3, which are integrated into one program module in the presently described embodiment. The event discriminator 335 comprises logic block 803. The expression correlator 340 comprises logic blocks 805 through 813. The event discriminator 335 begins processing when a new record is inserted into the NOTICE table 580 as represented by logic block 801. The RDBMS employed in this embodiment includes support for triggers, or triggered program execution, which is known in the art (rf., e.g., Alan Freedman, The Computer Desktop Encyclopedia (AMACOM 1996). The trigger feature of the RDBMS permits the RDBMS user to define program code to be executed when "triggered" by events arising within the RDBMS. Triggering events may include, e.g., the insertion of a record, or the update of a particular field. The entry point of logic block 803 is defined as the target program for the trigger corresponding to the insert-new-row event of the NOTICE table. As noted earlier, the NOTICE table 580 serves as the signal source 330 for the PMKBS in the present embodiment. Software that is executing on any computer able to insert a record into the NOTICE table, may inform the PMKBS about an occurrence of an event relevant to a subject process by inserting a NOTICE record. The executing software may or may not have been initialized, itself, by the PMKBS. For example, a transaction processing application program that is initiated by a computer user to record information about an order received in the mail, may insert a record into the NOTICE table to alert the PMKBS that an order has been received. An event is signaled to the PMKBS in order to utilize the processing logic defined to the PMKBS. Event discrimination identifies the type of event represented by an input signal. Performing event discrimination in the present embodiment is straightforward, as the event-type identifier exists as a field within the NOTICE table. The event discriminator 335 extracts the value in this field from the newly inserted record, in logic block 803. The event discriminator 335 is aware of the identity of the newly inserted record by means of the RDBMS's triggering process. PMKBS processing then continues on to the expression correlator 340. The process of expression correlation resolves an expression that is used to determine some condition relevant to the subject process. In logic block 805, the expression correlator 340 uses the event-type identifier passed by the event discriminator 335 to locate the expression template that corresponds to the instant event-type. The expression correlator locates and retrieves the expression template by querying the RDMBS for the active record in the ET table with a matching event-type identifier. In logic block 807, the expression correlator retrieves and parses the parameter data field from the newly inserted NOTICE record. Parsing data fields to isolate and identify individual constituent elements is well known in the art. In logic block 809, the expression correlator specializes the just retrieved expression template, performing any variable substitution, possibly using the parsed parameter data. In logic block 811, the expression correlator fixes values for the event-type identifier, notice identifier, expression, and the time stamp fields for an event occurrence record. The expression correlator then inserts the new event occurrence record into the table named after the event-type, using the services of the RDBMS. The expression correlator then terminates its processing in logic block 813. The expression correlator program code in this embodiment may not directly pass control to the evaluator program code, to continue the processing of the input signal. Instead, it may reach the evaluator program code through the RDBMS trigger mechanism when, in logic block 811, the expression correlator program code inserts the new event occurrence record. FIG. 8B depicts a flowchart of the expression evaluator 345 together with the task correlator 350. The expression evaluator 345 and task correlator 350 are integrated into one program module in the presently described embodiment. The expression evaluator comprises logic block 823. The task correlator comprises logic blocks 825 through 841. The process of expression evaluation determines some condition relevant to the subject process. The expression evaluator 345 begins processing when a new record is inserted into an event occurrence table as represented by logic block 821. The entry point of logic block 823 is defined as the target program for the trigger corresponding to the insert-new-row event of each event occurrence table. Logic block 823 retrieves the expression field from the newly inserted record, and evaluates it to a single resulting value. Often, the resulting value represents the current state condition of some aspect of the subject process. The evaluator 345 then stores the resulting value in the expression value field of the instant record. Processing continues to the task correlator 350. The task correlation process identifies the course or courses of action to take given the occurrence of a particular type of event at a time when a particular condition exists. The task correlator 350 tests the value resulting from expression evaluation to determine which, if any, task execution should arise from the particular resulting value from the particular event-type. In the presently described embodiment, the expressions are predicate logic expressions, as described earlier in reference to FIG. 6A, that result in a truth value. In the present embodiment, subsequent task execution only occurs when the resulting truth value is "TRUE." In logic block 825, the task correlator tests whether the resulting value is "TRUE." If it is not, processing of the task correlator, and the input signal, terminate at logic block 827 because in this embodiment, only "TRUE" conditions lead to executable responses. If the resulting value is "TRUE," the task correlator in logic block 829 performs a query against the ETCORR table, using the event-type identifier as a search argument, to find all task-types associated with the instant event-type. In the present embodiment an event-type can be associated with multiple task-types. This further contributes to reuse of elements of processing logic by encouraging modules task-type design. Task-types can, in effect, be used as subroutines are in traditional programming languages. In block 831, the task correlator selects an ETCORR record 640 from the query result produced by logic block 829—one that has not been previously selected. In logic block 833, the task correlator tests whether all of the ETCORR records in the query result have already processed. If so, the task correlator terminates in logic block 827 because all appropriate courses of action have been forwarded toward the task initiator. If the task correlator 350 finds an unprocessed ETCORR record 640 in the query results, it determines whether the task should be deferred or executed immediately, by looking for a non-blank value in the scheduled-time expression template field 645 of the instant ETCORR record 640. Logic block 835 tests whether an execution-time expression is found. Scheduled-time expressions represent a future time, so if a scheduled-time expression is not found, the task is, by definition, immediately executable and control passes to logic block 839. In this case, the task correlator will insert a record 740 into a task-type occurrence tables. The task correlator retrieves the task-type definition record 620 identified by the task-type identifier in the instant ETCORR record from the query result. The task correlator then fixes values for the task-type identifier 741, notice identifier 743, executable response 745 fields for a task occurrence record 740 using values from the corresponding fields of the task-type definition record 620. The task correlator may perform specialization of the executable response field 745 in the manner the expression correlator performs specialization for the event occurrence's expression field. The value of the time stamp field 747 is fixed with the time-of-day value customarily available from the computer system. The task correlator then inserts a new task occurrence record 740 into the table named after the task-type, using the services of the RDBMS. Inserting the record 740 logs the PMKBS processing activity and incites the execution of the task initiator code. Control then passes back to logic block 831 to process any other tasks associated with the event-type. If a scheduled-time expression is found, the task is, by definition, a deferred task and control passes to logic block 841. In this case, the task evaluator 350 will insert a record 750 in the delayed task queue table where it will be held until its scheduled time. The task correlator retrieves the task-type definition record 620 identified by the task-type identifier in the instant ETCORR record 640 from the query result. The task correlator then fixes values for the task-type identifier 753, notice identifier 755, and executable response 757 fields for a delayed task queue record 750 using values from the corresponding fields of the task-type definition record 620. The task correlator 350 may perform specialization of the executable response field 757. The task correlator evaluates the scheduled-time expression from the instant ETCORR record 640 in the query result from logic block 831, to produce a date-time value for the earliest execution time for the task. The task correlator then fixes the value for the scheduled-time field 751 using the date-time value for the earliest execution time as just determined. The task correlator then inserts a new record 750 into the DTQ table using the services of the RDBMS. Control then passes back to logic block 831 to process any other tasks associated with the event-type. Processing proceeds from the task correlator code to the task initiator code by means of the RDBMS trigger mechanism. FIG. 8C depicts a flowchart of the task initiator code. The task initiator starts the execution of courses of action identified by task correlation processing. The task initiator 335 begins processing when a new record 740 is inserted into a task occurrence table. The entry point of logic block 853 is defined as the target program for the trigger corresponding to the insert-new-row event of each task occurrence table. Starting at the beginning of the field, logic block 853 retrieves the next statement from the executable response field 745 of the newly inserted task occurrence record 740. Logic block 855 then tests whether a statement is found. If not, the task initiator terminates its processing in logic block 859 because each of the statements included in the task definition has been submitted for execution. If a statement is found, logic block 857 submits the statement to an execution engine 360 for execution. In the presently described embodiment, two execution engines are used. The RDBMS serves as the execution engine for "SQL:" statements in the executable response field. The operating system, accessed directly or indirectly, serves as the execution engine for "PRG:" statements in the executable response field. FIG. 8D depicts a flowchart of the queue monitor code. The queue monitor process initiates execution of deferred tasks at their scheduled times. The queue monitor in this embodiment is a subcomponent of the task initiator 355 functional block. More specifically, it extends the main task initiator code to provide for the execution of tasks on a deferred basis. The basic function of the queue monitor is to remain aware of outstanding deferred tasks represented as records in the deferred task queue table, and to instigate their execution at the scheduled time. The queue monitor initialization code in logic block 875 is principally invoked whenever a new entry is placed into the DTQ table as represented by logic block 871. This may be achieved using the insert-new-row trigger of the DTQ table. The queue monitor initialization code may also be invoked in an alternative embodiment having program code that is executed to start or restart operation of the PMKBS as represented by logic block 873. To initialize the queue monitor, logic block 875 queries the DTQ table 575 to find the record 750 representing the unexecuted task containing the lowest, i.e., earliest, date-time value in the scheduled-time field 751. Logic block 877 then sets a timer to that lowest date-time value. The operating system or a subsystem may provide the timer function. In logic block 879, the queue monitor waits for the timer to expire. When the timer expires, the queue monitor queries the DTQ table 575 for all records having a scheduled-time value less than or equal to the current time. This happens in logic block 881. Then, in logic block 883, the queue monitor selects a DTQ record from the query results—one that has not been previously selected. Logic block 885 tests whether such a record is found. If not, control passes back to logic block 875 to reset the timer for the next scheduled task time. If a record is found and selected, control passes to logic block 887 where the task-type identifier 753, notice identifier 755, and executable response field 757 values are retrieved from the instant DTQ record and then fixed as the values for the corresponding fields in a task occurrence record 740. The value of the time-stamp field 757 is fixed with the time-of-day value that is customarily available from the computer system. In logic block 889, the queue monitor then inserts a new task occurrence record 740 into the table named after the task-type, using the services of the RDBMS. Inserting the record 740 into the task occurrence table indirectly invokes the main task initiator code to ultimately submit the task for execution. After inserting the new record 740, control passes back to logic block 883 to process any other DTQ records ready for execution. PMKBS Operational Example The following operational example is intended to facilitate an understanding of the invention as employed in the present embodiment. The figures accompanying the example show only those elements most useful for describing the example. The chosen example is based on a hypothetical inventory control system as may be employed by a business concern. The example describes the first response of the PMKBS to the removal of parts from the inventory. In the processing logic for the hypothetical business, changes to the inventory of a part cause an automated purchase requisition to be generated when the inventory drops below a threshold level. FIGS. 9A-9B depicts the software and data components on a memory medium 540 for illustrating the operation of the PMKBS in one embodiment. FIGS. 9A-9B depict memory medium 540 containing operating system 910, RDBMS 912, PMKBS 914, inventory transaction 916, SENDMSG 918, and PARTFCST 920 program code; RDBMS catalog 542, PMKB catalog 546, PMKB data 548, and general data 903 logical spaces; and relational tables named TABLES 550, ET 555, TT 565, ETCORR 560, DTQ 575, NOTICE 580, E10 570, E20 935, T11 937, T12 941, T21 945, INV 947, and REQN 951. The memory medium 540 provides persistent storage for copies of the program and data it contains. The programs and data are copied, in whole or in part, from the memory medium to memory, where they may be directly utilized by the CPU. Operating system program code 910 is loaded into memory and executed by the CPU, and other program code and data is loaded to and from memory and utilized, by means well known and well understood in the art. One skilled in the art also recognizes that the memory medium 540 may comprise one or more possibly disparate devices. The operating system (OS) program code 910 is appropriate to the underlying hardware and may be one of many commercially available operating systems; e.g., UNIX, Microsoft Windows NT, VMS, or MVS. A variety of hardware platforms and operating systems may be utilized in a networked environment. The RDBMS program code 912 is compatible with the underlying hardware and operating system. The RDBMS program code may be one of many commercially available RDBMS software products; e.g., ORACLE, SQL-Server, DB2, or Microsoft Access. The PMKBS program code 914 comprises event discriminator, expression correlator, evaluator, task correlator, and task initiator portions as described earlier. This program code may be created and maintained using one or more computer languages; e.g., C, C++, BASIC, VISUAL BASIC, COBOL, or Assembler. The inventory transaction 916, SENDMSG 918, and PARTFCST 920 programs are application or utility programs existing apart from the PMKBS, are exemplary only, and form no part of the present invention. The programs play a role in an example subject process used here to illustrate the operation of one PMKBS embodiment. In the presently preferred embodiment, the RDBMS catalog space 542 contains the TABLES table 550 as discussed earlier in reference to FIGS. 5A-5B. The PMKB catalog space 546 contains the ET 555, TT 565, and ETCORR 560 tables that have been populated as discussed earlier in reference to FIGS. 5A-5B, having record formats discussed earlier in reference to FIGS. 6A to 6C. The PMKB data space 548 contains NOTICE 580, DTQ 575, event occurrence (E10 and E20) 570, 935, and task occurrence (T11, T12, and T21) 937, 941, 945 tables, created as discussed earlier in reference to FIGS. 5A-5B, having record formats discussed earlier in reference to FIGS. 7A to 7D. The general data space 903 contains INV 947 and REQN 951 tables existing apart from the PMKBS, are exemplary only, and form no part of the invention. The tables play a role in an example subject process used here to illustrate one PMKBS embodiment. Note that the RDBMS catalog 542, PMKB catalog 546, PMKB data 548, and general data 903 spaces represent logical groupings to facilitate a conceptual understanding of the present embodiment of the invention. One skilled in the art recognizes that the logical groupings may or may not be reflected by equivalent groupings using grouping mechanisms provided by, e.g., the operating system, network, or RDBMS. The following discussion of FIGS. 10A to 13B describes sample contents of tables depicted in FIGS. 9A-9B. After the discussion of the contents of the tables, a processing example making use of those contents is described. The two discussions considered together illuminate one practice of the invention and its advantageous use in representing and executing processing logic using a computer. FIGS. 10A to 10C depict abbreviated sample contents of PMKBS catalog tables for purposes of illustration. The tables are process-independent because their structures exist as part of the PMKBS without regard to any subject process defined to the PMKBS (although their contents may reflect subject process matter). Fields and records unnecessary to the illustration have been omitted, in order not to obscure an understanding of the invention. A processing example making use of the sample contents follows the discussion related to FIG. 13B. FIG. 10A depicts sample records in the ET table 555. A record here reflects the occurrence of some event relevant to a subject process. The first and second records 556, 921 shown have event-type identifier values of E10 and E20, respectively. The first and second records 556, 921 have expression template values complying with the following syntax. The expression template is an expression. An expression is made up of a first argument, followed by an arithmetic or comparison operator, followed by a second argument. Each argument may be a constant, a variable, or an expression. A variable may be a parameter variable, identified by a dollar sign ($) prefix, or a table-data-value variable, identified by enclosure in square brackets ([. . . ]). Table-data-value variables consist of a table name, followed by a period (.), followed by a primary key value, followed by a period (.), followed by a column name. A table name, primary key value, or column name field of a table-data-value variable, may itself be a variable. FIG. 10B depicts sample records in the TT table 565. The first, second, and third records 929, 931, 933 shown have task-type identifier values of T11, T12, and T21, respectively. Each record also has an executable response value that is a list of executable response statements complying with the syntax discussed earlier in reference to Table 1; each statement in the list after the first, separated from the previous statement by a semi-colon. FIG. 10C depicts sample records in the ETCORR table 560. The first, second, and third records 923, 925, 927 shown have event-type identifier values of E10, E10, and E20, respectively; and task-type identifier values of T11, T12, and T21, respectively. The second record 925 shown has a value in the execution time expression template field compliant with the following syntax. The execution time expression template is a date-time expression. A date-time expression consists of a date constant or variable, followed by a colon, followed by a time constant or variable. FIGS. 11A to 11B depict abbreviated sample contents of PMKBS process-independent operational data tables useful for purposes of illustration. The tables are process-independent because their structures exist as part of the PMKBS without regard to any subject process defined to the PMKBS (although their contents may reflect subject process matter). The records shown reflect a snapshot of the database at the completion of the processing example. (Records may exist at the onset of the described processing, or be inserted as a result of the processing.) Fields and records unnecessary to the illustration have been omitted, in order not to obscure an understanding of the invention. A processing example making use of the sample contents follows the discussion related to FIG. 13B. FIG. 11A depicts sample records in the NOTICE table 580. A record here reflects the occurrence of some event relevant to a subject process. The first and second records 953, 955 shown have notice identifier values of N001001 and N001002, respectively. In the presently described embodiment, notice identifiers consist of a sequential number prefixed with the letter "N" and uniquely identify each record from among the others in the table. The first and second records 953, 955 shown have event-type identifier values of E10 and E20, respectively. The first and second records shown both have parameter data field values compliant with the syntax previously discussed in reference to Table 2 used to store contextualizing data used during the specialization process. FIG. 11B depicts a sample record in the DTQ table 575. A record here represents that a task was scheduled for execution on a delayed basis. The record 957 shown has a value in the scheduled-time field that is a numeric value representing the number of seconds elapsed from a system-defined base date and time. For example, if the system-defined base date and time is Jan. 1, 2000 at 12:00:00 A.M., then the time value for Jan. 1, 2000 at 12:01:00 A.M. is 60. The record 957 shown also has a value in the task-type identifier field of T12, and a value in the notice identifier field of N001001. FIGS. 12A to 12D depict abbreviated sample contents of PMKBS process-dependent data tables useful for purposes of illustration. The tables are process-dependent because their structures and contents exist as part of the process of defining the processing logic for a subject process to the PMKBS. The records shown reflect a snapshot of the database at the completion of the processing example. (Records may exist at the onset of the described processing, or be inserted or updated as a result of the processing.) Fields and records unnecessary to the illustration have been omitted, in order not to obscure an understanding of the invention. A processing example making use of the sample contents follows the discussion related to FIG. 13B. FIG. 12A depicts sample records in an E10 table 570. A record here indicates an occurrence of an E10-type event during the operation of the subject process. One record 959 is shown having values in the event-type identifier, notice identifier, expression, and expression value fields of E10, N001001, 9<10, and TRUE, respectively. FIG. 12B depicts sample records in a T11 table 937. A record here indicates that events and conditions occurring in the subject process indicated a need to perform a task of the T11 type. One record 939 is shown having values in the task-type identifier and notice identifier fields of T11 and N001001, respectively. The record 939 also has a value in the executable response field which is a list of three executable response statements. FIG. 12C depicts sample records in a T12 table 941. A record here indicates that events and conditions occurring in the subject process indicated a need to perform a task of the T12 type. One record 943 is shown having values in the task-type identifier and notice identifier fields of T12 and N001001, respectively. The record 943 also has a value in the executable response field that is a list containing a single executable response statement. FIG. 12D depicts sample records in a T21 table 945. A record here indicates that events and conditions occurring in the subject process indicated a need to perform a task of the T21-type. An empty record 959 is shown. FIGS. 13A to 13B depict sample contents of hypothetical data tables as may be employed in an inventory management application of a manufacturing business. The hypothetical data tables and the hypothetical inventory management application are exemplary only and form no part of the present invention. The records shown reflect a snapshot of the tables at the completion of the processing example. (Records may exist at the onset of the described processing, or be inserted as a result of the processing.) A processing example making use of the sample contents follows the discussion related to FIG. 13B. FIG. 13A depicts sample records in a hypothetical Inventory (INV) table 947 that forms no part of the present invention. The INV table 947 in this example contains information about an inventory of parts maintained in a stockroom. An INV record contains a part number field as its primary key; a buyer code field containing an identifier for the purchasing agent responsible for buying the part; a quantity-on-hand field for recording the quantity-on-hand of the part; a minimum-quantity field for recording the minimum number of the part to maintain in inventory; and a purchase-quantity field for recording the quantity of the part to be purchased when a new order is placed. One record 949 is shown having values in the part number, buyer code, quantity-on-hand, minimum-quantity, and purchase-quantity fields of Y123, ABC, 9, 10, and 36, respectively. FIG. 13B depicts sample records in a hypothetical Purchase Requisition (REQN) table 951 that forms no part of the present invention. The REQN table in this example contains information about new purchase orders that need to be placed. A REQN record contains a part number field as its primary key; a quantity field indicating the quantity to order; and a requestor field for recording the identity of the entity responsible for requisitioning the parts. One record 953 is shown having values in the part number, quantity, and requestor fields of Y123, 36, and PMKBS, respectively. An example of PMKBS operation will now be described in reference to FIGS. 9A-9B, and the more detailed descriptions of the table contents of FIGS. 9A-9B as depicted in FIGS. 10A to 13B. The example starts with a stockroom clerk removing some quantity of an item having a part number of Y123, from the stockroom inventory. As part of his/her duties, the stockroom clerk records the removal of the parts from inventory by accessing his/her company's inventory transaction program 916 via a computer terminal located in the stockroom. According to the processing logic used by the hypothetical company every change to the quantity of a part in the inventory should be checked to see if the part needs to be reordered; and, if so, then order the part, forecast its usage rate and inventory level, and check to see if there is a critical shortage. The inventory transaction program 916 used by the stockroom clerk updates the value in the quantity-on-hand field of the inventory record 949 for part number Y123, from its previous value to 9, the new quantity on hand 1314. Then the application program 916 notifies the PMKBS of the change in inventory by inserting a notice record instance 953 into the NOTICE table 580. Alternatively, program code associated with the trigger for an update on the quantity-on-hand field could insert the notice record 953. A unique notice identifier is generated by the program code 916 inserting the notice record 953, and recorded in the notice identifier field 1110 of the record 953. The event-type identifier associated with a change in quantity-on-hand event, E10, is recorded in the record 953. The part number associated with the particular instance of this event-type is recorded in the parameter data field 1114 in the record 953, using the keyword of PNPARM (for part number parameter). Insertion of the NOTICE record 953 incites execution of PKMBS program code as depicted in FIG. 8A by logic block 801. The PMKBS is alerted to the change in the quantity of a part in the inventory. Referring to FIGS. 8A and 9, in logic block 803, the event discriminator 335 extracts the E10 value from the event-type identifier field 1112 of the input signal, i.e., the newly inserted NOTICE record 953. In logic block 805, the expression correlator 340 retrieves the expression template, [INV.$PNPARM.QUANTITY-ON-HAND]<[INV. $PNPARM.MINIMUM-QUANTITY], from the E10 record 956 in the ET table 555. This expression will test for the condition that the part needs to be reordered. In logic block 807, the expression correlator retrieves and parses the parameter data, PNPARM=XY123, from the newly inserted NOTICE record 953 to identify and isolate the keyword and its associated value. In logic block 809, the expression correlator specializes the expression template. First, substitutions are made for parameter variables in the model expression, resulting in [INV.XY123.QUANTITY-ON-HAND]<[INV.XY123.MINIMUM-QUANTITY]. Next, substitutions are made for table-data-value variables. [INV.XY123.QUANTITY-ON-HAND] is replaced with 9, the value from the QUANTITY-ON-HAND field 1314 of the Y123 record 949 of the INV table 947. [INV.XY123.MINIMUM-QUANTITY] is replaced with 10, the value from the MINIMUM-QUANTITY field 1316 of the Y123 record 949 of the INV table 947. The resulting specialized expression is 9<10. In logic block 811, the expression correlator formats and inserts new record 959 into the E10 table. Values for the event-type identifier, notice identifier, and expression fields are fixed at E10, N001001, and 9<10, respectively. At this point in time, the expression value field 1216 is empty. Insertion of the new record 959 into the E10 table 570 incites execution of PKMBS program code as depicted in FIG. 8B by logic block 821. In logic block 823, the evaluator 345 evaluates the expression 9<10 according to the syntax and rules of predicate logic, producing a resulting value of TRUE, indicating that the part needs to be reordered. The evaluator updates the expression value field 1216 in the E10 record xx to reflect the TRUE result. In logic block 825, the task correlator 350 tests the result 1216 to determine if it is TRUE. Because it is true, logic block 829 queries the ETCORR table 560 finding two records 923, 925 with an event-type identifier of E10. In logic block 831, the task correlator tries to select an unprocessed record from the two discovered in the last step 829. Record 923 is selected and logic block 833 is satisfied. The PMKBS has determined that task-type T11 is a course of action that should be taken. Logic block 835 retrieves any value in the execution-time expression template field 1044 in the selected record 923. None is found, meaning that the task is to be executed immediately, so processing proceeds to logic block 839. The task correlator formats and inserts new record 939 into the T11 table 937. The values for the task-type identifier 1220 and notice identifier fields 1222 of the new record 939 are set to T11 and N001001, respectively. The task correlator retrieves the value from the executable response field 1022 of the T11 record 929 of the TT table 565, specializes it, and fixes the specialized version as the value for the executable response field 1224 of the new record 939 in the T11 table 937. After the record 939 is inserted, the task correlator loops back to logic block 831. The task correlator 350 tries to select an unprocessed record from the two discovered when logic block 829 last processed; Record 925 is selected and logic block 853 is satisfied. The PMKBS has determined that task-type T12 is a course of action that should be taken. Logic block 835 then retrieves any value in the execution-time expression template field 1052 in the selected record 925. The value $$TODAY:22:00:00 is retrieved, indicating deferred execution of the task, e.g., at 10:00 P.M. this evening, so processing proceeds to logic block 841. The task correlator 350 formats and inserts new record 957 into the DTQ table 575. The date-time expression $$TODAY:22:00:00 is evaluated to an absolute system date-time value. The absolute date-time value is fixed as the value for the scheduled-time field 1130 of the new record 957. Values for the task-type identifier 1132 and notice identifier 1134 fields are set to T12 and N001001, respectively. The task correlator retrieves the value from the executable response field 1026 of the T12 record 931 of the TT table 565, specializes it, and fixes the specialized version as the value for the executable response field 1136 of the new record 957 in the DTQ table 575. After the record 957 is inserted, the task correlator loops back to logic block 831. The task correlator 350 tries to select an unprocessed record from the two discovered when logic block 829 last processed. At this point, no unprocessed records remain so the task correlator terminates its processing related to the instant input signal in logic block 827. Earlier insertion of a new record 939 into the T11 table by the task correlator, incited execution of PKMBS program code as depicted in FIG. 8C. In logic block 853, when incited, the task initiator 355 extracts the specialized SQL:insert requisition record statement 1226 from the list in the executable response field 1224 of the newly inserted record 939. Logic block 855 is satisfied so logic block 857 performs any necessary formatting of the statement, i.e., to make it conform with RDBMS interface specifications, and uses the RDBMS's interface to submit the statement for execution. This action causes the placement of a new order for the part. As a result of ensuing RDBMS action, a new record 953 is inserted into the REQN table 951. In the present embodiment, execution of the statement submitted 1226 to the RDBMS and the processing of the task initiator 355 are asynchronous. Asynchronous operation of different program processes in a computer system is well known in the art. Having a design that permits asynchronous operation facilitates the exploitation of multiple processor CPU configurations including parallel processors. So, at the point in time the request was made in logic block 857 to the RDBMS to execute the statement, the task initiator 355 looped back to logic block 853 without waiting for completion of execution of the statement by the RDBMS. In logic block 853, the task initiator extracts the specialized SQL:insert E20 notice record statement 1228 from the list in the executable response field 1224 of the newly inserted record 939. Logic block 855 is satisfied so logic block 857 performs any necessary formatting of the statement 1228, and uses the RDBMS's interface to submit the statement for execution. This action leads to an evaluation of whether a critical shortage condition exists. As a result of ensuing RDBMS action, a new record 955 is inserted into the NOTICE table 580. As before, the task initiator loops back to logic block 853 without waiting for completion of execution of the statement 1228 by the RDBMS. In logic block 853, the task initiator attempts to extract another statement from the list in the executable response field 1224 of the newly inserted record 939. None is found, logic block 855 is not satisfied, so the task initiator 355 terminates its immediate processing in logic block 859. Earlier insertion of a new record 957 into the DTQ table 575 by the task correlator 350 incited execution of PKMBS program code as depicted in FIG. 8D. In logic block 875, when incited, the queue monitor extension to the main task initiator queried the DTQ table 575 to locate the record with the lowest, i.e., earliest, value in the scheduled-time field. Assuming, for the sake of example, that the query produced record 957, logic block 877 extracts the 511200 value from the scheduled-time field 1130 of the record 957. The queue monitor converts the value if necessary to a format compatible with a timer function, and sets an operating system or subsystem timer function to expire at the designated time of, e.g., 10:00 P.M. this evening. The queue monitor then waits in logic block 879 for the timer to expire, actively or passively, using methods well known in the art. At 10:00 P.M. in the evening when the timer does expire, processing continues in logic block 881. The queue monitor queries the DTQ table 575 or all unprocessed records having a value in the scheduled-time field that is less than or equal to the value of the current date and time. This query returns record 957, logic block 885 is satisfied, and processing continues in logic block 887. The queue monitor retrieves T12, N001001, and PRG:execute forecasting program values from the task-type identifier 1132, notice identifier 1134, and executable response 1136 fields of the DTQ record 957, respectively. These values are fixed as the values for the corresponding fields in a T12 table record, and a new T12 record 943 is inserted. Queue monitor processing then loops back to logic block 883. The earlier query in logic block 881 produced no other DTQ entries ready for execution, logic block 885 is not satisfied, so queue monitor processing loops back to logic block 875 where the queue monitor restarts its main processing loop. Insertion of a new record 943 into the T12 table by the queue monitor, incites execution of PKMBS program code as depicted in FIG. 8C. In logic block 853, when incited, the task initiator extracts the specialized PRG:execute forecasting program statement 1243 from the list in the executable response field 1244 of the newly inserted record 943. Logic block 855 is satisfied so logic block 857 performs any necessary formatting of the statement, and uses an operating system or subsystem provided interface to submit the statement for execution to an execution engine like the operating system shell. This action causes a forecasting of the part's usage rate and inventory level per the design of the hypothetical application program. Like RDBMS executions, program executions are asynchronous in the present embodiment. As an example, the hypothetical program, PARTFCST 920, may perform an analysis of historic and projected usage rate and inventory level of part Y123. In the process, the program may incite the insertion of new records into the NOTICE table 580, to avail the process of which it is a part of the management and monitoring functions of the PMKBS. In logic block 853, the task initiator attempts to extract another statement from the list in the executable response field 1244 of the newly inserted record 943. None is found, logic block 855 is not satisfied so the task initiator terminates its immediate processing in logic block 859. At some point in time, The RDMBS completes execution of the specialized SQL:insert E20 notice record statement, submitted to it by the task initiator when processing record 939 in the T11 table 1220, as a result of processing for the N0010001/E10 NOTICE table record 953. Execution of the specialized statement by the RDBMS creates record N001002 955 in the NOTICE table 580. The new NOTICE table record 955 is processed through the PMKBS in the same fashion as just described for the earlier, seminal NOTICE record 953. The insertion of the NOTICE 955 record leads to execution of the event discriminator, expression correlator, and the evaluator. The evaluator output may then lead to execution of the task correlator and task initiator. As the N001002 NOTICE record 955 was inserted by a task execution resulting from the N001001 NOTICE record 953, it can be seen that interdependencies may be incorporated into the PMKBS processing logic definitional structure, as would be required in applications of all but the simplest processes. Various modifications to the preferred embodiment can be made without departing from the spirit and scope of the invention. For example, storage of data items in memory and memory media may generally be accomplished using various data structuring techniques well known in the art, e.g., arrays, lists, trees. Moreover, the value stored in a field representing a particular item of data may be a reference leading to the actual storage location of the particular item of data, rather than the desired item of data, itself. Such indirect addressing is well known in the art. Moreover, a references to, or address of, a data item is generally not limited to a value representing its physical location in a hardware memory, but may be any value that may be used, directly or indirectly, to locate the data item, e.g., ordinal position in a set, row and column coordinates in a table, offset from a base address. One skilled in the art recognizes these and other alternative may be employed without departing from the spirit and scope of the invention. Other alternatives are readily apparent to one skilled in the art. For example, abstraction layers could be inserted at various places in the described embodiment. For example, in the described embodiment, a task-type leads directly to a set of command statements. As an alternative, a task-type could lead to a set of subtask-types, and each subtask-type in the set could, in turn, lead to a set of command statements. Such modifications are apparent to one skilled in the art and do not depart from the spirit and scope of the invention. Thus, the foregoing description is not intended to limit the invention that is described in the appended claims in which:
|
Same subclass Same class Consider this |
|||||||||||||||||||
