CN106155769B - A workflow processing method, device and workflow engine - Google Patents
A workflow processing method, device and workflow engine Download PDFInfo
- Publication number
- CN106155769B CN106155769B CN201510138229.6A CN201510138229A CN106155769B CN 106155769 B CN106155769 B CN 106155769B CN 201510138229 A CN201510138229 A CN 201510138229A CN 106155769 B CN106155769 B CN 106155769B
- Authority
- CN
- China
- Prior art keywords
- business
- workflow
- storage unit
- record
- process object
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 9
- 238000000034 method Methods 0.000 claims abstract description 359
- 238000012545 processing Methods 0.000 claims description 26
- 238000011161 development Methods 0.000 abstract description 12
- 238000010586 diagram Methods 0.000 description 7
- 238000012795 verification Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 3
- 238000005111 flow chemistry technique Methods 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 241000251730 Chondrichthyes Species 0.000 description 1
- 238000004886 process control Methods 0.000 description 1
- 238000011112 process operation Methods 0.000 description 1
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
本发明公开一种工作流处理方法、装置及工作流引擎,所述方法包括:在检测到业务系统启动时,获取存储单元中的流程参数表,并根据流程参数表生成流程对象,以使缓存单元缓存流程对象,流程参数表中包含业务系统预设的流程参数信息;在检测到工作流启动时,从缓存单元中的流程对象中,获取与工作流对应的流程对象,并在处理流程对象之后,更新存储单元中的业务表以及流程记录表;在检测到工作流查询时,从缓存单元中的流程对象中,获取与工作流对应的流程对象,根据流程对象以及存储单元中的流程记录表,拼装并显示流程图。本发明克服了现有工作流定义、开发、部署的工作量较大的问题,提高了工作流开发效率,同时提高Web应用系统的产品化程度。
The invention discloses a workflow processing method, device and workflow engine. The method includes: when detecting that a business system is started, acquiring a process parameter table in a storage unit, and generating a process object according to the process parameter table, so that the cache The unit caches the process object, and the process parameter table contains the process parameter information preset by the business system; when the workflow startup is detected, the process object corresponding to the workflow is obtained from the process object in the cache unit, and the process object is processed. After that, update the business table and the process record table in the storage unit; when the workflow query is detected, obtain the process object corresponding to the workflow from the process object in the cache unit, according to the process object and the process record in the storage unit table, assemble and display the flow chart. The invention overcomes the problem that the existing workflow definition, development and deployment requires a large workload, improves the workflow development efficiency, and at the same time improves the productization degree of the Web application system.
Description
技术领域technical field
本发明涉及计算机技术领域,具体涉及一种工作流处理方法、装置及工作流引擎。The present invention relates to the technical field of computers, in particular to a workflow processing method, device and workflow engine.
背景技术Background technique
由于Web应用系统的灵活性,使得客户对于业务流程的个性化需求异常丰富,同一个Web应用系统针对不同的客户往往会有不同的业务流程实现。Due to the flexibility of the Web application system, customers have extremely rich personalized requirements for business processes. The same Web application system often has different business process implementations for different customers.
开发Web应用系统过程中,为了满足客户业务流程的个性化需求,业务流程需要针对不同项目做个性化配置或开发,对于jbpm、osworkflow、shark等主流工作流引擎,其开发、部署过程比较复杂,这使得Web应用系统的开发成本居高不下。In the process of developing a web application system, in order to meet the individual needs of customer business processes, business processes need to be individually configured or developed for different projects. For mainstream workflow engines such as jbpm, osworkflow, and shark, the development and deployment processes are more complicated. This makes the development cost of Web application system high.
发明内容SUMMARY OF THE INVENTION
本发明所要解决的技术问题是如何提供一种工作流处理方法、装置及工作流引擎,以解决现有的工作流开发工作量较大的问题。The technical problem to be solved by the present invention is how to provide a workflow processing method, device and workflow engine, so as to solve the problem that the existing workflow development workload is relatively large.
为此目的,第一方面,本发明提出一种工作流处理方法,所述方法包括:To this end, in a first aspect, the present invention provides a workflow processing method, the method comprising:
在检测到业务系统启动时,获取存储单元中的流程参数表,并根据所述流程参数表生成流程对象,以使缓存单元缓存所述流程对象,所述流程参数表中包含所述业务系统预设的流程参数信息;When it is detected that the business system is started, the process parameter table in the storage unit is obtained, and a process object is generated according to the process parameter table, so that the cache unit caches the process object, and the process parameter table contains the business system presets. Set process parameter information;
在检测到工作流启动时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,并在处理所述流程对象之后,更新所述存储单元中的业务表以及流程记录表;所述流程记录表为所述存储单元中存储的用于记录流程流转的表;When the startup of the workflow is detected, the process object corresponding to the workflow is obtained from the process object in the cache unit, and after the process object is processed, the business table and the process in the storage unit are updated A record table; the process record table is a table stored in the storage unit for recording process flow;
在检测到工作流查询时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,根据所述流程对象以及所述存储单元中的流程记录表,拼装流程图并显示拼装的流程图。When a workflow query is detected, the process object corresponding to the workflow is obtained from the process objects in the cache unit, and the flowchart is assembled according to the process object and the process record table in the storage unit. Shows the assembly flow chart.
可选的,所述在检测到工作流启动时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,并在处理所述流程对象之后,更新所述存储单元中的业务表以及流程记录表,包括:Optionally, when the startup of the workflow is detected, the process object corresponding to the workflow is obtained from the process object in the cache unit, and after the process object is processed, the storage unit is updated. The business table and process record table in , including:
在检测到工作流启动时,获取所述工作流的流程编码与业务记录标识;When detecting that the workflow is started, obtain the process code and business record identifier of the workflow;
从所述缓存单元缓存的流程对象中,获取与所述流程编码对应的流程对象;Obtain the process object corresponding to the process code from the process object cached by the cache unit;
从所述存储单元中的业务表中,获取与所述业务记录标识对应的业务信息;From the business table in the storage unit, obtain business information corresponding to the business record identifier;
查看所述流程对象与所述业务信息是否匹配,如果不匹配,则发送错误提示信息;如果匹配,则在所述存储单元中的流程记录表中增加流程记录,并更新所述业务表。Check whether the process object matches the business information, if not, send an error message; if it matches, add a process record to the process record table in the storage unit, and update the business table.
可选的,所述在检测到工作流查询时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,根据所述流程对象以及所述存储单元中的流程记录表,拼装并显示流程图,包括:Optionally, when a workflow query is detected, the process object corresponding to the workflow is obtained from the process object in the cache unit, and the process object is obtained according to the process object and the process record in the storage unit. Tables, assemble and display flowcharts, including:
在检测到工作流查询时,获取所述工作流的流程编码与业务记录标识;When a workflow query is detected, the process code and business record identifier of the workflow are obtained;
从所述缓存单元缓存的流程对象中,获取与所述流程编码对应的流程对象;Obtain the process object corresponding to the process code from the process object cached by the cache unit;
从所述存储单元中的业务表中,获取与所述业务记录标识对应的业务信息;From the business table in the storage unit, obtain business information corresponding to the business record identifier;
通过所述流程对象、所述业务信息以及所述存储单元中的流程记录表,拼装并显示流程图。The flowchart is assembled and displayed through the process object, the business information and the process record table in the storage unit.
第二方面,本发明还提出一种工作流引擎,所述工作流引擎包括:In a second aspect, the present invention also provides a workflow engine, the workflow engine includes:
生成单元,用于在检测到业务系统启动时,获取存储单元中的流程参数表,并根据所述流程参数表生成流程对象,以使缓存单元缓存所述流程对象,所述流程参数表中包含所述业务系统预设的流程参数信息;The generating unit is used to obtain the process parameter table in the storage unit when detecting that the business system is started, and generate a process object according to the process parameter table, so that the cache unit caches the process object, and the process parameter table contains Process parameter information preset by the business system;
处理单元,用于在检测到工作流启动时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,并在处理所述流程对象之后,更新所述存储单元中的业务表以及流程记录表;所述流程记录表为所述存储单元中存储的用于记录流程流转的表;a processing unit, configured to obtain a process object corresponding to the workflow from the process objects in the cache unit when the workflow startup is detected, and after processing the process object, update the process object in the storage unit The business table and the process record table; the process record table is a table for recording process flow stored in the storage unit;
查询单元,用于在检测到工作流查询时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,根据所述流程对象以及所述存储单元中的流程记录表,拼装流程图并显示拼装的流程图。a query unit, configured to obtain a process object corresponding to the workflow from the process objects in the cache unit when a workflow query is detected, and according to the process object and the process record table in the storage unit , the assembly flow chart and display the assembly flow chart.
可选的,所述处理单元,包括:Optionally, the processing unit includes:
第一获取子单元,用于在检测到工作流启动时,获取所述工作流的流程编码与业务记录标识;The first acquisition subunit is used to acquire the process code and business record identifier of the workflow when it is detected that the workflow is started;
第二获取子单元,用于从所述缓存单元缓存的流程对象中,获取与所述流程编码对应的流程对象;A second acquisition subunit, configured to acquire the process object corresponding to the process code from the process object cached by the cache unit;
第三获取子单元,用于从所述存储单元中的业务表中,获取与所述业务记录标识对应的业务信息;A third acquiring subunit, configured to acquire business information corresponding to the business record identifier from the business table in the storage unit;
处理子单元,用于查看所述流程对象与所述业务信息是否匹配,如果不匹配,则发送错误提示信息;如果匹配,则在所述存储单元中的流程记录表中增加流程记录,并更新所述业务表。A processing subunit, used to check whether the process object matches the business information, if not, send an error message; if it matches, add a process record in the process record table in the storage unit, and update the business table.
可选的,所述查询单元,包括:Optionally, the query unit includes:
第四获取子单元,用于在检测到工作流查询时,获取所述工作流的流程编码与业务记录标识;a fourth acquiring subunit, configured to acquire the process code and business record identifier of the workflow when the workflow query is detected;
第五获取子单元,用于从所述缓存单元缓存的流程对象中,获取与所述流程编码对应的流程对象;a fifth acquisition subunit, configured to acquire the process object corresponding to the process code from the process object cached by the cache unit;
第六获取子单元,用于从所述存储单元中的业务表中,获取与所述业务记录标识对应的业务信息;The sixth acquiring subunit, for acquiring the business information corresponding to the business record identifier from the business table in the storage unit;
显示子单元,用于通过所述流程对象、所述业务信息以及所述存储单元中的流程记录表,拼装并显示流程图。The display sub-unit is used for assembling and displaying the flowchart through the process object, the business information and the process record table in the storage unit.
第三方面,本发明还提出一种工作流处理装置,所述装置包括:工作流引擎、缓存单元以及存储单元;In a third aspect, the present invention also provides a workflow processing device, the device includes: a workflow engine, a cache unit, and a storage unit;
所述缓存单元,用于缓存所述工作流引擎生成的流程对象;the cache unit, configured to cache the process objects generated by the workflow engine;
所述存储单元,用于存储流程参数表、业务表以及流程记录表。The storage unit is used for storing a process parameter table, a business table and a process record table.
可选的,所述存储单元中的流程参数表包括业务系统预设的流程参数信息,所述流程参数信息包括:流程模板信息、流程状态信息和/或角色信息;Optionally, the process parameter table in the storage unit includes process parameter information preset by the business system, and the process parameter information includes: process template information, process status information and/or role information;
所述流程模板信息包括:流程编码、流程名称、关联的业务表名、关联的业务表主键列名、业务表当前处理人列名、业务表当前状态列名和/或关联的流程记录表名;The process template information includes: process code, process name, associated business table name, associated business table primary key column name, business table current handler column name, business table current state column name and/or associated process record table name;
所述流程状态信息包括:所属流程编码、状态编码、状态名称、对应角色编码和/或下一步状态编码集合;The process state information includes: the process code to which it belongs, the state code, the state name, the corresponding role code and/or the next step state code set;
所述角色信息包括:角色编码和角色名称,所述角色编码关联业务系统中用户和权限,用于权限控制。The role information includes: a role code and a role name, and the role code is associated with a user and authority in the business system and is used for authority control.
可选的,所述流程模板信息、流程状态信息以及角色信息的对应关系为:Optionally, the corresponding relationship between the process template information, process status information and role information is:
一个所述流程模板对应N个所述流程状态,N为正整数;One described flow template corresponds to N described flow states, and N is a positive integer;
一个所述角色信息对应N个所述流程状态。One piece of role information corresponds to N pieces of the process state.
可选的,所述流程记录表包括:流程记录标识、业务记录标识、操作人、操作时间、当前状态编码、下一步状态编码、当前处理人和/或下一步处理人。Optionally, the process record table includes: process record identifier, business record identifier, operator, operation time, current state code, next state code, current handler and/or next handler.
相比于现有技术,本发明的工作流处理方法、装置及工作流引擎通过定义少量参数的方式快速实现流程定义的目的,通过基于状态的流程控制,即流程状态关联角色,角色关联权限和人员,从而简单清晰的界定工作流程,同时提供了流程流转处理及流程记录检索等功能。更为重要的是,通过灵活的高可配置度的参数信息可以满足客户的大部分流程需求,并可通过扩展参数信息的方式扩展流程功能。核心代码简单清晰、高扩展、高可用。克服了现有工作流定义、开发、部署的工作量较大的问题,提高了工作流开发效率,同时提高Web应用系统的产品化程度。Compared with the prior art, the workflow processing method, device and workflow engine of the present invention quickly realize the purpose of process definition by defining a small number of parameters. personnel, so as to define the work process simply and clearly, and provide functions such as process flow processing and process record retrieval. More importantly, most process requirements of customers can be met through flexible and highly configurable parameter information, and process functions can be expanded by extending parameter information. The core code is simple, clear, highly scalable, and highly available. It overcomes the problem of large workload in the definition, development and deployment of the existing workflow, improves the efficiency of workflow development, and at the same time improves the degree of productization of the Web application system.
附图说明Description of drawings
图1为本发明实施例提供的一种工作流处理方法流程图;FIG. 1 is a flowchart of a workflow processing method provided by an embodiment of the present invention;
图2为本发明实施例提供的一种工作流引擎结构图;2 is a structural diagram of a workflow engine provided by an embodiment of the present invention;
图3为本发明实施例提供的一种处理单元结构图;FIG. 3 is a structural diagram of a processing unit according to an embodiment of the present invention;
图4为本发明实施例提供的一种查询单元结构图;4 is a structural diagram of a query unit provided by an embodiment of the present invention;
图5为本发明实施例提供的一种工作流处理装置结构图;FIG. 5 is a structural diagram of a workflow processing apparatus according to an embodiment of the present invention;
图6为本发明实施例提供的一种工作流处理装置的工作流程图;FIG. 6 is a work flow diagram of a workflow processing apparatus provided by an embodiment of the present invention;
图7为本发明实施例提供的通过流程记录检索所获取的数据生成的工作流流程记录的列表网页效果图。FIG. 7 is an effect diagram of a web page of a list of workflow process records generated by data obtained through process record retrieval according to an embodiment of the present invention.
具体实施方式Detailed ways
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。In order to make the purposes, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are the Some, but not all, embodiments are disclosed. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
如图1所示,本实施例公开一种工作流处理方法,所述方法可包括以下步骤:As shown in FIG. 1 , this embodiment discloses a workflow processing method, and the method may include the following steps:
101、在检测到业务系统启动时,获取存储单元中的流程参数表,并根据所述流程参数表生成流程对象,以使缓存单元缓存所述流程对象,所述流程参数表中包含所述业务系统预设的流程参数信息;101. When detecting that the business system is started, obtain the process parameter table in the storage unit, and generate a process object according to the process parameter table, so that the cache unit caches the process object, and the process parameter table contains the business process. Process parameter information preset by the system;
其中,流程参数信息包括:流程模板信息、流程状态信息以及角色信息;The process parameter information includes: process template information, process status information, and role information;
流程模板信息用于记录流程相关的参数信息,至少包括:流程编码、流程名称、关联的业务表名、关联的业务表主键列名、业务表当前处理人列名、业务表当前状态列名以及关联的流程记录表名;Process template information is used to record process-related parameter information, including at least: process code, process name, associated business table name, associated business table primary key column name, business table current processor column name, business table current state column name and The name of the associated process record table;
流程状态信息用于记录流程状态相关的参数信息,至少包括:所属流程编码、状态编码、状态名称、对应角色编码以及下一步状态编码集合;The process state information is used to record the parameter information related to the process state, at least including: the process code to which it belongs, the state code, the state name, the corresponding role code, and the next state code set;
角色信息用于记录业务系统角色相关的参数信息,至少包括:角色编码和角色名称,角色编码关联业务系统中用户和权限,用于权限控制。The role information is used to record the parameter information related to the role of the business system, at least including: role code and role name, the role code is associated with the user and authority in the business system, and is used for authority control.
流程模板信息、流程状态信息以及角色信息的对应关系为:The corresponding relationship between process template information, process status information and role information is:
一个流程模板对应N个流程状态,N为正整数;A process template corresponds to N process states, where N is a positive integer;
一个角色信息对应N个流程状态。One role information corresponds to N process states.
102、在检测到工作流启动时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,并在处理所述流程对象之后,更新所述存储单元中的业务表以及流程记录表;102. When detecting that the workflow is started, obtain the process object corresponding to the workflow from the process object in the cache unit, and after processing the process object, update the business table in the storage unit and process records;
其中,业务表包括:业务信息、流程当前状态以及处理人;Among them, the business table includes: business information, the current state of the process and the processor;
流程记录表用于记录流程流转的信息,至少包括:流程记录标识、业务记录标识、操作人、操作时间、当前状态编码、下一步状态编码、当前处理人以及下一步处理人。其中,下一步状态编码是指当前状态可变更为哪几个状态,通过下一步状态编码可约束流程流转规则,可构建出流程图。The process record table is used to record the information of the process flow, including at least: process record identifier, business record identifier, operator, operation time, current status code, next step status code, current handler and next handler. Among them, the next state code refers to which states the current state can be changed to, and the process flow rules can be constrained by the next state code, and a flowchart can be constructed.
103、在检测到工作流查询时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,根据所述流程对象以及所述存储单元中的流程记录表,拼装并显示流程图。103. When a workflow query is detected, obtain a process object corresponding to the workflow from the process object in the cache unit, and assemble and assemble the process object according to the process object and the process record table in the storage unit. Display the flowchart.
其中,步骤102还可包括以下图1中未示出的子步骤:Wherein,
1021、在检测到工作流启动时,获取所述工作流的流程编码与业务记录标识;1021. When detecting that the workflow is started, obtain the process code and business record identifier of the workflow;
1022、从所述缓存单元缓存的流程对象中,获取与所述流程编码对应的流程对象;1022. Obtain a process object corresponding to the process code from the process object cached by the cache unit;
1023、从所述存储单元中的业务表中,获取与所述业务记录标识对应的业务信息;1023. Obtain business information corresponding to the business record identifier from the business table in the storage unit;
1024、查看所述流程对象与所述业务信息是否匹配,如果不匹配,则发送错误提示信息;如果匹配,则在所述存储单元中的流程记录表中增加流程记录,并更新所述业务表。1024. Check whether the process object matches the business information, if not, send an error message; if it matches, add a process record in the process record table in the storage unit, and update the business table .
其中,步骤103还可包括以下图1中未示出的子步骤:Wherein,
1031、在检测到工作流查询时,获取所述工作流的流程编码与业务记录标识;1031. When a workflow query is detected, obtain the process code and business record identifier of the workflow;
1032、从所述缓存单元缓存的流程对象中,获取与所述流程编码对应的流程对象;1032. Obtain a process object corresponding to the process code from the process object cached by the cache unit;
1033、从所述存储单元中的业务表中,获取与所述业务记录标识对应的业务信息;1033. Obtain business information corresponding to the business record identifier from the business table in the storage unit;
1034、根据所述流程对象、所述业务信息以及所述存储单元中的流程记录表,拼装并显示流程图。1034. Assemble and display a flowchart according to the process object, the business information, and the process record table in the storage unit.
在具体应用中,流程模板信息还可扩展其他配置信息,比如参与信息统计(业务系统的另一个功能模块,即信息统计模块)的状态编码等。In a specific application, the process template information can also be extended with other configuration information, such as the status code of participating in information statistics (another functional module of the business system, that is, the information statistics module).
在具体应用中,流程状态信息还可扩展其他配置信息,比如状态关联的菜单,即业务系统查看业务信息的导航菜单(点击菜单只显示处于关联该菜单的状态的业务记录)。In a specific application, the process status information can also be extended to other configuration information, such as the menu associated with the status, that is, the navigation menu for the business system to view business information (clicking on the menu only displays business records in the state associated with the menu).
上述实施例采用配置化参数来存储自定义业务流程信息,提供了简单易用的流程流转处理及流程记录检索功能,所以克服了现有工作流定义、开发、部署的工作量较大的问题,提高了工作流开发效率。The above-mentioned embodiments use configuration parameters to store self-defined business process information, provide simple and easy-to-use process flow processing and process record retrieval functions, and thus overcome the problem that the existing workflow definition, development, and deployment require large workloads. Improve workflow development efficiency.
上述实施例能够通过定义少量参数的方式快速实现流程定义的目的,通过基于状态的流程控制,即流程状态关联角色,角色关联权限和人员,从而简单清晰的界定工作流程,同时提供了流程流转处理及流程记录检索等功能。更为重要的是,通过灵活的高可配置度的参数信息可以满足客户的大部分流程需求,并可通过扩展参数信息的方式扩展流程功能。核心代码简单清晰、高扩展、高可用。本实施例扩展了核心模块,增加了流程提交页面通用模块,流程记录查看页面通用模块,使得在具体项目中,可使用一套代码,仅通过配置流程定义参数的方式即可实现工作流流转、流程记录及进度查看等功能,所以克服了现有工作流定义、开发、部署的工作量较大的问题,提高了工作流开发效率,同时提高Web应用系统的产品化程度。The above embodiment can quickly achieve the purpose of process definition by defining a small number of parameters, and through state-based process control, that is, process states are associated with roles, roles are associated with permissions and personnel, so as to define the workflow simply and clearly, and provide process flow processing. and process record retrieval and other functions. More importantly, most process requirements of customers can be met through flexible and highly configurable parameter information, and process functions can be expanded by extending parameter information. The core code is simple, clear, highly scalable, and highly available. This embodiment expands the core module, adds a general module for the process submission page, and a general module for the process record viewing page, so that in a specific project, a set of codes can be used, and workflow flow can be realized only by configuring process definition parameters. Process recording and progress viewing functions, so it overcomes the problem of large workload of existing workflow definition, development, and deployment, improves the efficiency of workflow development, and improves the degree of productization of Web application systems.
如图2所示,本实施例公开一种工作流引擎,所述工作流引擎可包括以下单元:生成单元21、处理单元22以及查询单元23;As shown in FIG. 2 , this embodiment discloses a workflow engine, and the workflow engine may include the following units: a generating unit 21, a processing unit 22, and a query unit 23;
生成单元21,用于在检测到业务系统启动时,获取存储单元中的流程参数表,并根据所述流程参数表生成流程对象,以使缓存单元缓存所述流程对象,所述流程参数表中包含所述业务系统预设的流程参数信息;The generating unit 21 is configured to acquire the process parameter table in the storage unit when it is detected that the business system is started, and generate a process object according to the process parameter table, so that the cache unit caches the process object, and the process parameter table is in the process parameter table. Contains process parameter information preset by the business system;
处理单元22,用于在检测到工作流启动时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,并在处理所述流程对象之后,更新所述存储单元中的业务表以及流程记录表;The processing unit 22 is configured to acquire the process object corresponding to the workflow from the process objects in the cache unit when the startup of the workflow is detected, and after processing the process object, update the storage unit The business table and process record table in the;
查询单元23,用于在检测到工作流查询时,从所述缓存单元中的流程对象中,获取与所述工作流对应的流程对象,根据所述流程对象以及所述存储单元中的流程记录表,拼装并显示流程图。The query unit 23 is configured to, when a workflow query is detected, obtain a process object corresponding to the workflow from the process objects in the cache unit, and obtain the process object corresponding to the workflow according to the process object and the process record in the storage unit table, assemble and display the flow chart.
如图3所示,处理单元22还可包括以下子单元:As shown in FIG. 3, the processing unit 22 may also include the following subunits:
第一获取子单元221,用于在检测到工作流启动时,获取所述工作流的流程编码与业务记录标识;The first acquisition subunit 221 is used to acquire the process code and business record identifier of the workflow when it is detected that the workflow is started;
第二获取子单元222,用于从所述缓存单元缓存的流程对象中,获取与所述流程编码对应的流程对象;The second acquisition subunit 222 is configured to acquire the process object corresponding to the process code from the process object cached by the cache unit;
第三获取子单元223,用于从所述存储单元中的业务表中,获取与所述业务记录标识对应的业务信息;The third obtaining subunit 223 is configured to obtain business information corresponding to the business record identifier from the business table in the storage unit;
处理子单元224,用于查看所述流程对象与所述业务信息是否匹配,如果不匹配,则发送错误提示信息;如果匹配,则在所述存储单元中的流程记录表中增加流程记录,并更新所述业务表。The processing subunit 224 is used to check whether the process object matches the business information, if not, send an error message; if it matches, add a process record in the process record table in the storage unit, and Update the business table.
如图4所示,查询单元23还可包括以下子单元:As shown in FIG. 4, the query unit 23 may further include the following subunits:
第四获取子单元231,用于在检测到工作流查询时,获取所述工作流的流程编码与业务记录标识;The fourth acquisition subunit 231 is used to acquire the process code and business record identifier of the workflow when the workflow query is detected;
第五获取子单元232,用于从所述缓存单元缓存的流程对象中,获取与所述流程编码对应的流程对象;The fifth acquisition subunit 232 is used to acquire the process object corresponding to the process code from the process object cached by the cache unit;
第六获取子单元233,用于从所述存储单元中的业务表中,获取与所述业务记录标识对应的业务信息;The sixth obtaining subunit 233 is used to obtain the business information corresponding to the business record identifier from the business table in the storage unit;
显示子单元234,用于根据所述流程对象、所述业务信息以及所述存储单元中的流程记录表,拼装并显示流程图。The display subunit 234 is configured to assemble and display the flowchart according to the process object, the business information and the process record table in the storage unit.
本实施例的工作流引擎前述图1实施例所述的流程,本实施例不再详述。The workflow engine of this embodiment has the process described in the foregoing embodiment in FIG. 1 , which is not described in detail in this embodiment.
如图5所示,本实施例公开一种工作流处理装置,所述装置包括图2实施例所述的工作流引擎51、缓存单元52以及存储单元53;As shown in FIG. 5 , this embodiment discloses a workflow processing apparatus, and the apparatus includes the workflow engine 51 , the cache unit 52 and the storage unit 53 described in the embodiment of FIG. 2 ;
所述工作流引擎51包括生成单元21、处理单元22和查询单元23;The workflow engine 51 includes a generating unit 21, a processing unit 22 and a query unit 23;
所述缓存单元52,用于缓存所述工作流引擎生成的流程对象;The cache unit 52 is configured to cache the process objects generated by the workflow engine;
所述存储单元53,用于存储流程参数表、业务表以及流程记录表。The storage unit 53 is used to store a process parameter table, a business table and a process record table.
如图6所示,本实施例公开图5中工作流处理装置实施例的工作流程,包括以下步骤:As shown in FIG. 6 , this embodiment discloses the workflow of the embodiment of the workflow processing apparatus in FIG. 5 , including the following steps:
601、工作流引擎51在检测到业务系统启动时,获取存储单元53中的流程参数表;601. The workflow engine 51 acquires the process parameter table in the storage unit 53 when detecting that the business system is started;
602、工作流引擎51根据流程参数表生成流程对象,以使缓存单元52缓存流程对象;流程参数表中包含业务系统预设的流程参数信息602. The workflow engine 51 generates a process object according to the process parameter table, so that the cache unit 52 caches the process object; the process parameter table contains the process parameter information preset by the business system
603、工作流引擎51在检测到工作流启动时,从缓存单元52中的流程对象中,获取与工作流对应的流程对象;603. When the workflow engine 51 detects that the workflow is started, it acquires the process object corresponding to the workflow from the process object in the cache unit 52;
604、工作流引擎51在处理流程对象之后,更新存储单元53中的业务表以及流程记录表;604. After the workflow engine 51 processes the flow object, it updates the business table and the flow record table in the storage unit 53;
605、工作流引擎51在检测到工作流查询时,从缓存单元52中的流程对象中,获取与工作流对应的流程对象;605. When the workflow engine 51 detects the workflow query, it acquires the process object corresponding to the workflow from the process object in the cache unit 52;
606、工作流引擎51根据流程对象以及存储单元53中的流程记录表,拼装并显示流程图。606 . The workflow engine 51 assembles and displays the flowchart according to the process object and the process record table in the storage unit 53 .
步骤601中工作流引擎51读取流程参数表中流程信息,依次读取流程模板记录,流程状态记录。具体为:首先获取所有流程模板信息,然后根据流程模板信息中的流程编码获取相应流程状态信息。In
步骤602中工作流引擎51对每条流程模板记录生成一个流程对象,将流程编码、流程名称等相关信息作为该对象的属性,并将流程状态信息也作为该对象的属性。In
步骤601和602称为初始化过程。
步骤603和604称为流程流转过程。
步骤603中工作流引擎51根据流程编码获取流程对象。In
步骤604具体包括以下子步骤:Step 604 specifically includes the following sub-steps:
6041、根据业务记录标识获取业务表中与流程相关的信息,包括当前处理人、当前状态等。6041. Acquire information related to the process in the business table according to the business record identifier, including the current handler, the current state, and the like.
6042、根据流程对象、业务表中流程相关信息,进行流程操作有效性校验,包括调用方法参数中当前处理人是否正确,当前状态是否正确,下一状态是否在当前状态对象的下一步状态编码集合中,其他特殊校验(通过操作参数控制启用何种特殊校验)。校验失败则返回错误提示,校验通过后继续。6042. Perform the validity check of the process operation according to the process-related information in the process object and the business table, including whether the current handler in the calling method parameters is correct, whether the current state is correct, and whether the next state is the next state code of the current state object In the set, other special verifications (which special verifications are enabled through operation parameters). If the verification fails, an error message will be returned, and the verification will continue after the verification is passed.
6043、新增一条流程处理记录。6043. Add a process processing record.
6044、更新业务表数据,包括当前处理人、当前状态、其他业务信息。6044. Update the business table data, including the current handler, the current state, and other business information.
步骤605和606称为流程记录检索过程。
步骤605中工作流引擎51根据流程编码获取流程对象。In step 605, the workflow engine 51 acquires the process object according to the process code.
步骤606具体包括以下子步骤:Step 606 specifically includes the following sub-steps:
6061、根据业务记录标识获取业务表中与流程相关的信息,包括当前处理人、当前状态等。6061. Acquire information related to the process in the business table according to the business record identifier, including the current handler, the current state, and the like.
6062、根据流程对象拼装流程图信息(通过流程状态参数中流程编码和下一步状态编码集合可构建出流程图),返回流程图信息和操作记录信息。6062. Assemble the flow chart information according to the flow object (the flow chart can be constructed by the set of flow codes in the flow state parameter and the next state code), and return the flow chart information and operation record information.
图7示出了通过流程记录检索所获取的数据生成的工作流流程记录的列表网页效果图。FIG. 7 shows a web page effect diagram of the workflow process record generated by the data acquired through the process record retrieval.
从以上实施例中可以看出,本发明实现了如下技术效果:As can be seen from the above embodiments, the present invention has achieved the following technical effects:
1、高可配置度,通过修改少量的流程配置参数即能够满足客户的大部分业务流程需求;1. High configurability, by modifying a small number of process configuration parameters, it can meet most of the business process needs of customers;
2、核心模块简单、可扩展,对于流程的特殊校验、特殊处理,只需开发相应的功能模块,在流程流转中做相应引用及开关,通过操作参数做相应控制;2. The core module is simple and extensible. For the special verification and special processing of the process, it is only necessary to develop the corresponding functional module, make corresponding references and switches in the process flow, and perform corresponding control through the operation parameters;
3、控制版本分支,不同项目的个性化流程需求仅通过少量的流程配置信息来控制,而主体代码则保证只有一套。3. Control the version branch. The individualized process requirements of different projects are only controlled by a small amount of process configuration information, and the main code is guaranteed to have only one set.
这样,同一应用系统不同项目之间,由大量流程配置文件及业务处理代码转化为少量的流程参数差异,最大程度地释放了开发资源,甚至可由实施人员来进行流程配置,同时也降低了项目版本的差异,从而降低了项目成本。In this way, between different projects of the same application system, a large number of process configuration files and business processing codes are converted into a small number of process parameter differences, which frees up development resources to the greatest extent, and can even be configured by implementers. differences, thereby reducing project costs.
需要说明的是,本文中的“第一”至“第六”仅用来区分不同实体,并不代表实体间的关系或顺序。It should be noted that the "first" to "sixth" in this document are only used to distinguish different entities, and do not represent the relationship or sequence between the entities.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device, which can be centralized on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they can be implemented with program codes executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or they can be integrated into The multiple modules or steps are fabricated into a single integrated circuit module. As such, the present invention is not limited to any particular combination of hardware and software.
虽然结合附图描述了本发明的实施方式,但是本领域技术人员可以在不脱离本发明的精神和范围的情况下做出各种修改和变型,这样的修改和变型均落入由所附权利要求所限定的范围之内。Although the embodiments of the present invention have been described with reference to the accompanying drawings, various modifications and variations can be made by those skilled in the art without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope of the appended claims within the limits of the requirements.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510138229.6A CN106155769B (en) | 2015-03-26 | 2015-03-26 | A workflow processing method, device and workflow engine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510138229.6A CN106155769B (en) | 2015-03-26 | 2015-03-26 | A workflow processing method, device and workflow engine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106155769A CN106155769A (en) | 2016-11-23 |
CN106155769B true CN106155769B (en) | 2019-10-15 |
Family
ID=57339555
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510138229.6A Expired - Fee Related CN106155769B (en) | 2015-03-26 | 2015-03-26 | A workflow processing method, device and workflow engine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106155769B (en) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107016482A (en) * | 2016-12-12 | 2017-08-04 | 蔚来汽车有限公司 | service state management method and system |
CN107016591B (en) * | 2016-12-12 | 2021-03-23 | 蔚来(安徽)控股有限公司 | Business state management method and system |
CN106934555B (en) * | 2017-03-21 | 2020-11-10 | 广州视源电子科技股份有限公司 | Workflow organization method and device, computer equipment and storage medium |
CN107239324B (en) * | 2017-05-22 | 2020-12-11 | 创新先进技术有限公司 | Service flow processing method, device and system |
CN107451294B (en) * | 2017-08-17 | 2021-04-16 | 北京润科通用技术有限公司 | Data interaction method and device |
CN109472540B (en) * | 2017-09-07 | 2021-11-02 | 北京京东尚科信息技术有限公司 | Service processing method and device |
CN107895249B (en) * | 2017-11-25 | 2021-02-09 | 深圳市易达云科技有限公司 | Order state presenting method and system |
CN109389299B (en) * | 2018-09-26 | 2023-10-31 | 中国平安人寿保险股份有限公司 | Workflow process deployment method, workflow process deployment device, computer equipment and storage medium |
CN109872032A (en) * | 2018-12-29 | 2019-06-11 | 广州兴森快捷电路科技有限公司 | A kind of product process flow write method, device, equipment and storage medium |
CN114327444A (en) * | 2022-01-04 | 2022-04-12 | 京东科技控股股份有限公司 | Service information processing method and device, electronic device, storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101807272A (en) * | 2010-03-24 | 2010-08-18 | 上海普元信息技术有限责任公司 | System structure and method for realizing integrities of process affairs and business affairs in workflow system |
CN102254246A (en) * | 2011-06-17 | 2011-11-23 | 中国建设银行股份有限公司 | Workflow managing method and system |
CN102521712A (en) * | 2011-12-27 | 2012-06-27 | 东软集团股份有限公司 | Process instance data processing method and device |
CN103208046A (en) * | 2012-12-31 | 2013-07-17 | 广州奥凯信息咨询有限公司 | Workflow engine architecture method and system based on interactive dynamic flow diagram |
-
2015
- 2015-03-26 CN CN201510138229.6A patent/CN106155769B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101807272A (en) * | 2010-03-24 | 2010-08-18 | 上海普元信息技术有限责任公司 | System structure and method for realizing integrities of process affairs and business affairs in workflow system |
CN102254246A (en) * | 2011-06-17 | 2011-11-23 | 中国建设银行股份有限公司 | Workflow managing method and system |
CN102521712A (en) * | 2011-12-27 | 2012-06-27 | 东软集团股份有限公司 | Process instance data processing method and device |
CN103208046A (en) * | 2012-12-31 | 2013-07-17 | 广州奥凯信息咨询有限公司 | Workflow engine architecture method and system based on interactive dynamic flow diagram |
Non-Patent Citations (3)
Title |
---|
"EOS工作流引擎工作原理";huanggushan;《https://www.docin.com/p-369719523.html?docfrom=rrela》;20120325;第1-106页 * |
"Workflow Engine Integration in JSLEE AS";Mauro Femminella 等;《IEEE Communications Letters 》;20111013;第15卷(第12期);第1405-1407页 * |
"面向工作内容驱动的分布式缓存体系研究与实现";张堂华;《中国优秀硕士学位论文全文数据库 信息科技辑》;20140315(第03期);第1-11页 * |
Also Published As
Publication number | Publication date |
---|---|
CN106155769A (en) | 2016-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106155769B (en) | A workflow processing method, device and workflow engine | |
US11093377B2 (en) | Systems and methods for testing source code | |
US10740090B2 (en) | Efficient application patching in heterogeneous computing environments | |
US20200387443A1 (en) | Systems and methods for testing source code | |
US10503493B2 (en) | Distributed versioning of applications using cloud-based systems | |
JP6967534B2 (en) | Resource allocation for database provisioning | |
US10503482B2 (en) | Object mapping using intrinsic persistence metadata and pattern-based rules for mapping transformation | |
CN111930521A (en) | Method and device for deploying application, electronic equipment and readable storage medium | |
JP6011479B2 (en) | Application management apparatus, application management system, and program | |
JP7397094B2 (en) | Resource configuration method, resource configuration device, computer equipment, and computer program | |
US20220398249A1 (en) | Efficient extraction of large data sets from a database | |
CN103164525B (en) | WEB application dissemination method and device | |
JP2016521391A (en) | Contextual local image recognition dataset | |
CN112015468B (en) | Interface document processing method and device, electronic equipment and storage medium | |
CN108509207A (en) | The cross-system of WEB application program is installed | |
CN108319554B (en) | Application function testing method, computer readable storage medium and terminal device | |
JP2016518647A (en) | Campaign optimization for experience content datasets | |
US20150081832A1 (en) | Managing seed data | |
CN111796851B (en) | Client base library updating method and device, electronic equipment and storage medium | |
US10109094B2 (en) | Interface to index and display geospatial data | |
CN111831325A (en) | Method, device, system and medium for updating configuration file in application | |
CN109241350A (en) | The display methods and device of a kind of standard operating procedure in server production process | |
CN112559913B (en) | Data processing method, device, computing equipment and readable storage medium | |
CN108052335A (en) | Data managing method, device, computing device and storage medium | |
CN114661274A (en) | Method and device for generating intelligent contract |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220620 Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031 Patentee after: New founder holdings development Co.,Ltd. Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd. Address before: 100871, fangzheng building, 298 Fu Cheng Road, Beijing, Haidian District Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd. Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20191015 |