Embodiment
In order to make the object of the invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and embodiment, the present invention is further elaborated, for the ease of explanation, only show the part relevant with the embodiment of the invention.Should be appreciated that the specific embodiment that this place is described, only be used to explain the present invention, not in order to restriction the present invention.
The present invention obtains the class configuration information in the application system through flow engine; And according to said class object attribute building work flow process; Thereby realized striding application platform, striden the workflow design pattern of flow engine, utilized the workflow reusability of the inventive method design high, can manage the flow process configuration concentratedly; Solve the worry that managerial personnel safeguard a plurality of flow process configuration tools simultaneously, greatly reduced the workload of flow process configuration.
Embodiment one
Fig. 1 is the first preferred embodiment process flow diagram of a kind of building work flow and method of the present invention, and said method comprises step:
S101 obtains the class configuration information in the application system according to flow engine;
Said flow engine is meant the part of workflow as application system, and provides for it core solutions such as the determinative different decision information transmission routes according to role, the division of labor and condition of each application system, content ratings; The part of for example developing system's most critical is not the interface of system; Neither and database between message exchange; But how to develop the programmed logic that corresponds to actual needs and to guarantee its stability, ease for maintenance (modularization and structuring) and elasticity (making the change on the program according to the variation of actual service logic easily, for example the change of the change of right to make decision, institutional framework and because novel service logic that the variation of traffic direction produces or the like) according to service logic; What engine solved is exactly this problem: if application program lacks powerful logical layer, the easy error that certainly will become (routing error of information, endless loop or the like);
S102 disposes the said type of respective class object properties in the configuration information;
Promptly define said type of configuration information and comprise which class object attribute, and the meaning of said class object attribute representative, and the logical relation between the class object attribute etc.;
S103 comes the building work flow process according to said class object attribute or the class component created by said class object attribute, and defines the corresponding class object property value of class object attribute in the said workflow;
Said workflow is a kind of computation model, and the logic that is about to organize together before and after the work how in the workflow and rule are represented with appropriate model in computing machine and to the calculation that plays tricks in fact; The subject matter that workflow will solve is: for realizing certain business objective, between a plurality of participants, utilize computing machine, transmit document, information or task automatically by certain pre-defined rule; Briefly, workflow is exactly a series of mutual linkings, the business activity of carrying out automatically or task; Can regard the whole service process as Yi Tiaohe, the river that wherein flows through is exactly pending list;
Create class component according to said class object attribute; These class components are selected and used to element panels through toolbar; Adopt the dilatory mode design cycle of mouse at the flow scheme design panel, accomplish the graphical design effort of flow process, and give a concrete value for each class object attribute;
S104 stores said workflow into said application system.
Embodiment two
Fig. 2 is the second preferred embodiment process flow diagram of a kind of building work flow and method of the present invention, and said method comprises step:
S201 obtains the flow process class configuration information of flow process class object in the application system, the node class configuration information of node class object and the sideline class configuration information of sideline class object according to flow engine;
Said flow process class object, node class object and sideline class object all belong to class object;
The instance of said class object type of being, wherein the flow process class object is the instance of flow process class, and the node class object is the instance of node class, and the sideline class object is the instance of sideline class;
Said class object comprises the class object attribute, and wherein the flow process class object comprises flow process class object attribute, and the node class object comprises node class object attribute, and the sideline class object comprises sideline class object attribute;
And each class object attribute all has corresponding with it class object property value;
Said class object attribute comprises flow process class object attribute, node class object attribute and sideline class object attribute;
Said type of configuration information comprises flow process class configuration information, node class configuration information and sideline class configuration information;
The configuration information of the flow process class configuration information flow process class that refers between a plurality of people, a plurality of department, to circulate wherein, as enterprise commonly used ask flow process configuration information, the civilian flow process configuration information of transmitting-receiving etc. for instructions;
Said node class configuration information refers to the circulation procedural information of the node of needs control in the flow process class, and for example in asking flow process for instructions, said node class configuration information comprises the node class configuration information of nodes such as drafting, departmental manager, person in charge, administration department;
Each flow process class configuration information comprises a plurality of node class configuration informations and sideline class configuration information;
Each node class configuration information comprises node class, node type and a plurality of node generic attribute;
The node class has encapsulated node type and node generic attribute;
Said node type comprises: start node, ordinary node, aggregation node, terminal node and branch node etc.;
Said sideline class configuration information guides the configuration information of the sideline class of leading the workflow circulation direction;
S202 disposes the flow process class object attribute in the said flow process class configuration information; Dispose the node class object attribute in the said node class configuration information; Dispose the sideline class object attribute in the class configuration information of said sideline; And the flow process class object attribute after will disposing, node class object attribute and sideline class object property store are to the XML configuration file;
Said XML configuration file is divided into two parts, and a part is the database engine configuration information, and said database engine configuration information comprises type of database driving, workflow memory address URL, user name, password etc.; Another part type of being configuration information;
Class object can be according to the unconfined interpolation of the needs of flow engine, and each class object can add a plurality of class object attributes;
For ease of understanding, illustrate, the class configuration information after the configuration is stored as the XML configuration file, the content that said XML configuration file specifically comprises by:
The class object attribute does not have sequence limit during the configuration class object; System discerns according to the sign of definition, is the database engine configuration information like < flowEngine >, and < flow>is flow process class configuration information; < nodeTypes>is node class configuration information, and < nodeType>is the node class;
S203 according to said node class object attribute, flow process class object attribute and node type, creates the node class component; According to said sideline class object attribute and flow process class object attribute, create the sideline class component;
Usually,, and dynamically generate class component, be specially through parsing class object attribute:
Retrieve each node class configuration information < nodeTypes >; Create said node class corresponding nodes class component according to node type, node class object attribute and the flow process class object attribute of each node class < nodeType >, each node class component represents at the toolbar of configuration tool;
Retrieve each sideline class configuration information < lineTypes >; Sideline class object attribute and flow process class object attribute according to each sideline class < lineTypes>are created the corresponding sideline class component of said sideline class object, and each sideline class component represents at the toolbar of configuration tool;
S204; According to said node class component and sideline class component building work flow process; And define node class object property value, flow process class object property value, the sideline class object property value in the said workflow, promptly define the flow process class object property value and the corresponding sideline class object property value of sideline class object attribute of node class object attribute corresponding nodes class object property value in the said workflow, flow process class object attribute correspondence;
S205 stores said workflow into said application system.
Embodiment three
Fig. 3 is the 3rd a preferred embodiment process flow diagram of a kind of building work flow and method of the present invention, and said method comprises step:
S301 obtains the flow process class configuration information of flow process class object in the application system, the node class configuration information of node class object and the sideline class configuration information of sideline class object according to flow engine;
S302 disposes the flow process class object attribute in the said flow process class configuration information; Dispose the node class object attribute in the said node class configuration information; Dispose the sideline class object attribute in the class configuration information of said sideline;
Said node class object attribute refers to for satisfying visit and the control of flow engine to the node class; The information that said node class object need provide, said node generic attribute comprises node serial number, node title, node location, suggestion territory, processing mode, handler etc.;
Flow process class object attribute comprises process code, flow process title, flow process creation-time, founder etc.;
Sideline class object attribute comprises sideline numbering, sideline title, node serial number, coordinate information etc., perhaps is meant the needs according to different flow engines, needs the attribute of expansion;
S303 retrieves said node class configuration information, creates said node class corresponding nodes class component according to node type, node class object attribute and the flow process class object attribute of node class in the said node class configuration information;
S304 retrieves said sideline class configuration information, creates the corresponding sideline class component of said sideline class object according to the sideline class object attribute and the flow process class object attribute of sideline class in the class configuration information of said sideline;
S305 creates node according to said node class component;
S306 defines the node class object property value of said node;
Be each node class object attribute and give a concrete value, for example define node title nodeTitle property value, node serial number nodeNumber property value, nodes X coordinate attributes value, node Y coordinate attributes value, node suggestion territory ideaFiledName property value, processing mode dealType property value, node processing people's property value, the text authority bodyPurview property value of said node;
S307 creates said internodal sideline according to the sideline class component;
Said sideline is internodal line, and said sideline comprises a plurality of sidelines attribute, and said sideline class object attribute comprises node direction, sideline title, sideline starting point, sideline terminating point, sideline corresponding nodes and sideline coordinate figure etc.;
S308 defines the sideline class object property value in said sideline;
Be each sideline class object attribute and give a concrete value, for example define sideline numbering property value, sideline title attribute value, node serial number property value and the coordinate information property value in said sideline;
Certainly, also need give concrete value, for example define process code, flow process title, flow process creation-time, founder etc. for flow process class object attribute.
For ease of understanding, illustrate, for example create the flow process of asking for instructions andding submit reports, suppose that flow process comprises drafting, departmental manager, person in charge, four nodes of filing;
At first add drafting, departmental manager, person in charge, four nodes of filing through dilatory mode;
Secondly, defining the node attribute values of above-mentioned four nodes, is " departmental manager " like the node title nodeTitle property value that " departmental manager " node is set; The property value that node serial number nodeNumber is set is " nBmjl ", and the property value of nodes X coordinate nodePosX can be generated by system according to node location automatically; Be assumed to 120; The property value of node Y coordinate nodePosY can be generated by system according to node location automatically, is assumed to 120; The property value that node suggestion territory ideaFiledName is set is " fBmjlIdea "; The property value that processing mode dealType is set is " single processing ", and the property value that node processing people processors is set is " departmental manager ", and the property value that text authority bodyPurview is set is " checking ";
Once more, add the sideline and connect said node through dilatory mode;
At last, define the sideline property value in said sideline; As the sideline of making a draft to departmental manager's node direction is set, the property value of sideline numbering lineNumber is generated by system automatically, is assumed to " l1001 "; Sideline title attribute value lineTitle is set is " sending the departmental manager to examine ", the node startNode that this sideline starting point is confirmed is generated by system according to the node that the sideline connects automatically; Its property value is the corresponding nodes numbering, and what this sideline was corresponding is " drafting " node, so its property value is " nStart "; The node endNode that this sideline terminating point is confirmed is generated by system according to the node that the sideline connects automatically, and its property value is the corresponding nodes numbering; What this sideline was corresponding is " departmental manager " node, so its property value is " fBmjlIdea ", property values such as starting point X coordinate startPosX, starting point Y coordinate startPosY, terminating point X coordinate endPosX, terminating point Y coordinate endPosY are generated according to the position, sideline by system automatically; Be assumed to 10; 10,125,125;
S309 obtains type of database according to said type of configuration information and drives;
Just, the type of database that obtains in the database engine configuration information according to said type of configuration information drives;
S310 drives the said workflow of storage according to said type of database;
Just, store said workflow in the said database engine configuration information workflow memory address according to said type of database driving;
S311 loads said workflow;
S312 calls said workflow through said flow engine;
For ease of understanding, illustrate as follows:
After the flow scheme design of finishing the work; Application system is according to the database engine configuration information < flowEngine>in the said XML configuration file; Calling corresponding type of database drives; Like the MySQL Connector/J in this example, and store said workflow into the workflow memory address, like the jdbc:mysql in this example: //localhost:3306/test;
Secondly, application system loads said workflow;
At last, application system is visited said workflow through flow engine, realizes workflow control;
Type of database drives provides sorts of systems permanent storage media, drives the realization flow storage through calling type of database.For workflow of creating and the class object attribute that has defined, the type of database driving is a plurality of database access interfaces, and the database engine configuration information through the XML configuration file conducts interviews to database.
Present embodiment obtains the class configuration information in the application system through flow engine; And according to said class object attribute building work flow process; Thereby the workflow design pattern that has realized striding application platform and striden flow engine utilizes the workflow reusability of embodiment of the invention design high, can manage the flow process configuration concentratedly; Solve the worry that managerial personnel safeguard a plurality of flow process configuration tools simultaneously, greatly reduced the workload of flow process configuration.
Embodiment four
Fig. 4 is the first preferred embodiment structural representation of a kind of building work flow system of the present invention.
Said system comprises deriving means, inking device, creation apparatus, definition device and memory storage;
Said deriving means links to each other with said inking device, is used for obtaining according to flow engine the class configuration information of application system;
Said flow engine is meant the part of workflow as application system, and provides for it core solutions such as the determinative different decision information transmission routes according to role, the division of labor and condition of each application system, content ratings;
Said inking device links to each other with creation apparatus with said deriving means, is used for disposing the respective class object properties of said type of configuration information;
Promptly define said type of configuration information and comprise which class object attribute, and the meaning of said class object attribute representative, and the logical relation between the class object attribute etc.;
Said creation apparatus links to each other with definition device with said inking device, is used for coming the building work flow process according to said class object attribute or the class component created by said class object attribute;
Said workflow is a kind of computation model, and the logic that is about to organize together before and after the work how in the workflow and rule are represented with appropriate model in computing machine and to the calculation that plays tricks in fact; The subject matter that workflow will solve is: for realizing certain business objective, between a plurality of participants, utilize computing machine, transmit document, information or task automatically by certain pre-defined rule; Briefly, workflow is exactly a series of mutual linkings, the business activity of carrying out automatically or task; Can regard the whole service process as Yi Tiaohe, the river that wherein flows through is exactly pending list;
Said definition device links to each other with memory storage with said creation apparatus, is used for defining the corresponding class object property value of said workflow class object attribute;
Said memory storage links to each other with said definition device, is used for storing said workflow into said application system.
The further optimization of such scheme is that said creation apparatus comprises Component Gallery and creates module, is illustrated in figure 5 as the second preferred embodiment structural representation of a kind of building work flow system of the present invention.
Said inking device links to each other with said acquisition module, Component Gallery and establishment module, is used for disposing the class object attribute of said type of configuration information;
Said Component Gallery links to each other with the establishment module with said inking device, is used for creating class component according to said class object attribute;
Said establishment module links to each other with said inking device, Component Gallery and definition device, is used for coming the building work flow process according to said class object attribute or the class component created by said class object attribute;
Said definition device links to each other with memory storage with said establishment module, is used for defining the corresponding class object property value of said workflow class object attribute.
The further optimization of such scheme is that said deriving means comprises first acquisition module, second acquisition module and the 3rd acquisition module; Said inking device comprises first configuration module, second configuration module and the 3rd configuration module; Said Component Gallery comprises node module and sideline module; Said definition device comprises first definition module, second definition module and the 3rd definition module; Be illustrated in figure 6 as the 3rd preferred embodiment structural representation of a kind of building work flow system of the present invention.
Said first acquisition module links to each other with second acquisition module with said first configuration module, is used for obtaining according to flow engine the node class configuration information of application system;
Said second acquisition module links to each other with said first acquisition module, the 3rd acquisition module and second configuration module, is used for obtaining according to flow engine the flow process class configuration information of application system;
Said the 3rd acquisition module links to each other with the 3rd configuration module with said second acquisition module, is used for obtaining according to flow engine the sideline class configuration information of application system;
Said flow process class object, node class object and sideline class object all belong to class object;
The instance of said class object type of being, wherein the flow process class object is the instance of flow process class, and the node class object is the instance of node class, and the sideline class object is the instance of sideline class;
Said class object comprises the class object attribute, and wherein the flow process class object comprises flow process class object attribute, and the node class object comprises node class object attribute, and the sideline class object comprises sideline class object attribute;
And each class object attribute all has corresponding with it class object property value;
Said class object attribute comprises flow process class object attribute, node class object attribute and sideline class object attribute;
Said type of configuration information comprises flow process class configuration information, node class configuration information and sideline class configuration information;
The configuration information of the flow process class configuration information flow process class that refers between a plurality of people, a plurality of department, to circulate wherein, as enterprise commonly used ask flow process configuration information, the civilian flow process configuration information of transmitting-receiving etc. for instructions;
Said node class configuration information refers to the circulation procedural information of the node of needs control in the flow process class, and for example in asking flow process for instructions, said node class configuration information comprises the node class configuration information of nodes such as drafting, departmental manager, person in charge, administration department;
Each flow process class configuration information comprises a plurality of node class configuration informations and sideline class configuration information;
Each node class configuration information comprises node class, node type and a plurality of node generic attribute;
The node class has encapsulated node type and node generic attribute;
Said node type comprises: start node, ordinary node, aggregation node, terminal node and branch node etc.;
Said sideline class configuration information guides the configuration information of the sideline class of leading the workflow circulation direction;
Said first configuration module links to each other with node module with said first acquisition module, second configuration module, is used for disposing the node class object attribute of said node class configuration information;
Said node class object attribute refers to for satisfying visit and the control of flow engine to the node class; The information that said node class object need provide, said node generic attribute comprises node serial number, node title, node location, suggestion territory, processing mode, handler etc.;
Said second configuration module links to each other with said first configuration module, the 3rd configuration module, second acquisition module, node module and sideline module, is used for disposing the flow process class object attribute of said flow process class configuration information;
Flow process class object attribute comprises process code, flow process title, flow process creation-time, founder etc.;
Said the 3rd configuration module links to each other with said second configuration module, the 3rd acquisition module and sideline module, is used for disposing the sideline class object attribute of said sideline class configuration information;
Sideline class object attribute comprises sideline numbering, sideline title, node serial number, coordinate information etc., perhaps is meant the needs according to different flow engines, needs the attribute of expansion;
Can also be with flow process class object attribute, node class object attribute and sideline class object property store after the configuration to the XML configuration file;
Said XML configuration file is divided into two parts, and a part is the database engine configuration information, and said database engine configuration information comprises type of database driving, workflow memory address URL, user name, password etc.; Another part type of being configuration information;
Class object can be according to the unconfined interpolation of the needs of flow engine, and each class object can add a plurality of class object attributes;
Said node module links to each other with said first configuration module, second configuration module and establishment module, is used for creating the node class component according to said node class object attribute and flow process class object attribute;
Said sideline module links to each other with said second configuration module, the 3rd configuration module and establishment module, is used for creating the sideline class component according to said sideline class object attribute and flow process class object attribute;
Usually,, and dynamically generate class component, be specially through parsing class object attribute:
Retrieve each node class configuration information < nodeTypes >; Create said node class corresponding nodes class component according to node type, node class object attribute and the flow process class object attribute of each node class < nodeType >, each node class component represents at the toolbar of configuration tool;
Retrieve each sideline class configuration information < lineTypes >; Sideline class object attribute and flow process class object attribute according to each sideline class < lineTypes>are created the corresponding sideline class component of said sideline class object, and each sideline class component represents at the toolbar of configuration tool;
Said establishment module links to each other with said node module, sideline module, inking device, first definition module, second definition module and the 3rd definition module, also is used for according to said node class component and sideline class component building work flow process;
Said first definition module; Link to each other with memory storage with said establishment module, second definition module; Be used for defining said workflow node class object attribute corresponding nodes class object property value; Be each node class object attribute and give a concrete value, for example define node title nodeTitle property value, node serial number nodeNumber property value, nodes X coordinate attributes value, node Y coordinate attributes value, node suggestion territory ideaFiledName property value, processing mode dealType property value, node processing people's property value, the text authority bodyPurview property value of said node;
Said second definition module links to each other with memory storage with said establishment module, first definition module, the 3rd definition module, is used for defining the corresponding flow process class object property value of said workflow flow process class object attribute;
Be definition flow process class object attribute and give concrete value, for example define process code, flow process title, flow process creation-time, founder etc.;
Said the 3rd definition module links to each other with memory storage with said establishment module, second definition module, is used for defining the corresponding sideline class object property value of said workflow sideline class object attribute;
Be each sideline class object attribute and give a concrete value, for example define sideline numbering property value, sideline title attribute value, node serial number property value and the coordinate information property value in said sideline;
Said memory storage links to each other with said first definition module, second definition module and the 3rd definition module, is used for storing said workflow into said application system.
The further optimization of such scheme is that said node module comprises first retrieval unit and node unit; Said sideline module comprises second retrieval unit and unit, sideline; Be illustrated in figure 7 as the 4th preferred embodiment structural representation of a kind of building work flow system of the present invention.
Said first retrieval unit links to each other with node unit with said first configuration module, is used to retrieve said node class configuration information;
Said node unit; Link to each other with said first retrieval unit, second configuration module and establishment module, be used for creating said node class corresponding nodes class component according to node type, node class object attribute and the flow process class object attribute of said node class configuration information node class;
Said second retrieval unit links to each other with the unit, sideline with said the 3rd configuration module, is used to retrieve said sideline class configuration information;
Unit, said sideline; Link to each other with said second retrieval unit, second configuration module and establishment module, be used for creating the corresponding sideline class component of said sideline class object according to the sideline class object attribute and the flow process class object attribute of class configuration information sideline, said sideline class;
Said establishment module links to each other with said node unit, unit, sideline, inking device, first definition module, second definition module and the 3rd definition module, is used for according to said node class component and sideline class component building work flow process.
The further optimization of such scheme is that said memory storage comprises the 4th acquisition module, memory module, load-on module and calling module, is illustrated in figure 8 as the 5th preferred embodiment structural representation of a kind of building work flow system of the present invention.
Said the 4th acquisition module links to each other with said memory module, is used for obtaining type of database according to said type of configuration information and drives;
Just, the type of database that obtains in the database engine configuration information according to said type of configuration information drives;
Said memory module links to each other with said the 4th acquisition module, load-on module, first definition module, second definition module and the 3rd definition module, is used for driving the said workflow of storage according to said type of database;
Just, store said workflow in the said database engine configuration information workflow memory address according to said type of database driving;
Said first definition module links to each other with memory module with said establishment module, second definition module, is used for defining the node class object property value of said workflow;
Said second definition module links to each other with memory module with said establishment module, first definition module, the 3rd definition module, is used for defining the flow process class object property value of said workflow;
Said the 3rd definition module links to each other with memory module with said establishment module, second definition module, is used for defining the sideline class object property value of said workflow;
Said load-on module links to each other with calling module with said memory module, is used to load said workflow;
Said calling module links to each other with said load-on module, is used for calling said workflow through said flow engine, realizes workflow control.
Type of database drives provides sorts of systems permanent storage media, drives the realization flow storage through calling type of database.For workflow of creating and the class object attribute that has defined, the type of database driving is a plurality of database access interfaces, and the database engine configuration information through the XML configuration file conducts interviews to database.
Giving an example in the present embodiment is identical with the content of embodiment one to three, repeats no more.
Present embodiment obtains the class configuration information in the application system through deriving means according to flow engine; Through the class object attribute in said type of configuration information of inking device configuration; Through creation apparatus according to said class object attribute building work flow process; Define the class object property value in the said workflow through definition device; Store said workflow into said application system through memory storage.Present embodiment has been realized striding application platform, has been striden the workflow design pattern of flow engine; Utilize the workflow reusability of embodiment of the invention design high; Can manage the flow process configuration concentratedly; Solve the worry that managerial personnel safeguard a plurality of flow process configuration tools simultaneously, greatly reduced the workload of flow process configuration.Present embodiment is also created class component through Component Gallery, has realized the visual design process of workflow.
The system of building work flow process provided by the invention need can be applied on the terminal device of building work flow process, for example PC, PDA, mobile phone, server etc.
Those having ordinary skill in the art will appreciate that; All or part of step in realization the foregoing description method can be accomplished through the programmed instruction related hardware; Described program can be stored in the computer read/write memory medium, and described storage medium can be ROM, RAM, disk, CD etc.
The above is merely preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of within spirit of the present invention and principle, being done, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.