CN115729535A - Complex process application development framework based on automatic code generation - Google Patents
Complex process application development framework based on automatic code generation Download PDFInfo
- Publication number
- CN115729535A CN115729535A CN202211507432.2A CN202211507432A CN115729535A CN 115729535 A CN115729535 A CN 115729535A CN 202211507432 A CN202211507432 A CN 202211507432A CN 115729535 A CN115729535 A CN 115729535A
- Authority
- CN
- China
- Prior art keywords
- view
- code
- node
- flow
- building
- 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.)
- Pending
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a complex flow application development framework based on automatic code generation, which comprises a workflow building and configuration tool, a view building and configuration tool, a code generation tool, a flow driving engine and a view driving engine. The workflow building and configuration tool and the view building and configuration tool are used as development tool plug-ins for visually building a flow template and a view template, and the flow driving engine and the view driving engine are used as core code packages for driving business flows and developing secondary development. The invention focuses on the rapid construction of complex business process application, the development process can obtain real-time code generation support, developers can directly obtain final codes by flexibly configuring the self-definition of workflow and view, and simultaneously, the process driving engine and the view driving engine drive the business process based on a front-end callback mechanism and support the complex processing process. The application generated by the invention can be transplanted integrally, and does not depend on other components while ensuring high flexibility.
Description
Technical Field
The invention belongs to the technical field of development of business process informatization management systems, and particularly relates to a complex process application development framework based on code automatic generation.
Background
Information systems are widely used in enterprise management, where information-based management of business processes is ubiquitous. The process management is the classic application of the enterprise cooperative office system, and the cooperative office system widely accepts cooperative business such as work contact, multi-level approval, message issuing and the like based on the process and the mode of submitting the form. Under the background of the integration and development of informatization and industrialization, modern enterprises pay attention to research and development and flow reconstruction of manufacturing processes, and informatization and flow management of complex business is realized by depending on various specialized information systems and further enterprise application integration. The customization of simple processes and forms of the traditional collaborative office platform cannot meet complex scenes, and the services of special speciality and specific processes need a process application development framework with higher customization degree for support.
Disclosure of Invention
The invention aims to provide a complex flow application development framework based on automatic code generation, so as to solve the problems of informatization realization of complex business flows and business processing forms, and how to rapidly solve high-level customization and secondary development of the complex flows and the business processing forms based on visual configuration and automatic code generation.
In order to solve the technical problems, the invention provides the following technical scheme:
the invention provides a complex flow application development framework based on automatic code generation. The workflow building and configuration tool and the view building and configuration tool are used as development tool plug-ins for visually building a flow template and a view template, and the flow driving engine and the view driving engine are used as core code packages for driving business flows and developing secondary development. The business process information management application development content comprises workflow driving logic development and process application view and business processing form view development.
Specifically, the method comprises the following steps:
the workflow building and configuring tool provides a visual interface for building and configuring the business process model.
The view building and configuration tool provides a visual interface for building and configuring a flow view model and a form view model.
The code generation tool comprises a back-end code generator and a front-end code generator, and is used for generating back-end codes synchronously with the business process model building process and generating front-end codes synchronously with the process view model and the form view model building process.
The process driving engine is used for driving the process instance to run, and the core code comprises a process driving bottom source code, various service classes and a public code packet used for code generation and secondary development.
The view driving engine is used for driving the view instance to run, and the core code comprises view driving underlying source code, various service classes and a common code package for code generation and secondary encoding.
According to an embodiment of the invention, in the workflow construction and configuration tool:
the flow model building elements comprise a starting node, an ending node, a task node, a gateway and a connecting line.
The configuration items include a process template attribute, a subscription to events and actions of the process instance lifecycle, and a subscription to events and actions of the node template attribute, the node instance lifecycle.
The output flow model and configuration items are used for back-end code generation.
In the view building and configuration tool:
the model building elements comprise a series of assemblies and relevant available data, the assemblies comprise a process view assembly and a node view assembly, and the data comprise a process context, a process attribute, a process operation authority, node form data and a node operation authority;
the configuration items comprise subscriptions to events and actions of the flow view rendering lifecycle and subscriptions to events and actions of the form view rendering lifecycle;
the output flow and form view design and configuration items are used for front-end code generation.
According to the embodiment of the invention, the code generation process of the code generation tool is in bidirectional synchronization with the workflow building and configuration process, and the process does not relate to XML analysis and management; automatically generating a back-end code based on the built flow model and the related configuration by the back-end public code packet; the generated back-end code comprises various callback methods, interface methods, a series of flow template classes of attributes, a node template class, a connecting line template class, a gateway template class and corresponding registration codes.
According to the embodiment of the invention, the code generation process and the view building and configuration process of the code generation tool are in bidirectional synchronization, and the process does not relate to XML analysis and management; automatically generating front-end codes based on the flow view, the form view and the related configuration which are built by the front-end public code packet; the generated front-end code comprises various callback methods, a series of flow view template classes of attributes, a node view template class, a form view template class and corresponding registration codes.
According to the embodiment of the invention, the codes generated by the code generation tool comprise perfect registration process codes, front-end and back-end model mapping, front-end and back-end interaction infrastructure and authority control facility, and the front-end codes and the back-end codes are combined to form a whole set of codes for business process management.
The framework automatically generates a whole set of business process management logic codes based on the visualization operation and configuration, and supports secondary coding to realize advanced customization.
The invention has the following beneficial effects:
the complex process application development framework based on automatic code generation aims at realizing complex business process informatization management, focuses on rapid construction of complex business process application, and reduces development difficulty through visual construction and configuration and automatic code generation. The development process can obtain real-time code generation support, the process does not relate to generation and management of XML files based on BPMN, developers can directly obtain final codes through flexibly configuring the customization of workflow and views, and meanwhile, the process driving engine and the view driving engine drive business processes based on a front-end callback mechanism and support complex processing processes.
The components provided by the invention are introduced into project engineering files, and business process informatization driving can be rapidly realized through steps of visual configuration, code customization, registration and the like.
The invention is based on the idea of lightweight design, and the generated application can be transplanted integrally without depending on other components while ensuring high flexibility.
Drawings
FIG. 1 is a diagram of a business process development framework in accordance with the present invention;
FIG. 2 is a diagram of an implementation of the present invention;
FIG. 3 is a diagram of a business process visualization construction and configuration and backend code generation process;
FIG. 4 is a diagram of a node form visualization construction and configuration and front-end code generation process;
FIG. 5 is a business process driven process diagram;
fig. 6 is a view example driving process diagram.
Detailed Description
The following detailed description of embodiments of the present invention is provided in connection with the accompanying drawings and examples.
Fig. 1 is a diagram showing an application development framework of the present invention, which includes a workflow building and configuring tool, a view building and configuring tool, a code generating tool, a flow driving engine, and a view driving engine.
1. The workflow building and configuration tool and the view building and configuration tool are visual development tools and comprise various process building elements and configuration items.
As shown in fig. 1, in an embodiment of the present invention, the workflow building and configuring tool is used for visually building and configuring a flow template. The construction of the flow template is realized based on template elements such as nodes, gateways, paths and the like. The template elements comprise a start node, an end node, a task node, a multi-person (preemptive) approval node, a branch/merge gateway, a routing gateway, a forward connecting line, a backward connecting line and the like. The configuration flow template is based on the flow configuration item, the node configuration item and the gateway configuration item. The process configuration items mainly comprise subscription of events and actions of a full life cycle, such as process template names, process template keys, process permission callback, process instantiation, title generation, viewing, archiving, deleting and the like. The node configuration items mainly comprise node titles, node keys, node authority callback, node instantiation, title generation, distribution, viewing, submission, verification completion, voting verification, deletion and other subscriptions of events and actions of life cycles. The gateway configuration items mainly comprise gateway names, gateway keys, gateway routing rule configuration and routing callback.
As shown in FIG. 1, in one embodiment of the present invention, the view building and configuration tool is used for visually building and configuring a flow view. The process view building needs to be realized based on a process view component, and the process view component mainly comprises a process header, a process node list, a process footer, and process operation components such as forwarding, proxy, rollback and deletion. The flow view configuration items mainly comprise a rendering process callback and a flow operation callback. The flow view component also provides a plurality of user-defined content slots and environment data (including flow context, flow attributes, flow operation permissions and the like) for configuring a user-defined display block and performing secondary development, so as to realize a flexibly-defined flow view.
2. The code generation tool supports automatic generation of back-end code and front-end code, and the generated code comprises various template classes and a front-end view.
As shown in fig. 1, in an embodiment of the present invention, the code generation tool generates a corresponding flow template class and a node class code according to the flow and node configuration, where the flow template class includes attributes such as Key of the flow template, name, description, and path of the flow template, and also includes callback functions such as flow creation, title generation, access, deletion, and termination. The node class comprises attributes such as node Key, node name, description, form view template path and the like, and also comprises callback functions such as node creation, title generation, node assignment, node submission, node completion verification and node deletion, and multi-person tasks and approval also relate to task completion verification and approval conclusion verification callback.
As shown in fig. 1, in an embodiment of the present invention, the view building and configuring tool is further configured to visually build and configure a node form view, where building the node form view needs to be implemented based on a node form component, and the form component includes a plurality of sub-components. The components mainly comprise a node form view component, a form data binding component, and node operation components such as elements of a submission manager, attachments, messages, examination and approval, storage/submission and the like. The form view configuration items mainly comprise a form rendering process callback, a form data verification callback and a form submission callback. In addition, the node form component also provides a plurality of user-defined content slots and environment data (including process context data, node form data, node operation authority and the like) for configuring a user-defined display block and secondary development, so as to realize a flexible user-defined node form view.
As shown in fig. 1, in an embodiment of the present invention, the code generation tool generates corresponding flow template view and node template view codes according to the flow view and node view models and configurations, including call-backs such as flow and form view creation, view mount, rendering completion, view destruction, and call-backs for flow and form operations.
As shown in fig. 1, in an embodiment of the present invention, the code generation tool performs back-end code generation based on the synchronization of operations completed by the workflow building and configuration tool and the view building and configuration tool, and when the workflow or the related configuration changes, the back-end code is automatically updated. When the backend code is manually updated, the workflow builds a view of the configuration related content to be automatically updated.
In an embodiment of the present invention, the code generation tool integrates secondary codes generated by modifying attribute configuration, filling callback method, interface, carbon copy method, custom method, and the like, to implement advanced customization.
The entry of the callback method comprises a process context workflow context, a front-end submitted data NodeSubmitData and the like; the workflow context comprises flow data workflow data, a node data NodeData set, flow authority workflow AuthInfo, each node authority NodeAuthInfo, an authenticator Author and the like, wherein the NodeSubmitData comprises submitted behavior data OperateData, service data FormData and the like;
the return values of the callback method comprise a service data processing result FormResult, a path calculation result RouteResult, an authentication result WorkflowAuthInfo/NodeAuthInfo, a task distribution result HandlerResult, an approval result PassDesition, a verification result ValidateResult and the like.
3. The business process driven engine and the view driven engine provide a running environment for the application for instantiating and driving the business process and the front-end interface.
As shown in fig. 1, in an embodiment of the present invention, the process driver engine is used to drive the process instance to run, and the core code includes the process driver underlying source code, various service classes, and a common code package for code generation and secondary development. The process driving engine realizes process driving by analyzing back-end codes such as a business process template class, an instantiation process template class, a node template class and the like, managing life cycles of process instances and node instances and controlling process trends.
The view driving engine is used for driving the view instance to run, and the core code comprises view driving underlying source code, various service classes and a common code package for code generation and secondary coding. The view driving engine manages the life cycles of the process view examples and the node view examples by instantiating front-end codes such as the process view templates and the node view templates so as to realize view driving.
In conclusion, the business workflow model and the nodes, and the flow view and node form view model are set up in a visual mode. Meanwhile, the subscription of events such as state change, node transition, authority verification, data processing and the like of the process instance and the node instance life cycle is visually configured, and the subscription of events and actions such as process and form view rendering process, data verification, process operation, form submission and the like. Meanwhile, the code generation tool automatically generates a back-end code according to the process and node model configuration, and automatically generates a front-end code according to the process and node form view model configuration. The method comprises the steps of automatically generating back-end codes, representing the back-end codes as a flow template class and a plurality of nodes, a connecting line template class and configured subscription callbacks, representing the front-end codes as a flow view, a plurality of node form views and configured subscription callbacks, and developing custom realization based on a callback method to support the processes of complex flow control, authority verification, data processing and the like.
Fig. 2 is a diagram showing an implementation process of the present invention, and the process application development mainly includes process diagram development and process view and business form view development of each node, and the process application development process based on the present invention includes steps of visual construction and configuration, code generation, secondary coding, complete application generation, and the like.
As shown in fig. 3, an embodiment of constructing a business process model based on a process construction and configuration tool is provided, elements such as nodes, gateways, connecting lines, and the like are dragged into a visual interface during construction, and a process diagram is constructed according to business requirements. Necessary attributes are configured for process models, nodes, gateways, and the like. Meanwhile, according to the service complexity, self-defined coding intervention items are configured for the process execution process and the node processing process. In the process, the code generation tool dynamically generates the flow and the node template class along with the construction operation of the flow model, and generates the attribute and the method of the code according to the configuration items.
As shown in fig. 4, an embodiment of building a flow and node form view model based on a view building and configuration tool is provided, and the building process is divided into flow view building and building of each node form model. And configuring layout for the process and the node view, configuring display areas of various process elements and self-defining content display areas. Meanwhile, according to high-level requirements of services and interaction, self-defined coding intervention items are configured for the rendering process and the operation action of the process view and the node form view. In the process, a flow view and a node view code are dynamically generated along with the view model construction operation, and meanwhile, a corresponding content area, attribute and callback method are generated according to configuration items.
FIG. 5 illustrates a process instance driven process, a business process driven engine module managing a full lifecycle process of a business process from instantiation to archiving. In the process, the flow driving engine automatically calls various callback methods configured by the user, so that the callback methods intervene in the corresponding processing process, and the complex circulation process, data processing and the like are realized. The process example driving procedure is detailed as follows:
and externally submitting a newly-built flow, wherein the process appoints a flow template, the submitted data comprises first node form data and submitted operation data, a flow driving engine inquires and registers the flow template, instantiates a service flow according to the flow template class, and simultaneously constructs flow instance attributes, and a core code can automatically call the configured flow creation callback and the attributes to generate the callback in the process. And then instantiating the first node according to the first node template class, generating a node task, processing node data, and automatically calling back configured node creation, task distribution, data processing and the like by the core code in the process. And finally, the process determines to keep the current task or submit the current task to a subsequent node according to the submitted operation data, if the current task is submitted to the subsequent node, the next node instantiation and corresponding task generation logic are entered, and the process also relates to the execution of callbacks such as node creation, task distribution and the like. And if the subsequent node is the end node, the flow archiving logic is entered, and the core code automatically calls the flow archiving callback. The permission information and process context data involved in the process driver and callback processes are created at the beginning of the commit operation session and destroyed as the process handling process ends.
FIG. 6 illustrates a view instance driven process, the view driven engine module managing the full lifecycle process of the flow view and the node form view. In the process, the view driving engine automatically calls various callback methods configured by the user, so that the callback methods intervene in corresponding processing procedures, and complex interactive procedures, data processing and the like are realized. The view example driving process is detailed as follows:
and externally checking a process view, wherein the process specifies a process instance ID, a view driving engine inquires a process template and process instance information to generate process context data, a process view template and a node view template are selected according to the configuration of the process template, and the process context data is injected. In the process, the core code can automatically call the configured flow view rendering callback and finish the rendering of the flow view frame and the custom content. And then, the flow context data and the node data are distributed to each node view template according to the node instances, and the core code calls the configured form view rendering callback and completes the rendering of the form view framework and the custom content. The flow operation view and the form operation view are rendered according to the authority data, and when a user submits an operation flow or submits a form, the core code automatically calls the configured callback.
Claims (9)
1. A complex flow application development framework based on automatic code generation is characterized by comprising a workflow building and configuration tool, a view building and configuration tool, a code generation tool, a flow driving engine and a view driving engine;
the workflow building and configuring tool provides a visual interface for building and configuring a business process model;
the view building and configuring tool provides a visual interface for building and configuring a flow view model and a form view model;
the code generation tool comprises a back-end code generator and a front-end code generator, and is used for synchronously generating back-end codes with the business process model building process and synchronously generating front-end codes with the process view model and the form view model building process;
the process driving engine is used for driving the process instance to run, and the core code comprises a process driving bottom source code, various service classes and a public code packet for code generation and secondary development;
the view driving engine is used for driving the view instance to run, and the core code comprises view driving underlying source code, various service classes and a common code package for code generation and secondary coding.
2. The code auto-generation based complex flow application development framework of claim 1, wherein in the workflow building and configuration tool:
the flow model building elements comprise a starting node, an ending node, a task node, a gateway and a connecting line;
the configuration items comprise subscription of the process template attribute and the events and actions of the life cycle of the process instance, and subscription of the node template attribute and the events and actions of the life cycle of the node instance;
the output flow model and configuration items are used for back-end code generation.
3. The code auto-generation based complex flow application development framework of claim 1, wherein in the view building and configuration tool:
the model building elements comprise a series of assemblies and related available data, the assemblies comprise a process view assembly and a node view assembly, and the data comprise a process context, a process attribute, a process operation authority, node form data and a node operation authority;
the configuration items comprise subscriptions to events and actions of the flow view rendering lifecycle and subscriptions to events and actions of the form view rendering lifecycle;
the output flow and form view design and configuration items are used for front-end code generation.
4. The automatic code generation based complex flow application development framework of claim 1, wherein the code generation process of the code generation tool is bi-directionally synchronized with the workflow building and configuration process, the process not involving XML parsing and management;
automatically generating a back-end code for the established flow model and the related configuration based on the back-end public code packet;
the generated back-end code comprises various callback methods, interface methods, a series of flow template classes of attributes, node template classes, connecting line template classes, gateway template classes and corresponding registration codes.
5. The automatic code generation based complex flow application development framework of claim 1, wherein the code generation process of the code generation tool is bi-directionally synchronized with the view building and configuration process, the process does not involve XML parsing and management;
automatically generating front-end codes based on the flow view, the form view and the related configuration which are built by the front-end public code packet;
the generated front-end code comprises various callback methods, a series of flow view template classes of attributes, a node view template class, a form view template class and corresponding registration codes.
6. The complex process application development framework based on automatic code generation as claimed in claim 4 or 5, wherein the code generated by the code generation tool comprises perfect registration process code, front-end and back-end model mapping, front-end and back-end interaction infrastructure, and authority control facility, and the front-end code and the back-end code are combined to form a whole set of business process management code.
7. The complex flow application development framework based on automatic code generation of claim 4 or 5, characterized in that the code generation tool integrates secondary codes generated by modifying attribute configuration, filling callback method, interface, carbon copy method and custom method to realize advanced customization;
the entry of the callback method comprises a process context workflow context, a front-end submitted data NodeSubmitData and the like; the workflow context comprises flow data workflow data, a node data set, flow authority workflow AuthInfo, authority node AuthInfo of each node, an authenticator Author and the like, wherein the node SubmITData comprises submitted behavior data OperatedData, service data FormData and the like;
the return values of the callback method comprise a service data processing result FormResult, a path calculation result RouteResult, an authentication result WorkflowAuthInfo/NodeAuthInfo, a task distribution result HandlerResult, an approval result PassDesition, a verification result ValidateResult and the like.
8. The code auto-generation based complex process application development framework of claim 1, wherein the process driving engine implements process driving by parsing back-end code, managing life cycles of process instances and node instances, controlling process trends, such as business process template class, instantiated process template class, node template class, etc.
9. The complex flow application development framework based on automatic code generation as claimed in claim 1, wherein the view driving engine manages the life cycle of the flow view instance and the node view instance by instantiating front-end code such as a flow view template and a node view template to realize view driving.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211507432.2A CN115729535A (en) | 2022-11-29 | 2022-11-29 | Complex process application development framework based on automatic code generation |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211507432.2A CN115729535A (en) | 2022-11-29 | 2022-11-29 | Complex process application development framework based on automatic code generation |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115729535A true CN115729535A (en) | 2023-03-03 |
Family
ID=85298908
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211507432.2A Pending CN115729535A (en) | 2022-11-29 | 2022-11-29 | Complex process application development framework based on automatic code generation |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115729535A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116823152A (en) * | 2023-05-31 | 2023-09-29 | 杭州微宏科技有限公司 | Automatic online method, system, device and medium for offline form |
-
2022
- 2022-11-29 CN CN202211507432.2A patent/CN115729535A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116823152A (en) * | 2023-05-31 | 2023-09-29 | 杭州微宏科技有限公司 | Automatic online method, system, device and medium for offline form |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Nuseibeh et al. | Method engineering for multi-perspective software development | |
US20060241997A1 (en) | System and method for integrating workflow processes with a project management system | |
CN118761090A (en) | User interface for establishing a data privacy pipeline and contract agreement to share data | |
CN113849178A (en) | WEB system development framework based on form driving combined with dynamic rule engine | |
CN112748908A (en) | Restful service development method and device based on SSM framework | |
CN103984818A (en) | AUV (autonomous underwater vehicle) design flow visualization modeling method based on Flex technology | |
WO2019062673A1 (en) | Information-based management implementation method and system based on input and output semantization | |
CN115640045A (en) | Low-code development platform based on domain-driven design and business system creation method | |
CN115729535A (en) | Complex process application development framework based on automatic code generation | |
CN115277817A (en) | Method for realizing visualized data processing by establishing API gateway through flow service arrangement | |
CN112686580B (en) | Workflow definition method and system capable of customizing flow | |
Aslam et al. | Cross-platform real-time collaborative modeling: An architecture and a prototype implementation via emf. cloud | |
CN114168117A (en) | Credit low-code development tool based on designer and storage device | |
Ram et al. | Collaborative conceptual schema design: a process model and prototype system | |
CN117762404A (en) | Configurable operator processing method and device for data mining | |
CN103971224A (en) | Signing method and system | |
CN116011943A (en) | Robot automation flow service system, method and medium based on low codes | |
CN112783484A (en) | Guide template system, sharing method, terminal and medium of collaborative design originality | |
Aveiro et al. | DEMO Model based Rapid REST API Management in a low code platform. | |
Vara et al. | Towards Model-Driven Engineering Support for Service Evolution. | |
Song et al. | S-rap: A concurrent prototyping process for refining workflow-oriented requirements | |
CN117971933A (en) | Method for data service low code | |
Fuggetta et al. | VLP: a visual language for prototyping | |
Stevens | UML and Concurrency | |
CN117829563A (en) | BPM business process management realization process and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |