Interaction method and device based on process engine and dynamic form

文档序号:134958 发布日期:2021-10-22 浏览:24次 中文

阅读说明:本技术 一种基于流程引擎与动态表单的交互方法及装置 (Interaction method and device based on process engine and dynamic form ) 是由 张铁山 陈嘉斌 宋世瑜 肖玄 于 2021-06-21 设计创作,主要内容包括:本发明公开了一种基于流程引擎与动态表单的交互方法及装置,其中方法包括根据所述待处理业务流程的定义配置数据,得到对应的各个流程节点;获取与各个所述流程节点关联的表单队列;基于所述定义配置数据,创建所述待处理业务流程对应的流程实例;依次更新与所述流程实例相关联的所述表单队列中的对应表单。本发明实施例提供的基于流程引擎与动态表单的交互方法及装置,通过配置基于流程引擎与动态表单的交互策略,将流程引擎与动态表单进行有效关联,从而提高了业务流程的灵活性,实现了通用业务流程的可配置化。(The invention discloses an interaction method and device based on a process engine and a dynamic form, wherein the method comprises the steps of obtaining corresponding process nodes according to definition configuration data of a to-be-processed business process; acquiring a form queue associated with each flow node; based on the definition configuration data, creating a process instance corresponding to the business process to be processed; and sequentially updating the corresponding forms in the form queue associated with the process instance. According to the interaction method and device based on the process engine and the dynamic form, provided by the embodiment of the invention, the process engine and the dynamic form are effectively associated by configuring the interaction strategy based on the process engine and the dynamic form, so that the flexibility of the business process is improved, and the configurability of the general business process is realized.)

1. An interactive method based on a process engine and a dynamic form is characterized by comprising the following steps:

obtaining corresponding process nodes according to the definition configuration data of the service process to be processed;

acquiring a form queue associated with each flow node;

based on the definition configuration data, creating a process instance corresponding to the business process to be processed;

and sequentially updating the corresponding forms in the form queue associated with the process instance.

2. The method of claim 1, wherein the configuration data comprises a first process information data and a second process information data;

the step of obtaining corresponding process nodes according to the definition configuration data of the service process to be processed specifically comprises the following steps:

defining the first flow information data according to the specification of BPMN;

determining the second process information data based on the name, the creation time, the creator and the creation version of the business process to be processed;

configuring a process node corresponding to the first process information data according to the specification of the BPMN;

configuring a process node corresponding to the second process information data based on preset user-defined process node data, wherein the preset user-defined process node data at least comprises: node name data, node identification data, node encoding data, node type data and node task deadline data.

3. The process engine and dynamic form based interaction method of claim 2, wherein after obtaining the form queue associated with each of the process nodes, the method further comprises:

issuing the first process information data through a process engine;

and respectively storing the second process information data, the process nodes corresponding to the second process information data and the form queue.

4. The interaction method based on the process engine and the dynamic form as claimed in claim 2, wherein the creating of the process instance corresponding to the business process to be processed based on the definition configuration data specifically comprises:

respectively reading the second process information data and the process nodes corresponding to the second process information data;

completing and storing the form information in the form queue corresponding to the process node corresponding to the second process information data;

creating, by a process engine, a process instance associated with the form information.

5. The interaction method based on the process engine and the dynamic form as claimed in claim 1, wherein the sequentially updating the corresponding forms in the form queue associated with the process instance specifically comprises:

reading each form associated with each node of the process instance in turn;

and updating each form associated with each node of the process instance based on the information of the handler corresponding to each node.

6. An interaction device based on a process engine and a dynamic form, comprising a controller configured to:

obtaining corresponding process nodes according to the definition configuration data of the service process to be processed;

acquiring a form queue associated with each flow node;

based on the definition configuration data, creating a process instance corresponding to the business process to be processed;

and sequentially updating the corresponding forms in the form queue associated with the process instance.

7. The interaction apparatus based on a process engine and a dynamic form according to claim 6, wherein the definition configuration data comprises a first process information data and a second process information data;

the controller is further configured to:

defining the first flow information data according to the specification of BPMN;

determining the second process information data based on the name, the creation time, the creator and the creation version of the business process to be processed;

configuring a process node corresponding to the first process information data according to the specification of the BPMN;

configuring a process node corresponding to the second process information data based on preset user-defined process node data, wherein the preset user-defined process node data at least comprises: node name data, node identification data, node encoding data, node type data and node task deadline data.

8. The flow engine and dynamic form based interaction device of claim 7, wherein the controller is further configured to:

issuing the first process information data through a process engine;

and respectively storing the second process information data, the process nodes corresponding to the second process information data and the form queue.

9. The flow engine and dynamic form based interaction device of claim 7, wherein the controller is further configured to:

respectively reading the second process information data and the process nodes corresponding to the second process information data;

completing and storing the form information in the form queue corresponding to the process node corresponding to the second process information data;

creating, by a process engine, a process instance associated with the form information.

10. The flow engine and dynamic form based interaction device of claim 6, wherein the controller is further configured to:

reading each form associated with each node of the process instance in turn;

and updating each form associated with each node of the process instance based on the information of the handler corresponding to each node.

Technical Field

The invention relates to the technical field of computer control, in particular to an interaction method and device based on a process engine and a dynamic form.

Background

The business refers to the affairs that need to be processed in each business, the business process refers to a series of activities that are respectively and jointly completed by different people in order to achieve a specific value target, the activities are limited by strict sequence, and the content, the mode, the responsibility and the like of the activities also need to be arranged and defined clearly, so that the transfer and the handover of different activities among different post roles are possible.

At present, business processes are solidified in an information system of a computer program, in practical application, the change of the business can cause that a process engine is difficult to realize effective information integration, the flexibility is poor, and because a dynamic form relates to data circulation and state transition among nodes, the user definition of the form is difficult to realize, and the configurable capability is weak.

Disclosure of Invention

The invention provides an interaction method and device based on a process engine and a dynamic form, which aims to solve the technical problem that the flexibility and the configurability of the traditional workflow are poor in the implementation process.

In order to solve the above technical problem, an embodiment of the present invention provides an interaction method based on a process engine and a dynamic form, including:

obtaining corresponding process nodes according to the definition configuration data of the service process to be processed;

acquiring a form queue associated with each flow node;

based on the definition configuration data, creating a process instance corresponding to the business process to be processed;

and sequentially updating the corresponding forms in the form queue associated with the process instance.

As one of the preferable schemes, the definition configuration data includes first procedure information data and second procedure information data;

the step of obtaining corresponding process nodes according to the definition configuration data of the service process to be processed specifically comprises the following steps:

defining the first flow information data according to the specification of BPMN;

determining the second process information data based on the name, the creation time, the creator and the creation version of the business process to be processed;

configuring a process node corresponding to the first process information data according to the specification of the BPMN;

configuring a process node corresponding to the second process information data based on preset user-defined process node data, wherein the preset user-defined process node data at least comprises: node name data, node identification data, node encoding data, node type data and node task deadline data.

As one preferable scheme, after obtaining the form queues associated with the flow nodes, the method further includes:

issuing the first process information data through a process engine;

and respectively storing the second process information data, the process nodes corresponding to the second process information data and the form queue.

As one of the preferable solutions, the creating a process instance corresponding to the to-be-processed business process based on the definition configuration data specifically includes:

respectively reading the second process information data and the process nodes corresponding to the second process information data;

completing and storing the form information in the form queue corresponding to the process node corresponding to the second process information data;

creating, by a process engine, a process instance associated with the form information.

As one of the preferable schemes, the sequentially updating the corresponding forms in the form queue associated with the process instance specifically includes:

reading each form associated with each node of the process instance in turn;

and updating each form associated with each node of the process instance based on the information of the handler corresponding to each node.

Another embodiment of the present invention provides an interaction apparatus based on a process engine and a dynamic form, including a controller configured to:

obtaining corresponding process nodes according to the definition configuration data of the service process to be processed;

acquiring a form queue associated with each flow node;

based on the definition configuration data, creating a process instance corresponding to the business process to be processed;

and sequentially updating the corresponding forms in the form queue associated with the process instance.

As one of the preferable schemes, the definition configuration data includes first procedure information data and second procedure information data;

the controller is further configured to:

defining the first flow information data according to the specification of BPMN;

determining the second process information data based on the name, the creation time, the creator and the creation version of the business process to be processed;

configuring a process node corresponding to the first process information data according to the specification of the BPMN;

configuring a process node corresponding to the second process information data based on preset user-defined process node data, wherein the preset user-defined process node data at least comprises: node name data, node identification data, node encoding data, node type data and node task deadline data.

As one of the preferable schemes, the controller is further configured to:

issuing the first process information data through a process engine;

and respectively storing the second process information data, the process nodes corresponding to the second process information data and the form queue.

As one of the preferable schemes, the controller is further configured to:

respectively reading the second process information data and the process nodes corresponding to the second process information data;

completing and storing the form information in the form queue corresponding to the process node corresponding to the second process information data;

creating, by a process engine, a process instance associated with the form information.

As one of the preferable schemes, the controller is further configured to:

reading each form associated with each node of the process instance in turn;

and updating each form associated with each node of the process instance based on the information of the handler corresponding to each node.

Compared with the prior art, the embodiment of the invention has the advantages that at least one point is as follows: integrating the process and the form by configuring a perfect interaction strategy, generating a specific executable process instance according to the process definition, and finally running the process instance until the updating is completed. The workflow engine and the dynamic form are separated in the whole process, the two technologies are mutually independent, the work coordination between the process engine and the form is optimized, in addition, each business process can be independently developed, the configurability of general business can be realized, the development workload is reduced, more importantly, the relationship between the process and the form is a many-to-many relationship, and the relationship is related to the form through the nodes of the process, so that the wedging degree of the process and the form is improved, and the effect of loose coupling between modules is realized.

Drawings

FIG. 1 is a flow chart diagram of a method for interaction between a flow engine and a dynamic form according to an embodiment of the present invention.

Detailed Description

The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

In the description of the present application, the terms "first", "second", "third", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any number of technical features indicated. Thus, features defined as "first," "second," "third," etc. may explicitly or implicitly include one or more of the features. In the description of the present application, "a plurality" means two or more unless otherwise specified.

In the description of the present application, it is to be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art.

In the description of the present application, it is to be noted that, unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention, as those skilled in the art will recognize the specific meaning of the terms used in the present application in a particular context.

An embodiment of the present invention provides an interaction method based on a process engine and a dynamic form, and specifically, referring to fig. 1, fig. 1 is a schematic flow diagram of an interaction method based on a process engine and a dynamic form in an embodiment of the present invention, where the schematic flow diagram includes:

s1, obtaining corresponding process nodes according to the definition configuration data of the service process to be processed;

s2, acquiring form queues associated with the flow nodes;

s3, creating a process instance corresponding to the business process to be processed based on the definition configuration data;

and S4, sequentially updating the corresponding forms in the form queue associated with the process instance.

It should be noted that, in the embodiment of the present invention, the workflow engine is an application program for managing and scheduling processes, and may be integrated and used as a program framework, including storage of process definitions, nodes of processes, and functions of process condition judgment and scheduling, flow direction management, process instance management, and the like. In this embodiment, BPM (business process modeling) is preferably performed through BPMN (business process modeling language), and the responsibility range of the workflow engine is to coordinate, execute, and record the execution process and result of the process, considering that the workflow engine can be used to conveniently define and develop the process, if the business development needs to be performed, the business logic is often required to be embedded into the listener of the workflow execution, and at this time, a developer is required to associate the process definition with the form in a hard coding manner, which results in higher coupling degree between the process and the business application program and higher difficulty in upgrading and maintenance, and also violates the concept of business independence and loose coupling between the modules, therefore, by separating the workflow engine and the dynamic form, the two technologies are independent from each other, and can also be upgraded independently without affecting the other technology, meanwhile, each technology is more convenient to upgrade and maintain, so that the work coordination between the process engine and the form is optimized.

In addition, the present embodiment is directed to the integration of a workflow engine and a dynamic form, and the workflow engine supporting the current mainstream includes, but is not limited to, JBPM, activti, Flowable, Camunda, JFlow, Osworkflow, and the like.

Further, in the above-described embodiment, the definition configuration data includes first flow information data and second flow information data;

the step of obtaining corresponding process nodes according to the definition configuration data of the service process to be processed specifically comprises the following steps:

defining the first flow information data according to the specification of BPMN;

determining the second process information data based on the name, the creation time, the creator and the creation version of the business process to be processed;

configuring a process node corresponding to the first process information data according to the specification of the BPMN;

configuring a process node corresponding to the second process information data based on preset user-defined process node data, wherein the preset user-defined process node data at least comprises: node name data, node identification data, node encoding data, node type data and node task deadline data.

The configuration data for definition in step S1 is a flow definition, which is mainly used to facilitate the integration of the flow and the form (i.e. the associated form queue in step S2), and for easy understanding, the flow definition specifically includes the following steps:

s11, defining flow information according to the specification of BPMN;

s12, adding basic information of the custom flow (such as the name of the flow, the creation time of the flow, the creator of the flow and the version of the flow);

s13, defining information of the flow nodes according to the specification of the BPMN;

and S14, associating the self-defined flow nodes with the forms (the relationship between the flow and the forms is a many-to-many relationship, and the flow nodes can only correspond to one form).

Further, in the above embodiment, after the step of implementing the flow definition, a process of the flow definition is further included, and the process step includes:

s21, reading the defined configuration information, i.e. the BPMN specification part and the custom part (the reading process is executed by a computer program and is not described herein again);

s22, issuing the first flow information data (namely BPMN specification information) through a flow engine;

and S23, respectively storing the second process information data, the process nodes corresponding to the second process information data and the form queue in a persistent mode, and preferably storing the second process information data, the process nodes corresponding to the second process information data and the form queue into corresponding databases.

Further, in the above embodiment, the creating a process instance corresponding to the to-be-processed business process based on the definition configuration data specifically includes:

s31, reading the second process information data and the process nodes corresponding to the second process information data respectively;

s32, completing and storing the form information in the form queue corresponding to the process node corresponding to the second process information data, preferably, the completing and storing process may be: searching a corresponding form according to the process node, displaying form information, filling and writing the form information, storing, and finally acquiring and storing a handler of a first node;

and S33, creating a process instance associated with the form information through the process engine.

Further, in the above embodiment, the sequentially updating the corresponding forms in the form queue associated with the process instance specifically includes:

reading each form associated with each node of the process instance in turn;

and updating each form associated with each node of the process instance based on the information of the handler corresponding to each node.

In order to facilitate understanding of the above process, a flow example is used as an explanation hereinafter, and an operation process of the flow example is the above process of updating the corresponding form, and preferably, the operation process of the flow example specifically includes:

s41, reading custom process instance information;

s42, reading a handler corresponding to the current node;

s43, reading a form associated with the current node;

s44, filling in the form and saving the information;

s45, submitting the flow to the next node through the flow engine;

and S46, reading and storing the handler of the next node.

Through the circulation operation of the process example until the last node is submitted, the form queue is updated and completed, a large amount of coding work customized for a business system is reduced in the whole process, and the programming and the configurability of the business process are realized.

Another embodiment of the present invention provides an interaction apparatus based on a process engine and a dynamic form, including a controller configured to:

obtaining corresponding process nodes according to the definition configuration data of the service process to be processed;

acquiring a form queue associated with each flow node;

based on the definition configuration data, creating a process instance corresponding to the business process to be processed;

and sequentially updating the corresponding forms in the form queue associated with the process instance.

Further, in the above-described embodiment, the definition configuration data includes first flow information data and second flow information data;

the controller is further configured to:

defining the first flow information data according to the specification of BPMN;

determining the second process information data based on the name, the creation time, the creator and the creation version of the business process to be processed;

configuring a process node corresponding to the first process information data according to the specification of the BPMN;

configuring a process node corresponding to the second process information data based on preset user-defined process node data, wherein the preset user-defined process node data at least comprises: node name data, node identification data, node encoding data, node type data and node task deadline data.

Further, in the above embodiment, the controller is further configured to:

issuing the first process information data through a process engine;

and respectively storing the second process information data, the process nodes corresponding to the second process information data and the form queue.

Further, in the above embodiment, the controller is further configured to:

respectively reading the second process information data and the process nodes corresponding to the second process information data;

completing and storing the form information in the form queue corresponding to the process node corresponding to the second process information data;

creating, by a process engine, a process instance associated with the form information.

Further, in the above embodiment, the controller is further configured to:

reading each form associated with each node of the process instance in turn;

and updating each form associated with each node of the process instance based on the information of the handler corresponding to each node.

The interaction method and device based on the process engine and the dynamic form provided by the embodiment of the invention have the beneficial effects that at least one point is as follows:

integrating the process and the form by configuring a perfect interaction strategy, generating a specific executable process instance according to the process definition, and finally running the process instance until the updating is completed. The workflow engine and the dynamic form are separated in the whole process, the two technologies are mutually independent, the work coordination between the process engine and the form is optimized, in addition, each business process can be independently developed, the configurability of general business can be realized, the development workload is reduced, more importantly, the relationship between the process and the form is a many-to-many relationship, and the relationship is related to the form through the nodes of the process, so that the wedging degree of the process and the form is improved, and the effect of loose coupling between modules is realized.

While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention.

10页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于ruby语言的工厂设施双向参数化建模方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!