EDITING, CREATING, AND VERIFYING REORGANIZATION OF FLOWCHART, AND TRANSFORMING BETWEEN FLOWCHART AND TREE DIAGRAM

Information

  • Patent Application
  • 20080306979
  • Publication Number
    20080306979
  • Date Filed
    May 21, 2008
    16 years ago
  • Date Published
    December 11, 2008
    16 years ago
Abstract
Provides methods for transforming a flowchart to an equivalent tree diagram, methods for transforming an equivalent tree diagram to a flowchart, methods for verifying reorganization of a flowchart, methods for editing a flowchart, methods for creating a flowchart and a flowchart editor. A flowchart includes one or more logic structures and one or more processing activities in said one or more logic structures. The method for transforming a flowchart to an equivalent tree diagram comprises: traversing said flowchart; transforming said one or more logic structures in said flowchart to one or more branching nodes in said tree diagram; and transforming one or more processing activities in said logic structures of said flowchart to one or more leaf nodes below corresponding branching nodes in said tree diagram. Further, edition of a flowchart and verification of reorganization of a flowchart are performed by utilizing an equivalent tree diagram.
Description
TECHNICAL FIELD OF THE INVENTION

The present invention relates to computer data processing technology, specifically, to methods and apparatus for transforming between flowchart and equivalent tree diagram, creating and editing a flowchart; and to methods and apparatus for verifying the validity of flowchart reorganization.


BACKGROUND OF THE INVENTION

Flowcharts are widely used in fields of analyzing business flow, designing computer program, developing and managing data processing system, etc. As well known, a flowchart is a formalized graphic representation of a program logic sequence, work process, organization structure, etc. Traditional flowchart comprises a set of simple geometric symbols representing the beginning or end of a process, intermediate steps, decisions, I/O processes and directional lines connecting these symbols. The meanings of these geometric symbols have been clearly defined in industrial standards, such as ANSIx3.5, ISO 5807:1985, etc. FIG. 1 shows several common geometric symbols and their meanings in traditional flowchart.


At present, there are many computer software or hardware tools for designing, editing a flowchart, e.g., Holosofx™, Rational Rose™, CA™ process modeler, Sybase™ Power Designer, Enterprise Architect, etc. These tools can help business executives, business analyzers and commercial consultants get familiar with business flow, analyze business flow, and can also help system analyzers or program designers in designing and editing various flowcharts, some of these tools can generate various project documents or even source program code automatically. Due to the use of these tools, it has dramatically reduced system analyzer or program designer's workload.


However, for existing tools (technology) of designing and editing a flowchart, once finished flowchart design, it's hard to make modification or reorganization.


Consider the following scenarios. FIG. 2A is a simple illustrative flowchart edited by Rational Rose™. As shown in FIG. 2A, activities 2 and 3 are performed in parallel with activities 4 and 5. If we want to modify the execution mode of the four activities from parallel to sequential, as shown in FIG. 2B, then you need to perform following six operations: 1) delete the first synchronization bar; 2) delete the second synchronization bar; 3) add a flow from Activity 1 to Activity 2; 4) add a flow from Activity 3 to Activity 4; 5) add a flow from Activity 5 to Activity 6; 6) re-layout all of these graphic symbols.


If we want to change the synchronization (parallel) logic in FIG. 2A to decision logic, as shown in FIG. 2C, then we need to perform following nine operations: 1) delete the first synchronization bar; 2) delete the second synchronization bar; 3) add a condition box at the place of the first synchronization bar; 4) add a flow from Activity 1 to the condition box; 5) add a flow from the condition box to Activity 2; 6) add a flow from the condition box to Activity 4; 7) add a flow from Activity 3 to Activity 6; 8) add a flow from Activity 5 to Activity 6; 9) re-layout all of these graphic symbols.


Further, if we want to move Activity 3 in FIG. 2A to a place after synchronization (parallel) logic, as shown in FIG. 2D, then we need to perform following five operations: 1) reconnect the control flow between Activity 3 and the second synchronization bar to point to Activity 6; 2) reconnect the control flow between Activity 2 and Activity 3 from the second synchronization bar to Activity 3; 3) delete the control flow between the second synchronization bar and Activity 6; 4) add a control flow from Activity 2 to the second synchronization bar; 5) re-layout all of these graphic symbols.


From the above examples we can see that it's very inconvenient to modify a flowchart using prior flowchart editing techniques, especially for complex flowcharts and when the flowcharts need to be changed often. For this reason, system analyzer and program designers waste a great deal of time and energy in those trivial editing operations.


SUMMARY OF THE INVENTION

In order to solve the above mentioned problems, the present invention provides systems, methods and apparatus to transform a flowchart to an equivalent tree diagram (equivalent tree), and then to edit, and/or reorganize the flowchart by utilizing the equivalent tree diagram.


According to one aspect of the present invention, there is provided a method for transforming a flowchart to an equivalent tree diagram, said flowchart comprises one or more logic structures and one or more processing activities in said one or more logic structures, said method comprises: traversing said flowchart; transforming said one or more logic structures in said flowchart to one or more branching nodes in said tree diagram; and transforming one or more processing activities in said logic structures of said flowchart to one or more leaf nodes below corresponding branching nodes in said tree diagram.


According to another aspect of the present invention, there is provided a method for transforming an equivalent tree diagram to a flowchart, characterized in that said equivalent tree diagram comprises one or more branching nodes that represent logic structure and leaf nodes that represent processing activities below said one or more branching nodes.


According to another aspect of the present invention, there is provided a method for verifying reorganizing of a flowchart.


According to another aspect of the present invention, there is provided a method for editing a flowchart.


According to another aspect of the present invention, there is provided a method for editing a flowchart.


According to another aspect of the present invention, there is provided a method for creating a flowchart by creating a tree diagram based on tasks to be modeled.





BRIEF DESCRIPTION OF THE DRAWINGS

The features, advantages and objectives of the present invention will be better understood from the following description of the preferable embodiments with reference to accompany drawings, in which:



FIG. 1 shows commonly used geometric graphics and their meanings in traditional flowcharts;



FIGS. 2A-2D are examples that use conventional method to edit flowchart;



FIGS. 3A-3J show how to represent various logic structures in a flowchart as corresponding branching nodes in a tree diagram;



FIG. 4A shows an illustrative flowchart to be transformed, FIG. 4B shows the transformed tree diagram which is equivalent to the flowchart;



FIG. 5 is a flowchart of the method for transforming a flowchart to a tree diagram according to one embodiment of the present invention;



FIGS. 6A-6E gradually show the process of transforming a flowchart to an equivalent tree diagram;



FIGS. 7A-7D illustrate the procedure of normalization processing;



FIG. 8 is a detailed flowchart of the tree creation algorithm according to one embodiment of the present invention;



FIG. 9 is a flowchart of the method for transforming an equivalent tree diagram to a flowchart according to one embodiment of the present invention;



FIGS. 10A-10J gradually show the process of transforming an equivalent tree diagram to a flowchart;



FIG. 11 is a flowchart of the method for editing a flowchart according to one embodiment of the present invention;



FIG. 12 is a flowchart of the method for editing a flowchart according to one embodiment of the present invention;



FIG. 13 is a flowchart of the method for verifying reorganization of a flowchart according to one embodiment of the present invention;



FIG. 14 is a block diagram illustrating the structure of the flowchart editor according to one embodiment of the present invention;



FIG. 15 is a flowchart of the method for creating a flowchart according to one embodiment of the present invention;



FIG. 16 illustratively shows an interface screen for a user to perform operations of editing a flowchart.





DETAILED DESCRIPTION OF THE INVENTION

The present invention provides methods, systems and apparatus to transform a flowchart to an equivalent tree diagram (equivalent tree), and then to edit and/or reorganize the flowchart by utilizing the tree diagram which is equivalent to the flowchart. In an example embodiment there is provided a method for transforming a flowchart to an equivalent tree diagram, said flowchart comprises one or more logic structures and one or more processing activities in said one or more logic structures, said method comprises: traversing said flowchart; transforming said one or more logic structures in said flowchart to one or more branching nodes in said tree diagram; and transforming one or more processing activities in said logic structures of said flowchart to one or more leaf nodes below corresponding branching nodes in said tree diagram.


The present invention also provides a method for transforming an equivalent tree diagram to a flowchart, characterized in that said equivalent tree diagram comprises one or more branching nodes that represent logic structure and leaf nodes that represent processing activities below said one or more branching nodes, said method comprises: traversing said equivalent tree diagram; transforming said one or more branching nodes in said tree diagram to one or more logic structures in said flowchart; and transforming said one or more leaf nodes below said branching nodes in said tree diagram to one or more processing activities in corresponding logic structures in said flowchart.


There is further provided a method for verifying reorganizing of a flowchart, one or more nodes in the flowchart are selected for reorganizing, characterized in that said method comprises: transforming said flowchart to an equivalent tree diagram by utilizing said method for transforming a flowchart to an equivalent tree diagram; if said selected one or more nodes correspond to a sub tree in said equivalent tree diagram, or if said selected one or more nodes correspond to a plurality of sub trees in said equivalent tree diagram and said plurality of sub trees have a same parent node in common, then determining that the reorganization of flowchart is valid, otherwise invalid.


The present invention also provides a method for editing a flowchart, characterized in that, said method comprises: generating an equivalent tree diagram based on said flowchart by utilizing said method for transforming a flowchart to an equivalent tree diagram; modifying said generated equivalent tree diagram; and transforming said equivalent tree diagram to a flowchart by utilizing said method for transforming an equivalent tree diagram to a flowchart.


The present invention also provides a method for editing a flowchart, characterized in that, said method comprises: generating an equivalent tree diagram based on said flowchart by utilizing said method for transforming a flowchart to an equivalent tree diagram; selecting one or more nodes in said flowchart for modification; if said selected one or more nodes correspond to a sub tree in said equivalent tree diagram, or said selected one or more nodes correspond to a plurality of sub trees in said equivalent tree diagram and said plurality of sub trees have a same parent nodes in common, then permitting the modification, otherwise the modification is not permitted; if permitted, then making a corresponding modification in said generated equivalent tree diagram; and transforming said equivalent tree diagram to a flowchart by utilizing said method for transforming an equivalent tree diagram to a flowchart.


The present invention also provides a method for creating a flowchart, comprising: creating a tree diagram based on tasks to be modeled, wherein a branching node in said tree diagram represents a logic structure and a leaf node in said tree diagram represents a processing activity; and transforming said equivalent tree diagram to a flowchart by utilizing said method for transforming an equivalent tree diagram to a flowchart.


Next, various preferred embodiments of the present invention will be described in detail in conjunction with the accompany drawings. As mentioned above, a flowchart is hard to modify and edit due to its nature characteristics. But a tree diagram, as well known, is very convenient to edit and modify, and it is very suitable for representing semantic concept structure due to its nature characteristics. Thus, if we can transform a flowchart equivalently (without losing semantic meanings) to a tree diagram, then we can utilize the advantages of both flowchart and tree diagram and overcome respective disadvantages, such as, editing, reorganizing a flowchart or verifying reorganization operations etc.


Method for Transforming a Flowchart to an Equivalent Tree Diagram


According to one aspect of the present invention, there is provided a method for transforming a flowchart to an equivalent tree diagram. The method will be described in the following in conjunction with the accompany drawings.


In order to transform a flowchart to an equivalent tree diagram, first we need to represent respective semantic elements of the flowchart in the tree diagram in a proper manner. Next we will gradually analyze respective semantic elements in the flowchart and explain rules for corresponding to elements in the equivalent tree diagram.


There are two kinds of semantic elements in a flowchart: processing activity and logic structure.


Processing activity is a basic component in a flowchart; it is a specific activity unit in a flow and is generally represented by a rectangle, such as Activities 1-6 in FIG. 2. According to one embodiment of the present invention, in the equivalent tree diagram, a leaf node is used to represent a processing activity.


Logic structure is the basic flow logic of respective processing activities in a flowchart, including: sequence logic structure, split logic structure and loop logic structure. According to one embodiment of the present invention, in an equivalent tree diagram, branching nodes are used to represent logic structures. FIGS. 3A-3J show respectively the manner in which various logic structures are represented in an equivalent tree diagram, next they will be explained one by one:


(1) Sequence logic structure, represents the semantic of sequentially performing one or more processing activities. As shown in FIG. 3A, A4 and A5 are two processing activities in a sequence logic structure. A sequence logic structure is represented as a branching node of sequence logic structure type in the equivalent tree diagram, as shown in FIG. 3B, wherein the branching node of sequence logic structure type has two leaf nodes A4 and A5.


(2) Split logic structure, represents the semantic of splitting a flow into multiple directions, it includes three types, i.e. AND, OR and XOR. As well known in the art, AND split logic structure represents that each split should be executed, XOR split logic structure represents that only one of the splits need to be executed, and OR split logic structure represents that one or more splits in all splits may be executed.


In a normalized flowchart, each split logic structure should have a split and a join that identify the beginning and the end of the split logic structure respectively. According to different industrial standards, the types of split logic structure may vary. For example, early flowcharts only support XOR split logic structure which is represented as condition box, as shown in FIG. 3C. UML activity diagram supports both AND split logic structure and XOR split logic structure which is represented as condition box in FIG. 3C and synchronization bar in FIG. 3D respectively. IDEF3 can support all of the three types of split logic structure, as shown in FIG. 3E. In an equivalent tree diagram, split logic structures are represented as branching nodes of the three types of split logic structure respectively, that is, “Parallel(AND)”, “Parallel(OR)” and “Parallel(XOR)”, as shown in FIG. 3F.


(3) Loop logic structure, represents the semantic of flow cycle, it generally includes two types: UNTIL and WHILE, as shown in FIG. 3G and FIG. 3H respectively. In an equivalent tree diagram, loop logic structures are represented as branching nodes of the two types of loop logic structure respectively, that is, Loop(UNTIL) and Loop(WHILE), as shown in FIG. 3I and FIG. 3J. And the first node below s branching node of loop logic structure type represents the Loop-body executed in the loop, the second node represents the Back-body executed when returning to the loop.


According to one embodiment of the present invention, each branching node in the equivalent tree diagram has three attributes: node ID, which uniquely identifies that node; node type, which represents the logic structure type the node stands for; condition data, which records condition and switch information of the logic structure the branching node stands for, such as, judgment condition for XOR split logic structure, loop condition or exit loop condition for loop logic structure, etc. In addition, each leaf node in the equivalent tree diagram has at least two attributes: node ID, which uniquely identifies that node; activity data, which records information of the processing activity the node stands for.


According to the above described transformation rules, the flowchart shown in FIG. 4A can be transformed to the tree diagram in FIG. 4B which is equivalent to that flowchart. The method of the present invention for transforming a flowchart to a tree diagram is characterized in that: representing logic structures in the flowchart with branching nodes in the tree diagram, and representing processing activities in corresponding logic structures in the flowchart with leaf nodes below corresponding branching nodes in the tree diagram.


Next, the specific transformation process will be described in detail in conjunction with one embodiment of the method for transforming a flowchart to an equivalent tree diagram of the present invention. FIG. 5 is a flowchart of the method for transforming a flowchart to a tree diagram according to one embodiment of the present invention. FIGS. 6A-6E show step by step the process of transforming a flowchart to an equivalent tree diagram, taking the flowchart shown in FIG. 4A as an example.


According to this embodiment, first at Step 505, all loops and nested loops in original flowchart are found out. Specifically, in the prior art, there are many known solutions to find out loops in a flow, such as contained in “Conflicts Analysis for Inter-enterprise Business Process Model”, Wei Ding et al, the 6th World Multi-conference on SYSTEMICS, CYBERNETICS AND INFORMATICS (SCI 2002)(2002, Orlando, Fla.), “Identifying Loops Using DJ Graphs” by Vugranam C. Sreedhar et al issued at ACAPS Technical Memo 98 on Sep. 10, 1995, and “Flow graph anomalies: What's in a loop?” by Wolfe, M issued at Technical Report CS/E 92-012 (Oregon Graduate Institute for Science and Technology, 1992). The above articles have introduced many methods for finding out loop logic structures in a flow, the content of which is incorporated herein for reference.


Next, at Step 510, each found loop logic structure is cut off and replaced with a special marked node in the main flow. As shown in FIG. 6A, after Step 510, the loop logic structure in the original flowchart is cut off and replaced with the special node S1.


Next, at Step 515, each cut loop logic structure is modified to a non-loop logic structure, as shown in FIG. 6B.


Next, at Step 520, the flowchart that has been cut off loop logic structure and all modified non-loop logic structure are stored as a set G, as shown in FIG. 6C.


Next, at Step 525, normalization is executed for each element in G. Here, the normalization in the present invention will be explained. When drawing a flowchart, there are often some omission and simplification, for example, FIG. 7A and FIG. 7C are two flowcharts in which some splits & joins are omitted, and their respective complete (normalized) flowcharts should shown as FIG. 7B and FIG. 7D. In the present invention, the normalization of a flow is to recover the simplified flowchart to a normalized flowchart, that is, for each split there is a corresponding join. After Step 525, the result is shown as FIG. 6D.


Next, at Step 530, for each normalized flow in set G, Tree Creation Algorithm is executed to create a main tree and one or more sub trees. After the above steps, the loops in the original flowchart has been modified to non-loops and the simplified flows have also been normalized, therefore in this step, we only need to traverse the main flow and each non-loop flow, and transform each node in the flows into the tree structures according to the above mentioned transformation rules. Specific tree creation algorithm can be varied. It will be explained in conjunction with FIG. 8 later, taking a simple tree creation algorithm according to the present embodiment as an example. The result of the present step is shown in FIG. 6E.


Next, at Step 535, the generated tree and sub trees are assembled into a complete equivalent tree diagram, the result of which is shown in FIG. 4B. Finally the process ends at Step 540.



FIG. 8 is a detailed flowchart of the tree creation algorithm according to one embodiment of the present invention. As shown in FIG. 8, first at Step 805, an initialization is performed, the content of which includes: creating a tree structure which only includes a root node and a sequential branching node, and setting the branching node as the current node; setting the beginning node of the flow as the current node in the flow processed.


Next, at Step 810, a next node in the flow processed is fetched out sequentially. According to the present embodiment, in this step, the flow is traversed using depth-first search to get next node sequentially. Of course all nodes of the flow can also be traversed using other search policies according to different processing steps, it will be described later.


Next, at Step 815-830, the process makes a series of decisions to finally determine the type of the fetched node, thereby taking different processing steps.


Specifically, at Step 815, it is determined whether the fetched node is a processing activity node. If so, proceed to Step 845, in which a corresponding leaf node is added below the current node of the tree structure. And then the process returns to Step 810, a next node in that flow is fetched out and the subsequent steps are repeated.


At Step 820, it is determined whether the fetched node is a node representing a split. If so, proceed to Step 850, in which a corresponding split branching node is added below the current node of the tree structure and a sequence branching node is added below that branching node, and the branching node is set as the current node. And then, the process returns to Step 810, a next node in the flow is fetched out and the subsequent steps are repeated.


At Step 825, it is determined whether the fetched node is a node representing a join. If so, proceed to Step 855, in which a further decision is made as to whether all branches in the split logic structure have been traversed. If the result of Step 855 is “Yes”, then proceed to Step 860, otherwise to Step 865.


As shown, if the process proceeds to Step 860, then in that step, the current node of the tree structure is moved to a branching node one level upper than the split branching node. And then, the process returns to Step 810, to fetch a next node in the flow and repeat subsequent steps.


If the process proceeds to Step 865, then in that step, a sequence branching node is added below the split branching node of the tree structure, and is set as the current node. And then, the process returns to Step 810, to fetch a next node in the flow and repeat the subsequent steps.


Finally, if all the determinations of Steps 815, 820, 825 are “No”, then at Step 830, it is determined whether the fetched node is an ending node, if so, proceed to Step 835, the processing of main tree is complete, otherwise proceed to Step 840, the processing of sub tree is complete.


Although the tree creation algorithm in the present embodiment is described in conjunction with FIG. 8, those skilled in the art will appreciate that there are many other approaches in addition to the above method, for example, transforming gradually all splits in the flow into tree structures first and then assembling these transformed tree structures sequentially, and different policies can be used to traverse the flowchart, all of these are not limited in the present invention.


The method for transforming a flowchart to an equivalent tree diagram according to the embodiment of the present invention has been described above in conjunction with FIGS. 3-8. It should be noted that in the embodiment shown in FIG. 5, Steps 505-520 and 535 in FIG. 5 can be omitted when the flowchart to be transformed does not include loop logic structure. And Step 525 can be omitted too when the flowchart processed is already a normalized flowchart.


From the above description it can be seen that through the method of the present invention for transforming a flowchart to an equivalent tree diagram, a flowchart can be transformed to an equivalent tree diagram without losing the semantic of the original flowchart, thereby both the advantage of flowchart and tree diagram can be utilized.


Method for Transforming an Equivalent Tree Diagram to a Flowchart


Under the same inventive conception, according to another aspect of the present invention, there is provided a method for transforming an equivalent tree diagram to a flowchart, the equivalent tree diagram can be generated by, for example, the above mentioned method for transforming a flowchart to an equivalent tree diagram. The method will be described in the following in conjunction with the accompany drawings.


The method of the present invention for transforming an equivalent tree diagram to a flowchart actually transforms (recovers) the branching nodes in the equivalent tree diagram to corresponding logic structures in flowchart, and transforms (recovers) the leaf nodes below the branching nodes in the equivalent tree diagram to processing activities in corresponding logic structures in the flowchart.


Next, a specific transform process will be described in detail in conjunction with the embodiment of the present invention of the method for transforming an equivalent tree diagram to a flowchart. FIG. 9 is a flowchart of the method for transforming an equivalent tree diagram to a flowchart according to one embodiment of the present invention.


As shown in FIG. 9, first at Step 905, an initialization is performed. Specifically, a flowchart that only includes a beginning node and an end node is initialized, and the position between beginning node and end node is set as the current position A′, and the root node of the equivalent tree diagram is set as the current node.


Next, at Step 910, fetching a next node in the tree diagram as the current node A in the manner of depth first traversal.


Next, at Step 915, it is determined whether the current node A is null, if so, proceed to Step 940 and end, otherwise proceed to Step 920.


At Step 920, it is determined whether the current node A is a leaf node, if so, proceed to Step 935, otherwise proceed to Step 925.


If the process proceeds to Step 925, then in that step, a corresponding logic structure is created according to the type of current node, for example, a sequence logic structure, a split logic structure, a loop logic structure, etc. Next at Step 930, the logic structure is inserted into the current position A′ and the current position A′ is moved to the first insert position in that logic structure, for example, the first node in the sequence logic structure, the first branch in the split logic structure, the loop-body of the loop logic structure, etc. Then the process returns to Step 910 and repeats the subsequent processing.


If the process proceeds to Step 935 from Step 920, then at that step, a processing activity node corresponding to current node A is inserted into the current position A′ and the current position A′ is moved to the next insert position in that logic structure. Then the process returns to Step 910 and repeats the subsequent processing.



FIGS. 10A-10J show gradually the process of transforming an equivalent tree diagram to a flowchart, taking the tree diagram shown in FIG. 4B as an example.


It should be noted that although the method of the present invention for transforming an equivalent tree diagram to a flowchart has been described according to the embodiment shown in FIG. 9, the present invention is not limited to that embodiment. For example, an equivalent tree diagram is traversed in width-first manner or other searching manners.


From the above description it can be seen that through the method of the present invention for transforming an equivalent tree diagram to a flowchart, the equivalent tree diagram generated by the above mentioned method for transforming a flowchart to an equivalent tree diagram can be transformed (recovered) to a flowchart, thereby both the advantage of flowchart and tree diagram can be utilized.


Method for Editing a Flowchart


Under the same inventive conception, according to another aspect of the present invention, there is provided a method for editing a flowchart. The method will be described in the following in conjunction with the accompany drawings.



FIG. 11 is a flowchart of the method for editing a flowchart according to one embodiment of the present invention. As shown in FIG. 11, first at Step 1105, an equivalent tree diagram is generated based on the edited flowchart. Specifically, the present step generates the equivalent tree diagram through the above described method for transforming a flowchart to an equivalent tree diagram.


Next, at Step 1110, modification is made in the equivalent tree diagram. The method for editing a flowchart of the present embodiment is suitable for users to make edition and modification explicitly in the equivalent tree diagram. That is, the system displays the generated equivalent tree diagram directly to users and allows user to operate that diagram directly; for example, FIG. 16 illustratively shows a user interface for the user to edit a flowchart.


Specifically, the modification in the present step can comprise: modifying node position, for example, the user can drag & drop a leaf node or a sub tree in the tree diagram to a new position, or copy & paste a leaf node or a sub tree to a new position; modifying node type, user may also change the type attribute of a branching node in the tree diagram, for example, changing an AND split type branching node to the OR split type, etc.


Then, at Step 1115, the equivalent tree diagram is transformed to a flowchart, specifically, through the above described method for transforming an equivalent tree diagram to a flowchart. Such that the modification the user made in the equivalent tree diagram will be reflected in the flowchart. Finally the process ends at Step 1120.


The method for editing a flowchart of the present embodiment utilizes the advantage of the equivalent tree diagram, it can greatly simplify the operation of modifying a flowchart through allowing the user to edit in the equivalent tree diagram directly. For example, for the case described in the section of background of the invention in which a lot of steps are needed to modify a flowchart, only one step is needed through the method of the present embodiment.



FIG. 12 is a flowchart of the method for editing a flowchart according to another embodiment of the present invention. As shown in FIG. 12, first at Step 1205, an equivalent tree diagram is generated based on the flowchart being edited. Like the previous embodiment, the present step also uses the above described method for transforming a flowchart to an equivalent tree diagram to generate the equivalent tree diagram.


Next, at Step 1210, modification is made in the flowchart. The method for editing a flowchart of the present embodiment is suitable for a user to edit and modify implicitly in the flowchart. That is, the generated equivalent tree diagram is not displayed to the user for editing; rather it is stored in memory. The user still make modifications in the flowchart, for example, drag & drop one or more nodes, delete or copy one or more nodes, etc.


Next, at Step 1215, it is determined whether the user's modification is permitted. Specifically, the present step determines the validness of the user's modification using the equivalent tree diagram. For example, if the nodes selected by the user correspond to a sub tree in the equivalent tree diagram, or the nodes selected by the user correspond to multiple sub trees in the equivalent tree diagram and these sub trees have a same parent node in common, then it is permitted, otherwise it is not permitted. If the determination in present step is Yes, then the process proceeds to Step 1225, otherwise proceeds to Step 1220, the modification is denied and the process ends at Step 1235.


If the process proceeds to Step 1225, then at that step, the corresponding modification is made in the equivalent tree diagram. Then at Step 1230, the equivalent tree diagram is transform to a flowchart (using the above described method for transforming an equivalent tree diagram to a flowchart). Finally, the process ends at Step 1235.


The method for editing a flowchart of the present embodiment utilizes the advantage of the implicit equivalent tree diagram, it can verify the validness of user's editing operation, and on the other hand it can greatly improve the convenience of modifying a flowchart. For example, for the case described in the section of background of the invention in which a lot of steps are needed to modify a flowchart, it is greatly simplified in the method of present embodiment through the transformation of the equivalent tree diagram.


Method for Verifying Reorganizing of a Flowchart


Under the same inventive conception, according to another aspect of the present invention, there is provided a method for verifying reorganization of a flowchart. The method will be described in the following in conjunction with the accompany drawings.



FIG. 13 is a flowchart of the method for verifying reorganization of a flowchart according to one embodiment of the present invention. Reorganization of a flowchart in present invention refers to the modification related to the structure of the flowchart, for example, drag & drop one or more nodes to a new position, copy & paste one or more nodes to a position or delete one or more nodes, etc.


As shown in FIG. 13, first at Step 1305, an equivalent tree diagram is generated based on the flowchart. Specifically, the present step uses the above described method for transforming a flowchart to an equivalent tree diagram to generate the equivalent tree diagram.


Next, it is determined whether the nodes selected as the object to be modified in the flowchart are corresponding to a sub tree in the equivalent tree diagram. If Yes, then at Step 1320, it is verified that the reorganization is valid, otherwise the process proceeds to Step 1315.


At Step 1315, it is determined whether the nodes selected as the object to be modified in the flowchart are corresponding to multiple sub trees in the equivalent tree diagram and these sub trees have a same parent node in common. If Yes, then at Step 1320, it is verified that the reorganization is valid, otherwise at Step 1325, it is determined that the reorganization is invalid.


Finally, the process ends at Step 1330.


The method for verifying reorganization of a flowchart of the present embodiment utilizes the advantage of equivalent tree diagram, it can verify the validness of user's editing operation, thereby raising computer's capability to process a flowchart to a new height of understanding the flowchart semantically.


Method for Creating a Flowchart


Under the same inventive conception, according to another aspect of the present invention, there is provided a method for creating a flowchart. The method will be described in the following in conjunction with the accompany drawings.


It is also possible to create a flowchart using an equivalent tree diagram based on the above-mentioned definition of equivalent tree diagram and the transformation rules against flowchart. First, an equivalent tree diagram is created according to the process (referred to as tasks in the present invention) to be modeled, that is, representing logic structures with branching nodes and representing processing activities with leaf nodes; then the equivalent tree diagram is transformed to a flowchart through the above described method.



FIG. 15 is a flowchart of the method for creating a flowchart according to one embodiment of the present invention. As shown in FIG. 15, first at Step 1505, an initialization is performed. Specifically, a tree diagram that only includes one root node and one leaf node is created, and the leaf node is set as the current node. This only leaf node represents all of the tasks (the whole process) to be modeled.


Next, at Step 1510, it is determined whether the current leaf node can be decomposed. If Yes, the process proceeds to Step 1515, otherwise to Step 1520.


If the process proceeds to Step 1515, then at that step, the task of the current node is decomposed into one or more sub tasks, which are taken as sub nodes below the current node, and the type of the branching node for the current node is set according to the sub task's execution logic(flow logic). That is, when a task can be decomposed into multiple sub tasks, then by performing the above Step 1510 and 1515, the task can be represented in the tree diagram with leaf nodes representing the sub tasks and the type of branching node corresponding to the execution logic of the sub tasks. As described in the above embodiment, the execution logic of sub tasks can comprise: sequence logic, split logic and loop logic, and split logic can further comprise: AND split logic, OR split logic and XOR split logic. Accordingly, the branching nodes in the tree diagram also comprises: sequence logic type branching node, AND split logic type branching node, OR split logic type branching node, XOR split logic type branching node and loop logic type branching node.


Next, at Step 1520, a next leaf node is selected as the current node. Here, the sequence in which the next leaf node is selected has no limitation in the present invention, it may be various, such as depth-first or broad-first, as long as it traverses all leaf nodes one by one.


Next, at Step 1525, it is determined whether the tasks of all the leaf nodes can't be further decomposed. If yes, then the process proceeds to Step 1530, otherwise returns to Step 1510 to repeat the above Steps 1510-1525.


If the process proceeds to Step 1530, then at that step, the user can edit the generated tree diagram, for example, reorganize, delete and modify, etc. Of course this step is optional, the user may also choose not to make any edition.


Then at Step 1535, the generated equivalent tree diagram is transformed to a flowchart through the above described method for transforming an equivalent tree diagram to a flowchart.


Finally, the process ends at Step 1540.


From the above description it can be seen that the user may model a business flow with a tree diagram first and then transform it to a conventional flowchart through the method for creating a flowchart of the present invention. When modeling with a tree diagram, it is very convenient to perform modification, edition operation, it also can provide a prospect which is different from the traditional flowchart for analyzing business flow (process), which brings more comprehensive and deep understanding in business flow for the user.


Flowchart Editor


Under the same inventive conception, according to another aspect of the present invention, there is provided a flowchart editor. It will be described in the following in conjunction with the accompany drawings.



FIG. 14 is a block diagram illustrating the structure of the flowchart editor according to one embodiment of the present invention. As shown in FIG. 14, the flowchart editor 1400 of the present embodiment comprises: a flowchart editing unit 1403 which is equivalent to and has the function of a traditional flowchart editor. The flowchart editor 1400 of the present embodiment, on the basis of traditional flowchart editor, further comprises: flowchart to tree diagram transforming means 1401 for transforming a flowchart to an equivalent tree diagram; tree diagram to flowchart transforming means 1402 for transforming an equivalent tree diagram to a flowchart; an equivalent tree diagram storing unit 1404 for storing the equivalent tree diagram generated by the flowchart to tree diagram transforming means 1401; an equivalent tree diagram editing unit 1406 for editing the equivalent tree diagram generated by the flowchart to tree diagram transforming means 1401; a reorganization verifying unit 1405 for verifying the validness of editing operation the user made in the flowchart editing unit 1403.


Operationally, the flowchart to tree diagram transforming means 1401 in the flowchart editor 1400 of the present embodiment can implement the above described method for transforming a flowchart to an equivalent tree diagram, the tree diagram to flowchart transforming means 1402 can implement the above described method for transforming an equivalent tree diagram to a flowchart, the reorganization verifying unit 1405 can implement the above described method for verifying reorganization of a flowchart. Further, operationally, the flowchart editor 1400 of the present embodiment can implement the above described method for editing and creating a flowchart.


It should be noted that the flowchart editor of the present invention and its components can 24 be implemented in the form of hardware and software, and can be combined with other devices as need, for example, it can be implemented on various devices having computing capability, such as a personal computer, a notebook computer, a palmtop computer, a PDA, a word processor etc, and can be physically separated but operationally interconnected to accomplish the function.


Although the method for transforming a flowchart to an equivalent tree diagram, the method for transforming an equivalent tree diagram to a flowchart, the method for verifying reorganization of a flowchart, the method for editing a flowchart, the method for creating a flowchart and the flowchart editor of the present invention has been described in detail with some illustrative embodiments in the above, these embodiments are not exhaustive, various changes and modifications may be affected by one skilled in the art within the spirit and scope of the invention. Accordingly, the invention is not limited to these embodiments, the scope of the invention is only defined by the appended claims.


The present invention can be realized in hardware, software, or a combination of hardware and software. A visualization tool according to the present invention can be realized in a centralized fashion in one computer system, or in a distributed fashion where different elements are spread across several interconnected computer systems. Any kind of computer system—or other apparatus adapted for carrying out the methods and/or functions described herein—is suitable. A typical combination of hardware and software could be a general purpose computer system with a computer program that, when being loaded and executed, controls the computer system such that it carries out the methods described herein. The present invention can also be embedded in a computer program product, which comprises all the features enabling the implementation of the methods described herein, and which—when loaded in a computer system—is able to carry out these methods.


Computer program means or computer program in the present context include any expression, in any language, code or notation, of a set of instructions intended to cause a system having an information processing capability to perform a particular function either directly or after conversion to another language, code or notation, and/or after reproduction in a different material form.


Thus the invention includes an article of manufacture which comprises a computer usable medium having computer readable program code means embodied therein for causing a function described above. The computer readable program code means in the article of manufacture comprises computer readable program code means for causing a computer to effect the steps of a method of this invention. Similarly, the present invention may be implemented as a computer program product comprising a computer usable medium having computer readable program code means embodied therein for causing a function described above. The computer readable program code means in the computer program product comprising computer readable program code means for causing a computer to effect one or more functions of this invention. Furthermore, the present invention may be implemented as a program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for causing one or more functions of this invention.


It is noted that the foregoing has outlined some of the more pertinent objects and embodiments of the present invention. This invention may be used for many applications. Thus, although the description is made for particular arrangements and methods, the intent and concept of the invention is suitable and applicable to other arrangements and applications. It will be clear to those skilled in the art that modifications to the disclosed embodiments can be effected without departing from the spirit and scope of the invention. The described embodiments ought to be construed to be merely illustrative of some of the more prominent features and applications of the invention. Other beneficial results can be realized by applying the disclosed invention in a different manner or modifying the invention in ways known to those familiar with the art.

Claims
  • 1. A method for transforming a flowchart to an equivalent tree diagram, said flowchart comprises at least one logic structure and at least one processing activity in said at least one logic structure, said method comprising: traversing said flowchart;transforming said at least one logic structure in said flowchart to at least one branching node in said tree diagram; andtransforming at least one processing activity in said logic structures of said flowchart to at least one leaf node below corresponding branching nodes in said tree diagram.
  • 2. The method for transforming a flowchart to an equivalent tree diagram according to claim 1, wherein said logic structure comprises sequence logic structure and split logic structure, correspondingly the branching node in said tree diagram comprises sequence logic structure type branching node and split logic structure type branching node.
  • 3. The method for transforming a flowchart to an equivalent tree diagram according to claim 2, wherein said flowchart further comprises at least one loop logic structure, correspondingly the branching node in said tree diagram further comprises loop logic structure type branching node, said method comprises: finding said at least one loop logic structure in said flowchart;performing said traversing and subsequent steps respectively for each found loop logic structure and the main flow from which said at least one loop logic structure has been removed, to form at least one sub tree corresponding to said at least one loop logic structure and a main tree corresponding to said main flow; andassembling said at least one sub tree to said main tree.
  • 4. The method for transforming a flowchart to an equivalent tree diagram according to claim 3, wherein said step of finding said at least one loop structure is performed before said step of traversing said flowchart.
  • 5. The method for transforming a flowchart to an equivalent tree diagram according to claim 3, wherein said method further comprises a step of performing normalization for said flowchart.
  • 6. The method for transforming a flowchart to an equivalent tree diagram according to claim 2, wherein said split logic structure comprises AND split logic structure, OR split logic structure and XOR split logic structure, correspondingly said split logic structure type branching node comprises AND split logic structure type branching node, OR split logic structure type branching node and XOR split logic structure type branching node.
  • 7. The method for transforming a flowchart to an equivalent tree diagram according to claim 3, wherein said loop logic structure comprises WHILE loop logic structure and UNTIL loop logic structure, correspondingly said loop logic structure type branching node comprises WHILE loop logic structure type branching node and UNTIL loop logic structure type branching node.
  • 8. The method for transforming a flowchart to an equivalent tree diagram according to claim 1, wherein said step of traversing said flowchart is performed in depth-first manner or width-first manner.
  • 9. A method for transforming an equivalent tree diagram to a flowchart, wherein said equivalent tree diagram comprises at least one branching node that represent logic structures and at least one leaf node under said at least one branching node that represents a processing activity, said method comprises: traversing said equivalent tree diagram;transforming said at least one branching node in said tree diagram to at least one logic structure in said flowchart; andtransforming said at least one leaf node below said at least one branching node in said tree diagram to at least one processing activity in corresponding logic structures in said flowchart.
  • 10. The method for transforming an equivalent tree diagram to a flowchart according to claim 9, wherein said step of traversing said tree diagram is performed in one of depth-first manner and width-first manner.
  • 11. The method for transforming an equivalent tree diagram to a flowchart according to claim 9, wherein said logic structure comprises sequence logic structure, split logic structure and loop logic structure, correspondingly the branching node in said tree diagram comprises sequence logic structure type branching node, split logic structure type branching node and loop logic structure type branching node.
  • 12. The method for transforming an equivalent tree diagram to a flowchart according to claim 11, wherein said split logic structure comprises at least one of AND split logic structure, OR split logic structure, and XOR split logic structure, correspondingly said split logic structure type branching node comprises at least one of AND split logic structure type branching node, OR split logic structure type branching node and XOR split logic structure type branching node.
  • 13. The method for transforming an equivalent tree diagram to a flowchart according to claim 11, wherein said loop logic structure comprises WHILE loop logic structure and UNTIL loop logic structure, correspondingly said loop logic structure type branching node comprises WHILE loop logic structure type branching node and UNTIL loop logic structure type branching node.
  • 14. The method for transforming a flowchart to an equivalent tree diagram according to claim 1, further comprising: selecting at least one node in said flowchart for reorganization,verifying a reorganization of the flowchart, said step of verifying comprising:if said at least one node corresponds to a sub tree in said equivalent tree diagram, or said at least one node corresponds to a plurality of sub trees in said equivalent tree diagram and said plurality of sub trees have a same parent node in common, then determining that the reorganization of said flowchart is valid, otherwise said flowchart is invalid.
  • 15. The method for transforming a flowchart to an equivalent tree diagram according to claim 1, further comprising editing the flowchart, said step of editing comprising: modifying said generated equivalent tree diagram; andtransforming said equivalent tree diagram to a flowchart, wherein said equivalent tree diagram comprises at least one branching node that represent logic structure and at least one leaf node under said at least one branching nodes that represent processing activities, said step of transforming comprising:traversing said equivalent tree diagram;transforming said at least one branching node in said tree diagram to at least one logic structure in said flowchart; andtransforming said at least one leaf node below said at least one branching node in said tree diagram to at least one processing activity in corresponding logic structures in said flowchart.
  • 16. The method for transforming a flowchart to an equivalent tree diagram according to claim 1, further comprising editing the flowchart, the step of editing comprising: selecting at least one node in said flowchart for modification;if said selected at least one node correspond to a sub tree in said equivalent tree diagram, or said selected at least one node correspond to a plurality of sub trees in said equivalent tree diagram and said plurality of sub trees have a same parent nodes in common, then permitting the modification, otherwise modification is not permitted;if permitted, then making corresponding modification in said generated equivalent tree diagram; andtransforming said equivalent tree diagram to a flowchart, said step of transforming comprising: traversing said equivalent tree diagram;transforming said at least one branching node in said tree diagram to at least one logic structure in said flowchart; andtransforming said at least one leaf node below said at least one branching node in said tree diagram to at least one processing activity in corresponding logic structures in said flowchart.
  • 17. A flowchart editor for editing a flowchart, characterized in that edit of said flowchart comprises: flowchart to tree diagram transforming means for transforming the flowchart to an equivalent tree diagram; andtree diagram to flowchart transforming means for transforming the equivalent tree diagram generated by said flowchart to tree diagram transforming means to a flowchart.
  • 18. A flowchart editor according to claim 17, said editor further comprising: an equivalent tree diagram storing unit for storing the equivalent tree diagram generated by said flowchart to tree diagram transforming means; andan equivalent tree diagram editing unit for editing the equivalent tree diagram generated by said flowchart to tree diagram transforming means.
  • 19. A flowchart editor according to claim 18, said editor further comprising a reorganization verifying unit for verifying the validness of editing operation a user made to said flowchart.
  • 20. A method for creating a flowchart, comprising: creating a tree diagram based on the tasks of a process to be modeled, wherein at least one branching nodes in said tree diagram represents logic structure, at least one leaf node in said tree diagram represents processing activity; andtransforming said equivalent tree diagram to a flowchart, said step of transforming comprising: traversing said equivalent tree diagram;transforming said at least one branching node in said tree diagram to at least one logic structure in said flowchart; andtransforming said at least one leaf node below said at least one branching node in said tree diagram to at least one processing activity in corresponding logic structures in said flowchart.
  • 21. The method for creating a flowchart according to claim 20, wherein said step of creating a tree diagram comprising: creating a tree diagram that includes one root node and one leaf node representing said process;decomposing the task represented by the leaf node in said tree diagram to at least one sub task and setting them as at least one child leaf node below said leaf node, and modifying said leaf node to a branching node of the type corresponding to the execution logic of said at least one sub task; andrepeating above decomposing step until the tasks represented by all the leaf nodes in said tree diagram can not be further decomposed.
  • 22. An article of manufacture comprising a computer usable medium having computer readable program code means embodied therein for causing transformation of a flowchart to an equivalent tree diagram, the computer readable program code means in said article of manufacture comprising computer readable program code means for causing a computer to effect the steps of claim 1.
  • 23. A program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for transforming an equivalent tree diagram to a flowchart, said method steps comprising the steps of claim 9.
  • 24. A program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for creating a flowchart, said method steps comprising the steps of claim 20.
  • 25. A computer program product comprising a computer usable medium having computer readable program code means embodied therein for causing functions of a flowchart editor, the computer readable program code means in said computer program product comprising computer readable program code means for causing a computer to effect the functions of claim 17.
Priority Claims (1)
Number Date Country Kind
200410046116.5 May 2004 CN national
Continuations (1)
Number Date Country
Parent 11140194 May 2005 US
Child 12124400 US