Abstract:
A method of analyzing simulation results of a model, the method comprising: obtaining a process model including model elements including tasks, non-reusable sub-processes, and called reusable sub-processes; assigning a unique identifier to each model-element; generating unique model-element-proxies for all model-elements except for model elements corresponding to a model-reusable-sub-process or a model element contained by a model-reusable-sub-process; generating unique model-element-proxies for model-reusable-sub-processes and model-elements contained by model-reusable-sub-processes; associating each generated model-element-proxy with a corresponding model-element; executing simulation of the process model and persisting for each element instance data produced during simulation, the instance data including an element instance identifier and a corresponding model-element-proxy identifier; querying persisted simulation data for information using model-element-proxy identifiers.

Description:
TRADEMARKS 
       [0001]    IBM® is a registered trademark of International Business Machines Corporation, Armonk, N.Y., U.S.A. Other names used herein may be registered trademarks, trademarks or product names of International Business Machines Corporation or other companies. 
       BACKGROUND OF THE INVENTION 
       [0002]    1. Field of the Invention 
         [0003]    This invention relates to computer simulation, and particularly to using model-element-proxies to facilitate efficient analysis of simulation results. 
         [0004]    2. Description of Background 
         [0005]    Computer simulation of processes is widespread. Existing products, such as the WebSphere Business Modeler from IBM, allow users to simulate business processes. In the WebSphere Business Modeler, business process is modeled as a collection of tasks, non-reusable sub-processes, and calls to reusable processes with a defined execution sequence specified by connections and control structures. Each of non-reusable sub-processes may, in turn, contain tasks, other non-reusable sub-processes, and calls to reusable processes. A reusable process can be called from multiple places in the main process, any of the main process&#39; non-reusable sub-processes and any of the main process&#39; called reusable processes. 
         [0006]    To further describe process modeling done in WebSphere Business Modeler and similar products, reference is made to  FIG. 1  where an exemplary model is depicted. The model includes a process P 1  that includes a call to reusable sub-process P 0  (later referred to as call-to-P 0   i ). Tasks T 1 , T 2  are implemented in process P 1 . Process P 1  also includes sub-process P 2 , which includes another call to reusable sub-process P 0  (later referred to as call-to-P 0   j ). Tasks T 3  and T 4  are implemented in sub-process P 2 . Reusable sub-process P 0  includes tasks Tx 1 , Tx 2  and Tx 3 . Arrows connecting tasks/processes indicate flow of execution. 
         [0007]    During simulation, when a given task/process is reached the instance of this task/process is created and then executed. To avoid ambiguity, elements defined in a business process (such as P 1 , P 0 , T 3 , T 4 , etc.) will be referred to as model-elements (model-tasks, model-processes), while elements created during simulation run will be referred to as element instances (task instances, process instances). Each task and process instance is uniquely identified by its own identifier, and contains a reference (such as model-element identifier) to its model-element. 
         [0008]    When model-process P 1  is simulated, two process instances of model-sub-process P 0  are created (one created through call from P 1  instance and one by a call from P 2  instance), and corresponding task instances of model-tasks Tx 1 , Tx 2 , Tx 3  are created in both P 0  instances. Let&#39;s consider the example aggregated and percolated cost analysis report in Table 1 below. In this analysis each sub-process&#39; cost is an aggregation of costs of all tasks and sub-processes it ultimately contains. In other words, cost is added across a sub-process level and then percolated up the containment hierarchy. It is important to notice there are two rows referring to P 0  model-sub-process (as P 0   i,  and P 0   j ), each with an aggregated cost value corresponding to P 0  model-sub-process instance owned by a different super-process (which later is referred as P 0  in two different contexts). Accurately accounting for the costs of P 0  process instances and the associated tasks instances is difficult. The difficulty arises in identifying whether P 0  instance was created through a call from P 1  instance or from P 2  instance. (And similarly, in identifying whether Tx 1 , Tx 2 , Tx 3  instances were instantiated in P 0  process instance resulting from a call issued from P 1  or P 2  instance.) If aggregated and percolated cost analysis is performed on a single process instance, an algorithm simply traversing a containment tree should give acceptable performance. However, if analogous analysis is to be done for costs aggregated across multiple P 1  instances, the traversing algorithm is going to perform very poorly. (Importantly, if RDBMS was to be used to persist simulation results, there is no simple, non-recursive SQL query that could produce the above analysis if for each task/process instance all that is given is its costs, its containment data, and information on its corresponding model-task/process.) 
         [0000]    
       
         
               
               
             
           
               
                 TABLE 1 
               
               
                   
               
               
                   
                 AGGREGATED 
               
               
                 PROCESS/ 
                 COST WITH REUSABLE PROCESSES 
               
               
                 TASK_NAME 
                 CALCULATED IN CALLING CONTEXT 
               
               
                   
               
             
             
               
                 P1 
                 c_sum(T1) + c_sum(T2) + c_sum(P0i) + c_sum(P2) + 
               
               
                   
                 c_sum(join) 
               
               
                  T1 
                 c_sum(T1) 
               
               
                  P0i 
                 c_sum(Tx1i) + c_sum(Tx2i) + c_sum(Tx3i) 
               
               
                  Tx1i 
                 c_sum(Tx1i) 
               
               
                  Tx2i 
                 c_sum(Tx2i) 
               
               
                  Tx3i 
                 c_sum(Tx3i) 
               
               
                  P2 
                 c_sum(T3) + c_sum(P0j) + c_sum(T4) 
               
               
                  T3 
                 c_sum(T3) 
               
               
                  P0j 
                 c_sum(Tx1j) + c_sum(Tx2j) + c_sum(Tx3j) 
               
               
                   Tx1j 
                 c_sum(Tx1j) 
               
               
                   Tx2j 
                 c_sum(Tx2j) 
               
               
                   Tx3j 
                 c_sum(Tx3j) 
               
               
                  T4 
                 c_sum(T4) 
               
               
                  join 
                 c_sum(join) 
               
               
                   
               
               
                 [c_sum(X) = sum of all costs incurred on model-element × instances] 
               
             
          
         
       
     
         [0009]    Similarly, execution path identification algorithm that uses only containment and model-element information associated with task/process instances must traverse run-time instance containment tree for each instance of reusable process (or any of its tasks) and thus cannot be very efficient. 
         [0010]    Thus, there is a need in the art for a technique to efficiently identify context of task/process instance creation. Among others, this technique must allow for calculation of costs incurred within a reusable process instantiated in any context without the need to traverse main process instance containment tree. 
       SUMMARY OF THE INVENTION 
       [0011]    The shortcomings of the prior art are overcome and additional advantages are provided through the provision of a method of analyzing simulation results of a model, the method comprising: obtaining a process model including model elements including tasks, non-reusable sub-processes, and called reusable sub-processes; assigning a unique identifier to each model-element; generating unique model-element-proxies for all model-elements except for model elements corresponding to a model-reusable-sub-process or a model element contained by a model-reusable-sub-process; generating unique model-element-proxies for model-reusable-sub-processes and model-elements contained by model-reusable-sub-processes; associating each generated model-element-proxy with a corresponding model-element; executing simulation of the process model and persisting for each element instance data produced during simulation, the instance data including an element instance identifier and a corresponding model-element-proxy identifier; querying persisted simulation data for information using model-element-proxy identifiers. 
         [0012]    System and computer program products corresponding to the above-summarized methods are also described and claimed herein. 
         [0013]    Additional features and advantages are realized through the techniques of the present invention. Other embodiments and aspects of the invention are described in detail herein and are considered a part of the claimed invention. For a better understanding of the invention with advantages and features, refer to the description and to the drawings. 
       TECHNICAL EFFECTS 
       [0014]    As a result of the summarized invention, technically we have achieved a solution which eliminates the need to traverse process instance containment tree for analyses that require information on task/process instance creation context. This solution provides means to efficiently calculate various costs and revenues incurred for instances of reusable processes instantiated in various calling contexts and to efficiently identify execution path taken in an overall process instance. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0015]    The subject matter which is regarded as the invention is particularly pointed out and distinctly claimed in the claims at the conclusion of the specification. The foregoing and other objects, features, and advantages of the invention are apparent from the following detailed description taken in conjunction with the accompanying drawings in which: 
           [0016]      FIG. 1  illustrates one example of process to be simulated; and 
           [0017]      FIG. 2  illustrates one example of how element instances relate to model-element-proxies and how model-element-proxies, in turn, relate to model-elements. 
       
    
    
       [0018]    The detailed description explains the preferred embodiments of the invention, together with advantages and features, by way of example with reference to the drawings. 
       DETAILED DESCRIPTION OF THE INVENTION 
       [0019]    Embodiments of the invention relate to simulation of processes and analysis of simulation results. The simulation is typically executed on a general-purpose computer executing a computer program in response to code stored on a computer program product. The code includes instructions enabling the computer to perform the functions described herein. 
         [0020]    The following illustrates some advantages of using model-element-proxies in the implementation where RDBMS is employed as a simulation results persistence mechanism with SQL used as a query language. The given example deals with calculation of aggregated cost values which is just one of possible applications. Conceptually, the same advantages (i.e., elimination of recursion or some expensive pre-processing) are to be realized regardless of persistence mechanism or query method. 
         [0021]    The following example illustrates the example&#39;s model structure without using a diagram. The containment hierarchy of the model of  FIG. 1  may be represented as shown in Table 2, where indentation indicates containment of one task within another. 
         [0000]    
       
         
               
               
             
           
               
                   
                 TABLE 2 
               
               
                   
                   
               
             
             
               
                   
                 P1 
               
               
                   
                  T1 
               
               
                   
                  T2 
               
               
                   
                  call-to-P0i 
               
               
                   
                  P2 
               
               
                   
                   T3 
               
               
                   
                   call-to-P0j 
               
               
                   
                   T4 
               
               
                   
                  join 
               
               
                   
                 P0 
               
               
                   
                  Tx1 
               
               
                   
                  Tx2 
               
               
                   
                  Tx3 
               
               
                   
                   
               
             
          
         
       
     
         [0022]    All model-tasks and model-processes must have unique identifiers assigned. Let&#39;s notice that P 1  does not contain P 0  directly; rather, it contains calling mechanisms (call-to-P 0  under P 1 , and under P 2 ) that refer to P 0 . If information about process model&#39;s model-tasks and model-processes is to be stored in RDBMS, it may be put into the MODEL table containing the following attributes: SIMULATION_ID which identifies the simulation run, TASK_NAME which contains the model-task name and MODEL_TASK_ID which uniquely identifies model-tasks. For the process model outlined above, entries in MODEL table might be as shown in Table 3 below. 
         [0000]    
       
         
               
               
               
             
               
               
               
             
           
               
                 TABLE 3 
               
               
                   
               
               
                 SIMULATION_ID 
                 TASK_NAME 
                 MODEL_TASK_ID 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 1 
                 P1 
                 1 
               
               
                 1 
                 T1 
                 2 
               
               
                 1 
                 T2 
                 3 
               
               
                 1 
                 call-to-P0i 
                 4 
               
               
                 1 
                 P2 
                 5 
               
               
                 1 
                 T3 
                 6 
               
               
                 1 
                 call-to-P0j 
                 7 
               
               
                 1 
                 T4 
                 8 
               
               
                 1 
                 join 
                 9 
               
               
                 1 
                 P0 
                 10 
               
               
                 1 
                 Tx1 
                 11 
               
               
                 1 
                 Tx2 
                 12 
               
               
                 1 
                 Tx3 
                 13 
               
               
                   
               
             
          
         
       
     
         [0023]    For the argument&#39;s sake let&#39;s assume that, on task instance termination, the simulation emits an event that contains the SIMULATION_ID which identifies the simulation run, PROCESS_ID which identifies the top process instance to which terminated task instance belongs, TASK_ID which uniquely identifies the task instance (assigned at run-time), MODEL_TASK_ID which identifies model-task corresponding to the task instance, PARENT_ID which identifies the instance of the process that contains the task, COST which specifies cost occurred on the task instance. It is understood that embodiments are not dependent on any particular mechanism of reporting instance specific simulation data (e.g., costs) as long as such a mechanism exists. For the process model outlined earlier, entries in a TERMINATION table that is used to store task instance termination attributes, referring to instances of model-task Tx 1  are shown in Table 4 below. 
         [0000]    
       
         
               
               
               
               
               
               
             
               
               
               
               
               
               
             
           
               
                 TABLE 4 
               
               
                   
               
               
                 SIMULATION_ID 
                 PROCESS_ID 
                 TASK_ID 
                 MODEL_TASK_ID 
                 PARENT_ID 
                 COST 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 1 
                 1 
                 6 
                 11 
                 5 
                 $1000 
               
               
                 1 
                 1 
                 13 
                 11 
                 12 
                 $500 
               
               
                 1 
                 2 
                 23 
                 11 
                 22 
                 $1000 
               
               
                 1 
                 2 
                 30 
                 11 
                 29 
                 $500 
               
               
                 1 
                 3 
                 40 
                 11 
                 39 
                 $1000 
               
               
                 1 
                 3 
                 47 
                 11 
                 46 
                 $500 
               
               
                 1 
                 4 
                 57 
                 11 
                 56 
                 $1000 
               
               
                 1 
                 4 
                 64 
                 11 
                 63 
                 $500 
               
               
                 1 
                 5 
                 74 
                 11 
                 73 
                 $1000 
               
               
                 1 
                 5 
                 81 
                 11 
                 80 
                 $500 
               
               
                   
               
             
          
         
       
     
         [0024]    The table above illustrates data that may be recorded on termination event of model-task Tx 1  instances. If a database query is used to calculate aggregated cost of all Tx 1  model-task instances that belong to P 0  instances regardless of how P 0  instance was created, the query adds up the costs for entries in TERMINATION table where MODEL_TASK_ID=11. This is a routine database query. If there is a need to calculate aggregated cost of all instances of model-tasks Tx 1  that belong to an instance of P 0  model-process that was created by the call from an instance of P 1  process-model (in the context P 1 /call-to-P 0   i /P 0 /Tx 1 ), then for each event, its grand parent event (e.g., the event twice removed from the current event) must be checked for association with P 1 . For example, for each event referring to Tx 1  model-task (MODEL_TASK_ID=11), the event that refers to its parent must be checked (by definition this parent event must refer to P 0  model-process and thus its MODEL_TASK_ID=10) if its parent (and a grand parent of the initial event) in turn refers to call-to-P 0   i  (that has MODEL_TASK_ID=4 and is associated with P 1 ). Only then cost in the termination event referring to Tx 1  model-task may be included in the P 1 /call-to-P 0   i /P 0 /Tx 1  aggregated cost. In general, with events/tables defined as above, a simple SQL query that calculates aggregated cost value of a task instance contained in an instance of a reusable sub-process in the given context cannot be formulated. Either SQL query must use recursion or some expensive pre-processing must be done to determine the cost incurred in model-task Tx 1  instances that resulted from a call issued from a model-process P 1  instance. 
         [0025]    To alleviate the problem of traversal of process instance containment tree to acquire information on task/process instance creation context, unique model-element-proxies are generated for all model-tasks and all model-non-reusable-sub-processes that are not contained in model-reusable-sub-processes; furthermore unique model-element-proxies are also generated for each context in which reusable sub-processes are used. Thus if process model contains two calls to the same model-reusable-process, then there are two proxies corresponding to the model-reusable-process itself, and to each of the model-tasks, model-non-reusable-processes it contains. For example, for P 0  model-element there are two proxies created; one for P 0  called from P 1  (by call-to-P 0   i  and listed under TASK_NAME as P 0   i ) and the other for P 0  called from P 2  (by call-to-P 0   j  and listed under TASK_NAME as P 0   j ). Similarly, there are two proxies for each of Tx 1 , Tx 2 , Tx 3  tasks that belong to P 0 . 
         [0026]    For the example model outlined above, if model-element-proxies were to be stored in a PROXY table, entries in this table may be as shown in Table 5 below. MODEL_TASK_IDs are the same as those shown in Table 3. TASK_NAME column with indentation indicating containment was added to aid visualization. PROXY_TASK_IDs are defined as described in the preceding paragraph. 
         [0000]    
       
         
               
               
               
               
             
               
               
               
               
             
           
               
                 TABLE 5 
               
               
                   
               
               
                 TASK_NAME 
                 SIMULATION_ID 
                 PROXY_TASK_ID 
                 MODEL_TASK_ID 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 P1 
                 1 
                 1 
                 1 
               
               
                  T1 
                 1 
                 2 
                 2 
               
               
                  T2 
                 1 
                 3 
                 3 
               
               
                  call-to-P0i 
                 1 
                 4 
                 4 
               
               
                  P0i 
                 1 
                 5 
                 10 
               
               
                   Tx1i 
                 1 
                 6 
                 11 
               
               
                   Tx2i 
                 1 
                 7 
                 12 
               
               
                   Tx3i 
                 1 
                 8 
                 13 
               
               
                  P2 
                 1 
                 9 
                 5 
               
               
                  T3 
                 1 
                 10 
                 6 
               
               
                  call-to-P0i 
                 1 
                 11 
                 7 
               
               
                   P0j 
                 1 
                 12 
                 10 
               
               
                   Tx1j 
                 1 
                 13 
                 11 
               
               
                   Tx2j 
                 1 
                 14 
                 12 
               
               
                   Tx3j 
                 1 
                 15 
                 13 
               
               
                  T4 
                 1 
                 16 
                 8 
               
               
                  join 
                 1 
                 17 
                 9 
               
               
                   
               
             
          
         
       
     
         [0027]      FIG. 2  illustrates how element instances relate to model-element-proxies and how model-element-proxies, in turn, relate to model-elements. Tx 3  model-task, its model-element-proxies and its instances are depicted in  FIG. 2  for sake of illustration, but it is understood that all model-elements contained in the process model may be assigned model-element-proxies 
         [0028]    Entries in the revised TERMINATION table referring to instances of model-task Tx 1  from the process model outlined above, are shown below in Table 6. For the invention to work simulation engine must be aware of and able to report which proxy-meta-element corresponds to a given instance, which must be the case if the revised TERMINATION table is to be populated as show below. 
         [0000]    
       
         
               
               
               
               
               
               
             
               
               
               
               
               
               
             
           
               
                 TABLE 6 
               
               
                   
               
               
                 SIMULATION_ID 
                 PROCESS_ID 
                 TASK_ID 
                 PROXY_TASK_ID 
                 PARENT_ID 
                 COST 
               
               
                   
               
             
             
               
                   
               
             
          
           
               
                 1 
                 1 
                 6 
                 6 
                 5 
                 $1000 
               
               
                 1 
                 1 
                 13 
                 13 
                 12 
                 $500 
               
               
                 1 
                 2 
                 23 
                 6 
                 22 
                 $1000 
               
               
                 1 
                 2 
                 30 
                 13 
                 29 
                 $500 
               
               
                 1 
                 3 
                 40 
                 6 
                 39 
                 $1000 
               
               
                 1 
                 3 
                 47 
                 13 
                 46 
                 $500 
               
               
                 1 
                 4 
                 57 
                 6 
                 56 
                 $1000 
               
               
                 1 
                 4 
                 64 
                 13 
                 63 
                 $500 
               
               
                 1 
                 5 
                 74 
                 6 
                 73 
                 $1000 
               
               
                 1 
                 5 
                 81 
                 13 
                 80 
                 $500 
               
               
                   
               
             
          
         
       
     
         [0029]    If a database query (e.g., SQL) is used to calculate aggregated cost of all Tx 1  task instances that belong to P 0  instances regardless of the context in which P 0  was created, all that is needed is to add up all cost in a table resulting from a join of the PROXY table (Table 5) and the revised TERMINATION table (Table 6) on PROXY_TASK_ID and specify MODEL_TASK_ID=11 in the where clause. As the model task identifier is 11 for both model tasks Tx 1   i  and Tx 1   j,  this query provides the total cost for all calls to task Tx 1 . 
         [0030]    If a database query is needed to determine the aggregated cost of all Tx 1  task instances that belong to P 0  instances that were created through a call directly from P 1  (in the context P 1 /call-to-P 0   i /P 0 /Tx 1 ), then knowing that PROXY_TASK_ID=6 represents context P 1 /call-to-P 0   i /P 0 /Tx 1 , a query needs only to add up costs in all events containing PROXY_TASK_ID=6. There is no need for recursion in SQL or some other expensive processing. 
         [0031]    Thus, model-element-proxies generated for model-tasks and processes allow for very significant performance improvement and much simpler algorithm design for any aggregated analysis analogous to cost analysis described above. 
         [0032]    In alternate embodiments, input/output model-element-proxies may be used in developing more efficient and simpler set of algorithms dealing with identification of execution paths, critical/shortest path analyses, etc. 
         [0033]    The embodiments described above are independent of any particular method of persistence or analysis. For example, model-element-proxies can simplify processing and improve performance regardless whether XML-to-flat-file or RDBMS is used for persistence, and whether XPath or plain SQL or java with SQL, or other techniques, are used for implementation of analysis algorithms. 
         [0034]    The capabilities of the present invention can be implemented in software, firmware, hardware or some combination thereof. 
         [0035]    As one example, one or more aspects of the present invention can be included in an article of manufacture (e.g., one or more computer program products) having, for instance, computer usable media. The media has embodied therein, for instance, computer readable program code means for providing and facilitating the capabilities of the present invention. The article of manufacture can be included as a part of a computer system or sold separately. 
         [0036]    Additionally, at least one program storage device readable by a machine, tangibly embodying at least one program of instructions executable by the machine to perform the capabilities of the present invention can be provided. 
         [0037]    While the preferred embodiment to the invention has been described, it will be understood that those skilled in the art, both now and in the future, may make various improvements and enhancements which fall within the scope of the claims which follow. These claims should be construed to maintain the proper protection for the invention first described.