Workflow drawing method and device, computer readable storage medium and electronic device
Patent Information
- Application Number
- CN202111221471.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-20
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2041-10-20
AI Technical Summary
[0003]现有技术中,大多是通过直接操作文档对象模型(Document Object Model,简称DOM)元素来实现前端工作流画布的开发,开发者需要具备一定的编码能力来指定并配置工作流画布中的节点元素,手动创建和维护节点、线条、数据、请求等操作,此外,代码逻辑分散在多个文件中,对页面效果的小小修改可能需要在好几个文件中进行跳转,因此,在现有方法中工作流画布的业务扩展门槛较高,工作流画布的业务扩展效率较低,进而导致工作流画布的适用性较低以及开发维护效率较低
[0016]This embodiment of the application creates an original workflow canvas based on the business protocol layer in the system component architecture; business extension components are passed into the original workflow canvas through the view module in the view interface layer; the target function interface corresponding to the business extension component is determined from the candidate function interfaces through the interface encapsulation module in the view interface layer; the target function interface of the business extension component is passed into the interface encapsulation module in the view interface layer to obtain the extended workflow canvas; and the workflow is drawn based on the extended workflow canvas. In this way, by dividing the system component architecture into a view interface layer and a business protocol layer, and then creating the original workflow canvas through the business protocol layer, extending the view components through the view module in the view interface layer, and extending the functional attributes of the view components through the interface encapsulation module in the view interface layer, the efficiency of business extension of the workflow canvas is improved, further enhancing the applicability and development and maintenance efficiency of the workflow canvas.
Smart Images

Figure CN116009855B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, specifically to a workflow drawing method, apparatus, computer-readable storage medium, and electronic device. Background Technology
[0002] Workflow is a technology that emerged to address the complex and ever-changing business needs in real-world scenarios. It refers to the automation of part or all of a business process within a computer application environment, and is an abstract and generalized description of the workflow and the business rules governing its various operational steps. As the level of informatization in various businesses gradually increases, workflow is being applied more and more widely across various fields.
[0003] In existing technologies, most front-end workflow canvas development is achieved by directly manipulating Document Object Model (DOM) elements. Developers need to have certain coding skills to specify and configure node elements in the workflow canvas, and manually create and maintain nodes, lines, data, requests, and other operations. In addition, the code logic is scattered across multiple files, and even small modifications to the page effects may require navigation through several files. Therefore, the business expansion threshold of workflow canvas is high and the business expansion efficiency is low in existing methods, resulting in low applicability and low development and maintenance efficiency of workflow canvas. Summary of the Invention
[0004] This application provides a workflow drawing method, apparatus, computer-readable storage medium, and electronic device, which can improve the business expansion efficiency of the workflow canvas, and further improve the applicability and development and maintenance efficiency of the workflow canvas.
[0005] This application provides a workflow drawing method, including: The original workflow canvas is created based on the business protocol layer in the system component architecture, which also includes a view interface layer. The business extension component is passed into the original workflow canvas through the view module in the view interface layer; The target functional interface corresponding to the business extension component is determined from the candidate functional interfaces by the interface encapsulation module in the view interface layer. The target function interface of the business extension component is passed through the interface encapsulation module in the view interface layer to obtain the extended workflow canvas. The workflow is drawn based on the expanded workflow canvas.
[0006] Accordingly, embodiments of this application provide a workflow drawing apparatus, including: A creation unit is used to create an original workflow canvas based on the business protocol layer in the system component architecture, which also includes a view interface layer. The component input unit is used to input business extension components into the original workflow canvas through the view module in the view interface layer; The determining unit is used to determine the target functional interface corresponding to the business extension component from the candidate functional interfaces through the interface encapsulation module in the view interface layer; The interface input unit is used to input the target function interface of the business extension component through the interface encapsulation module in the view interface layer to obtain the extended workflow canvas. A drawing unit is used to draw the workflow based on the expanded workflow canvas.
[0007] In one embodiment, the component input unit includes: The component extension subunit is used to pass the business extension component through the slot in the original workflow canvas through the view module in the view interface layer when a component extension request for the view interface layer is received. The data extension subunit is used to dynamically transmit the business view extension data corresponding to the business extension component into the original workflow canvas through the parameter receiving interface when a data extension request for the view interface layer is received.
[0008] In one embodiment, the component extension subunit includes: The target module component is passed into the module, which is used to pass the target module component into the slot in the original workflow canvas through the main entry component based on the view module in the view interface layer; A global operation area insertion module is used to insert a global operation area into the slot of the target module component; The subcomponent insertion module is used to insert the target business subcomponent into the global operation area.
[0009] In one embodiment, the data expansion subunit includes: The acquisition module is used to acquire the business view extension data corresponding to the business extension component; The generation module is used to pass the business view extension data into the business extension component, and dynamically generate the business view corresponding to the business extension component in the original workflow canvas based on the business view extension data.
[0010] In one embodiment, the workflow drawing device further includes: The acquisition unit is used to acquire the extended business extension field corresponding to the business extension field when an extension request for the business protocol data is received; The parsing unit is used to parse the extended business-oriented fields and obtain the parsing results; An assembly unit is used to assemble the extended business-oriented fields into the standardized reserved fields of the business protocol data according to the parsing result; The Business Protocol Extension Creation Unit is used to create a workflow canvas with extended business protocol data based on the assembled business protocol data.
[0011] In one embodiment, the assembly unit includes: The pure business field acquisition subunit is used to acquire the pure business field in the extended business field according to the parsing result when there is a pure business field in the extended business field, so as to execute the business logic corresponding to the pure business field based on the pure business field. The workflow convention field assembly subunit is used to assemble the workflow convention field in the extended business extension field into the target field of the standardized reserved field according to the parsing result when the extended business extension field contains a workflow convention field.
[0012] In one embodiment, the workflow convention field assembly subunit is used for: When there is connection data in the workflow convention field, the connection data in the extended business-oriented extended field is assembled into the connection data in the standardized reserved field; When node data exists in the workflow convention field, the node data in the extended business-oriented extended field is assembled into the task node data in the standardized reserved field.
[0013] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the workflow drawing methods provided in embodiments of this application.
[0014] Furthermore, this application also provides an electronic device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the workflow drawing method provided in this application.
[0015] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the steps in the workflow drawing method provided in this application.
[0016] This embodiment of the application creates an original workflow canvas based on the business protocol layer in the system component architecture; business extension components are passed into the original workflow canvas through the view module in the view interface layer; the target function interface corresponding to the business extension component is determined from the candidate function interfaces through the interface encapsulation module in the view interface layer; the target function interface of the business extension component is passed into the interface encapsulation module in the view interface layer to obtain the extended workflow canvas; and the workflow is drawn based on the extended workflow canvas. In this way, by dividing the system component architecture into a view interface layer and a business protocol layer, and then creating the original workflow canvas through the business protocol layer, extending the view components through the view module in the view interface layer, and extending the functional attributes of the view components through the interface encapsulation module in the view interface layer, the efficiency of business extension of the workflow canvas is improved, further enhancing the applicability and development and maintenance efficiency of the workflow canvas. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram illustrating an implementation scenario of a workflow drawing method provided in this application embodiment; Figure 2 This is a flowchart illustrating a workflow drawing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the system component architecture hierarchy of a workflow drawing method provided in this application embodiment; Figure 4 This is a schematic diagram of the view interface layer business extension of a workflow drawing method provided in an embodiment of this application; Figure 5 This is a schematic diagram of a business extension process of a workflow drawing method provided in an embodiment of this application; Figure 6 This is another schematic diagram of a workflow drawing method provided in an embodiment of this application; Figure 7 This is a schematic diagram of the workflow drawing device provided in the embodiments of this application; Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0020] This application provides a workflow rendering method, apparatus, computer-readable storage medium, and electronic device. The workflow rendering apparatus can be integrated into an electronic device, which may be a server or a terminal, etc.
[0021] The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or other device capable of information processing, but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this connection.
[0022] For better illustration of the embodiments of this application, please refer to the following terms: Workflow refers to the automation of part or all of a business process in a computer application environment. It is a computational model of a workflow, representing the logic and rules of how tasks are organized sequentially within a workflow in a computer model and performing calculations on them. In other words, it is an abstract and generalized description of the workflow and the business rules between its various operational steps. The main problem that workflow aims to solve is: to achieve a certain business goal, to automatically transfer tasks among multiple participants using computers according to certain predetermined rules, and it is part of Computer-Supported Cooperative Work (CSCW).
[0023] BPMN, short for "Business Process Modeling Notation," is a universal and standard language for business process modeling. By describing the operations of elements with precise execution semantics, BPMN can be used to draw business process diagrams. This means that business processes described by BPMN can be understood by all business users.
[0024] OCP stands for "Open-Closed Principle," a programming principle for handling changing requirements. When business requirements change, the overall code structure should not be altered. New code can be flexibly inserted into extension points with minimal code changes, achieving "open to extension, closed to modification."
[0025] Front-end: This refers to the front-end part of a website, which is the webpage displayed to users on personal computers (PCs), mobile devices, and other browsers.
[0026] JavaScript (JS for short) is a lightweight, interpreted or just-in-time (JIT) programming language with a function-first approach. While it is best known as a scripting language for developing web pages, it is also used in many non-browser environments. JavaScript is a prototype-based, multi-paradigm dynamic scripting language that supports object-oriented, imperative, declarative, and functional programming paradigms.
[0027] API: Application Programming Interface. These are predefined interfaces (such as functions or HTTP interfaces), or conventions for connecting different components of a software system. They provide applications and developers with a set of routines accessible to them based on certain software or hardware, without requiring access to the source code or understanding of the details of the internal workings.
[0028] Software Development Kit (SDK): Generally, it is a collection of development tools used by software engineers to create application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.
[0029] An operating system is a collection of system software that manages computer hardware resources, controls the execution of other programs, and provides an interactive user interface. It is a crucial component of a computer system, responsible for fundamental tasks such as managing and configuring memory, determining the priority of system resource allocation, controlling input and output devices, operating networks, and managing file systems.
[0030] Please see Figure 1 Taking the integration of workflow rendering devices into electronic devices as an example, Figure 1This is a schematic diagram illustrating an implementation scenario of the workflow drawing method provided in this application. The electronic device can be a terminal. The terminal can create an original workflow canvas based on the business protocol layer in the system component architecture; pass a business extension component into the original workflow canvas through the view module in the view interface layer; determine the target function interface corresponding to the business extension component from candidate function interfaces through the interface encapsulation module in the view interface layer; pass the target function interface of the business extension component into the view interface layer through the interface encapsulation module to obtain the extended workflow canvas; and draw the workflow based on the extended workflow canvas.
[0031] It should be noted that, Figure 1 The schematic diagram illustrating the implementation environment of the workflow drawing method shown is merely an example. The implementation environment of the workflow drawing method described in this application is intended to more clearly illustrate the technical solutions of this application and does not constitute a limitation on the technical solutions provided in this application. Those skilled in the art will understand that, with the evolution of workflow drawing and the emergence of new business scenarios, the technical solutions provided in this application are also applicable to similar technical problems.
[0032] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.
[0033] This embodiment will be described from the perspective of a workflow drawing device, which can be integrated into an electronic device, which can be a terminal, and this application does not limit it.
[0034] Please see Figure 2 , Figure 2 This is a flowchart illustrating the workflow drawing method provided in an embodiment of this application. The workflow drawing method includes: In step 101, an original workflow canvas is created based on the business protocol layer in the system component architecture.
[0035] Workflow is a technology that emerged to address the complex and ever-changing business needs in reality. It refers to the automation of part or all of a business process in a computer application environment. It is an abstract and generalized description of the workflow and the business rules between its various operational steps. It is a set of nodes that can be visually displayed and used to intuitively represent the relationships between different workflow nodes. By automating workflows, it improves enterprise operational efficiency, resource utilization, operational flexibility and adaptability, and the efficiency of quantitative performance evaluation. As the level of informatization in various businesses gradually increases, workflows are being applied more and more widely in various fields, such as in scenarios involving task dependencies, data dependencies, and inheritance relationships. Therefore, how to construct workflows is a question worthy of attention.
[0036] Technical personnel can draw business process diagrams through the workflow drawing page, also known as the workflow canvas, to achieve corresponding business goals. However, with the development of Internet technology, various business needs are emerging one after another. The fixed workflow canvas cannot meet the business needs of technical personnel. Therefore, developers need to frequently expand the workflow canvas according to the changing business needs.
[0037] In existing Web (World Wide Web) front-end workflow canvas development, most methods involve directly manipulating the DOM elements provided by the browser. Specifically, developers need certain coding skills to specify and configure node elements in the workflow canvas, as well as manually create and maintain nodes, lines, data, requests, and other tedious operations. In addition, the logic of the relevant code is scattered across multiple files, and even minor modifications to the page effects may require navigation through several files. Therefore, the business expansion threshold of workflow canvas is high and the efficiency of business expansion is low in the existing methods, which further leads to low applicability and development and maintenance efficiency of workflow canvas.
[0038] To address the above issues, this application provides a workflow drawing method. By dividing the system component architecture into a view interface layer and a business protocol layer, the original workflow canvas can be created through the business protocol layer. View components are extended through view modules in the view interface layer, and the functional attributes of view components are extended through interface encapsulation modules in the view interface layer. This improves the efficiency of business extensions to the workflow canvas, further enhancing its applicability and development / maintenance efficiency. The system component architecture can be a component layer architecture in an operating system, i.e., a component layer in the front-end architecture. The workflow drawing method provided in this application will be described in detail below.
[0039] First, a raw workflow canvas can be created based on the business protocol layer in the system component architecture.
[0040] The system component architecture can be a front-end architecture; please refer to [reference needed]. Figure 3 , Figure 3 This is a schematic diagram of the system component architecture hierarchy of a workflow drawing method provided in an embodiment of this application, including a business application layer and a front-end component layer.
[0041] The business application layer can include business-related style and theme customization data, business data, and corresponding business logic. The style and theme customization data allows technical personnel to create custom styles and themes based on specific business needs, while the business data and corresponding business logic can be configured by technical personnel according to specific business requirements. The front-end component layer can include pre-packaged reusable components. Components are combinations of modular front-end functions, allowing for rapid page development through simple component combinations.
[0042] This front-end component layer can include an underlying business protocol layer and a view interface layer. The business protocol layer can be used to extend the underlying business protocol and can contain underlying business protocol data based on BPMN process standards (such as BPMN 2.0 process standards). The business protocol layer can provide canvas capabilities to the view interface layer through the underlying business protocol data. Specifically, it can include data such as canvas drawing, modeler, viewer, features, importer, diagram canvas drawing (diagram-js canvas), and protocol modeling (bpmn-moddle), etc. There are no restrictions here. In this way, the basic business process diagram can be drawn based on the BPMN standard through the data in the business protocol layer to realize the drawing capability of the web front-end workflow canvas.
[0043] This view interface layer can include view modules and encapsulated interface modules. The view module can be a module obtained by decomposing and abstracting the view based on business requirements from the view layer of the user interface (UI), i.e., the workflow drawing interface. It can include multiple pre-encapsulated components. The view module can encapsulate components based on a JS framework. For example, it can encapsulate components based on a first user interface framework (Vue framework) or a second user interface framework (React framework). Specifically, it can include view components such as canvas, header, canvas pop-up container (node-panel), right-click pop-up container (context-pad), connection container (connection-pad), and red-dot tooltip. The specific content can be configured according to the actual situation and is not limited here.
[0044] This encapsulated interface module (JSSDK API) encapsulates interfaces that can be used to extend the functionality of components and business requirements in the workflow canvas. Specifically, the encapsulated interface module can use native JavaScript to encapsulate modules such as nodes, data processing, connections, and API requests. Each module provides a series of APIs, exposing different capabilities. For example, the connection module can encapsulate APIs for creating, removing, getting all, and querying by identifier (ID) (getById). These native JavaScript-implemented API functions can be used in the view module without considering the front-end language framework, runtime environment, or browser capabilities used by the view module, thus improving the applicability of the corresponding workflow canvas. Please continue to refer to [reference needed]. Figure 3 The encapsulated interface module can specifically include functional interfaces such as nodes, connections, data processing, Common Gateway Interface requests, event handlers, core capabilities (core-bpmn), configuration items (configure), and node attribute tools (node-attrs-util). The specific content can be configured according to the actual situation and is not limited here.
[0045] Therefore, a basic business process diagram based on the BPMN modeling language standard can be created using underlying business protocol data in the business protocol layer. Furthermore, business extension data from the view interface layer stored on the backend server can be obtained to generate an original workflow canvas based on the basic business process diagram. This original workflow canvas can be a page created before the current extension operation, which can be used to draw the workflow. Optionally, the workflow canvas construction trigger operation can refer to the operation used to trigger the workflow construction process. Specifically, it could be a user request to access a browser or webpage within a browser used to build the workflow; that is, a user request for the terminal to load and display a browser or webpage used to build the workflow.
[0046] In step 102, the business extension component is passed into the original workflow canvas through the view module in the view interface layer.
[0047] The business extension component can be a component that performs business extensions based on business extension requirements. When it is necessary to extend the original workflow canvas on the view layer, the business extension component required by the business can be passed into the original workflow canvas through the view module in the view interface layer.
[0048] In one embodiment, the business logic of view components in the workflow drawing interface can be extended through the view module. Specifically, "heavy business components" can be passed in slotted through slot instructions. A slot is an extension of a component, and content is passed to a specified location inside the component through the slot. For example, parameters can be passed between parent and child components through slots to achieve the extension of relatively heavy components. "Lightweight business data" can be dynamically passed in through the parameter receiving interface (props), such as object type, title name, component color, size and other attribute data that need to be extended. Props are used to receive parameters, such as parameters passed from parent component to child component, to achieve the extension of relatively lightweight business data.
[0049] Specifically, when a component extension request is received for the view interface layer, the business extension component to be extended can be selected in the view module of the view interface layer, and the selected business extension component can be passed to the slot in the corresponding position in the original workflow canvas through the slot. When a data extension request is received for the view interface layer, the business view extension data corresponding to the business extension component can be dynamically passed to the original workflow canvas through the parameter receiving interface props. The business view extension data can be "lightweight business data", including data that extends the parameters of the business or view component in the workflow canvas, such as object type, title name (name), component color, size and other parameter data that need to be extended.
[0050] In one embodiment, when it is necessary to extend a business extension component by adding sub-components, the business extension component may include a target module component and a target business sub-component of the target module component. The target module component may be a module in the workflow canvas that needs to be extended, and the target business sub-component may be a sub-component corresponding to the target module component. Specifically, the target module component can be passed to the view module in the view interface layer through a slot in a specified position in the original workflow canvas via the main entry component, thereby realizing the extension of the target module component. The main entry component may or may not be displayed in the original workflow canvas, and the form of the main entry component is not limited. After that, a global operation area can be inserted into the slot in the target module component, and then the target business sub-component can be inserted into the global operation area so that the target business sub-component can act on the global area of the entire workflow canvas.
[0051] For example, please refer to Figure 4 , Figure 4 This is a schematic diagram of the view interface layer business extension of a workflow drawing method provided in this application embodiment. It can also be referenced in conjunction with this diagram. Figure 5 , Figure 5 This is a business extension process diagram of a workflow drawing method provided in this application embodiment. The workflow canvas includes a main entry component, which in turn includes a process canvas page and a node management area. The process canvas page is used to draw the workflow, and the node management area is used to manage the nodes within the process canvas page. The target module component can be a header component in the workflow canvas, and the target business sub-component can be a sub-component of the header component, such as a sub-component of the "Save and Publish" button. Specifically, when a user needs to add a "header" to the workflow canvas page, they can insert a header component into a slot on the corresponding main entry component (canvas). Then, a global operation area (header-right) can be inserted into the slot of the header component, and the target business sub-component "Publish and Save" button can be inserted into the global operation area, thereby extending the header component and the target business sub-component "Publish and Save" button. Furthermore, according to specific business needs, business components such as a back button, title name, save draft, toggle menu, and email node can be inserted into the header to achieve specific business functions.
[0052] For example, suppose we want to expand the original workflow canvas to include a node details panel so that users can access detailed information about a specific node. This can be achieved by configuring the node details panel for that node within the panel pop-up container (node-panel), and then inserting the configured node details panel into the corresponding main entry component's slot. Furthermore, based on specific business needs, other business components can be inserted into the workflow canvas through the main entry component to implement specific business functions.
[0053] In one embodiment, upon receiving a data extension request for the view interface layer, the business extension component corresponding to the data extension request can be determined based on the data extension request, and the business view extension data corresponding to the business extension component can be obtained. The business view extension data can be business data configured for a component that needs business extension according to specific business requirements. Then, the business view extension data can be passed into the business extension component, and the business view corresponding to the business extension component can be dynamically generated in the original workflow canvas based on the business view extension data. The business view can be a view displayed in the workflow canvas based on the business view extension data configured according to business requirements, such as title name, component color, component size, etc.
[0054] For example, assuming the extended data of the business view is node toolbar data, the node toolbar data can be passed to the main entry component through the parameter receiving interface props, and the corresponding business view, i.e., the node toolbar, can be generated in the node management area based on the node toolbar data. As another example, assuming the extended data of the business view is menu data, the "menu data" can be passed to the header component through the parameter receiving interface props, and the passed "menu data" can be used to dynamically generate business views of multiple custom menu pages. In addition, multiple menu pages can be inserted to achieve richer business functions.
[0055] In step 103, the target functional interface corresponding to the business extension component is determined from the candidate functional interfaces through the interface encapsulation module in the view interface layer.
[0056] This functional interface can be a pre-encapsulated interface in the interface encapsulation module, such as an API interface or SDK interface, used to extend the functionality of components in the workflow canvas or according to business functional requirements. For example, it can perform node processing operations such as deleting nodes, creating nodes, and connecting nodes. Specifically, based on business requirements, the interface encapsulation module in the view interface layer can determine the target functional interface corresponding to the business extension component from the candidate functional interfaces. For example, assuming that a connection is needed between two business extension components according to business requirements, the interface encapsulation module in the view interface layer can determine the corresponding connection interface from the candidate functional interfaces to connect the two component nodes. As another example, assuming that a node needs to be deleted from business extension component A according to business requirements, the interface encapsulation module in the view interface layer can determine the corresponding node deletion interface from the candidate functional interfaces to perform the node deletion operation on this business extension component.
[0057] In one embodiment, the functional interfaces of the interface encapsulation module in the view interface layer can be used to process nodes in the workflow. For example, when a node needs to be created in the workflow canvas, the interface encapsulation module in the view interface layer can determine the corresponding node creation interface from the candidate functional interfaces, and then perform node creation operations on this business extension component through the node creation interface; when a node needs to be deleted in the workflow canvas, the interface encapsulation module in the view interface layer can determine the corresponding node deletion interface from the candidate functional interfaces, and then perform node deletion operations on this business extension component through the node deletion interface, and so on.
[0058] In step 104, the target function interface of the business extension component is passed through the interface encapsulation module in the view interface layer to obtain the extended workflow canvas.
[0059] In this way, after determining the target function interface based on business expansion needs, the target function interface can be passed to the corresponding position in the original workflow canvas by calling the interface encapsulation module in the view interface layer. This enables the functional expansion of the business expansion component. In this way, relevant technical personnel can expand the original workflow canvas according to business needs through the view module and encapsulation interface module in the view interface layer to obtain the expanded workflow canvas, thereby improving the efficiency of business expansion of the workflow canvas and further enhancing the applicability of the workflow canvas.
[0060] In step 105, the workflow is drawn based on the expanded workflow canvas.
[0061] After expanding the original workflow canvas according to business expansion needs, subsequent workflows can be drawn based on the expanded workflow canvas.
[0062] In one embodiment, as business needs become more complex and diversified, the workflow canvas requires frequent business expansion to adapt to changing needs. To enable more comprehensive business expansion of the workflow canvas, business protocol data can be expanded through a business protocol layer. Specifically, this business protocol data (businessData) is extensible business data within the business protocol layer, based on JSON (JavaScript Object Notation) protocol fields implemented according to the BPMN standard. It can include business-oriented extended fields and standardized reserved fields. The business-oriented extended fields support arbitrary expansion of both workflow data and business data, and can include workflow convention fields and pure business fields. Workflow convention fields are business-oriented extended workflow data for the backend workflow engine. Pure business fields are for the pure business side and are business data that business developers can arbitrarily expand. The standardized reserved fields are data parsed by the backend workflow engine and are fields that are not modified. In this way, by separating business-oriented extended fields from standardized reserved fields, the scalability and controllability of business protocol data are enhanced. This allows for adaptation to changes in business requirements through the "expansion" of business-oriented extended fields, rather than by "modifying" existing code. This is beneficial for code maintenance and the expansion of new business requirements, improves the efficiency of business expansion of the workflow canvas, and further enhances the applicability and development and maintenance efficiency of the workflow canvas.
[0063] The extension operations of business protocol data through the business protocol layer can include: (1) When an extension request for business protocol data is received, obtain the extended business extension field corresponding to the business extension field; (2) Parse the extended business-oriented fields to obtain the parsing results; (3) Based on the parsing results, assemble the extended business-oriented fields into the standardized reserved fields of the business protocol data; (4) Create a workflow canvas with extended business protocol based on the assembled business protocol data.
[0064] Specifically, when it is necessary to extend the business protocol data at the business protocol layer, the extended business protocol field corresponding to the extended business protocol field can be obtained. This extended business protocol field can be a field obtained by extending the business protocol data based on the extended business protocol field. Then, the extended business protocol field can be parsed to obtain the parsing result. Based on the parsing result, the extended business protocol field is assembled into the standardized reserved field of the business protocol data. Thus, the current workflow canvas can be updated and created based on the assembled business protocol data, resulting in the extended workflow canvas.
[0065] Specifically, for the step of assembling the extended business-oriented fields into the standardized reserved fields of the business protocol data based on the parsing result, the extended business-oriented fields can be detected based on the parsing result. When a pure business field is detected in the extended business-oriented fields, the pure business field in the extended business-oriented fields can be obtained based on the parsing result, and the pure business field can be passed to the corresponding backend server. The backend server can then transmit the pure business field to the workflow canvas of the web frontend, so that the workflow canvas can implement the business logic corresponding to the pure business field.
[0066] When a workflow convention field exists in the extended business logic field, it can be assembled into the corresponding target field in the standardized reserved field based on the parsing result. Specifically, the exact location where the workflow field is assembled into the standardized reserved field can be determined based on the field type in the workflow field. For example, if the workflow convention field contains flow data (flowData), the flow data in the extended business logic field is assembled into the flow data (taskFlows) in the standardized reserved field, thus updating and expanding the flow data in the original standardized reserved field, achieving business expansion of the flow data. Similarly, if the workflow convention field contains node data (taskData), the node data in the extended business logic field can be assembled into the task node data (tasks) in the standardized reserved field, thus updating and expanding the task node data in the original standardized reserved field, achieving business expansion of the task node data.
[0067] For example, when it's necessary to expand task node data, event node data, and "pure business fields," the agreed-upon fields of the task node data (taskData), the agreed-upon fields of the connection data (flowData), and the "pure business fields" can be expanded separately within the business protocol data (businessData). These expanded business protocol data can then be parsed, and based on the parsing results of the connection data (flowData), the expanded connection data can be assembled into the connection data (taskFlows) with standardized reserved fields. Similarly, based on the parsing results of the task node data (taskData), the expanded node data can be assembled into the node data (tasks) with standardized reserved fields.
[0068] As described above, this embodiment creates an original workflow canvas based on the business protocol layer in the system component architecture; passes business extension components into the original workflow canvas through the view module in the view interface layer; determines the target function interface corresponding to the business extension component from the candidate function interfaces through the interface encapsulation module in the view interface layer; passes the target function interface of the business extension component into the interface encapsulation module in the view interface layer to obtain the extended workflow canvas; and draws the workflow based on the extended workflow canvas. Thus, by dividing the system component architecture into a view interface layer and a business protocol layer, creating the original workflow canvas through the business protocol layer, extending view components through the view module in the view interface layer, and extending the functional attributes of view components through the interface encapsulation module in the view interface layer, the efficiency of business extension of the workflow canvas is improved, further enhancing the applicability and development and maintenance efficiency of the workflow canvas.
[0069] Based on the method described in the above embodiments, the following examples will provide further detailed explanations.
[0070] In this embodiment, the workflow drawing device will be specifically integrated into an electronic device as an example for explanation. The workflow drawing method will be specifically described with the terminal as the executing entity.
[0071] For a better description of the embodiments of this application, please refer to the following: Figure 3 , Figure 4 , Figure 5 and Figure 6 .like Figure 6 As shown, Figure 6 Another flowchart illustrating the workflow drawing method provided in this application embodiment is shown below. In step 201, the terminal creates an original workflow canvas based on the business protocol layer in the system component architecture. When a component extension request for the view interface layer is received, the business extension component is passed through the slot in the original workflow canvas through the view module in the view interface layer.
[0072] Specifically, the terminal can create a basic business process diagram based on the BPMN modeling language standard using data from the business protocol layer, and obtain business extension data from the view interface layer stored on the backend server to generate an original workflow canvas based on the basic business process diagram. This original workflow canvas can be a page created before the current extension operation, which can be used to draw the workflow. Optionally, the workflow canvas construction trigger operation can refer to the operation used to trigger the workflow construction process, specifically, a user request to access the browser or webpage in the browser used to build the workflow, that is, a user request for the terminal to load and display the browser or webpage in the browser used to build the workflow.
[0073] When a component extension request is received for the view interface layer, the terminal can select the business extension component that needs to be extended in the view module of the view interface layer, and pass the selected business extension component through the slot in the corresponding position in the original workflow canvas.
[0074] In one embodiment, when it is necessary to extend a business extension component by adding sub-components, the business extension component may include a target module component and a target business sub-component of the target module component. The target module component may be a module in the workflow canvas that needs to be extended, and the target business sub-component may be a sub-component corresponding to the target module component. Specifically, the terminal may pass the target module component to a slot in the original workflow canvas through the main entry component based on the view module in the view interface layer, thereby realizing the extension of the target module component. The main entry component may be the entry component for business extension of the workflow canvas, and may or may not be displayed in the original workflow canvas. The form of the main entry component is not limited here. After that, the terminal may insert a global operation area into the slot of the target module component, and then insert the target business sub-component into the global operation area so that the target business sub-component can be applied to the global area of the entire workflow canvas.
[0075] For example, please refer to the following: Figure 4 and Figure 5 We can assume the target module component is the header component in the workflow canvas, and the target business sub-component can be a sub-component of the header component, such as a sub-component of the "Save and Publish" button. Specifically, when a user needs to add a "header" to the workflow canvas page, they can insert the header component into a slot on the corresponding main entry component (canvas). Then, a global operation area (header-right) can be inserted into the slot of the header component, and the target business sub-component "Publish and Save" can be inserted into the global operation area, thus extending both the header component and the target business sub-component "Publish and Save" button. Furthermore, depending on specific business needs, business components such as a back button, title name, save draft, toggle menu, and email node can be inserted into the header to achieve specific business functions.
[0076] For example, suppose we want to expand the original workflow canvas to include a node details panel so that users can access detailed information about a specific node. This can be achieved by configuring the node details panel for that node within the panel pop-up container (node-panel), and then inserting the configured node details panel into the corresponding main entry component's slot. Furthermore, based on specific business needs, other business components can be inserted into the workflow canvas through the main entry component to implement specific business functions.
[0077] In step 202, when a data extension request for the view interface layer is received, the terminal obtains the business view extension data corresponding to the business extension component, passes the business view extension data into the business extension component, and dynamically generates the business view corresponding to the business extension data in the original workflow canvas based on the business view extension data.
[0078] Specifically, upon receiving a data extension request for the view interface layer, the terminal can determine the corresponding business extension component based on the data extension request and obtain the business view extension data corresponding to the business extension component. This business view extension data can be business data configured for a component that needs business extension according to specific business requirements. Then, the business view extension data can be passed into the business extension component. Based on the business view extension data, the business view corresponding to the business extension component is dynamically generated in the original workflow canvas. This business view can be the view displayed in the workflow canvas based on the business view extension data configured according to business requirements, such as title name, component color, component size, etc.
[0079] For example, assuming the extended data of the business view is node toolbar data, the terminal can pass the node toolbar data to the main entry component through the parameter receiving interface props, and generate the corresponding business view, i.e., the node toolbar, in the node management area based on the node toolbar data. As another example, assuming the extended data of the business view is menu data, the "menu data" can be passed to the header component through the parameter receiving interface props, and the passed "menu data" can be used to dynamically generate business views of multiple custom menu pages. In addition, multiple menu pages can be inserted to achieve richer business functions.
[0080] In step 203, the terminal determines the target function interface corresponding to the business extension component from the candidate function interfaces through the interface encapsulation module in the view interface layer, and passes the target function interface of the business extension component through the interface encapsulation module in the view interface layer to obtain the extended workflow canvas.
[0081] Specifically, the terminal can determine the target functional interface corresponding to the business extension component from the candidate functional interfaces through the interface encapsulation module in the view interface layer, based on business needs. For example, assuming a connection needs to be established between two business extension components, the corresponding connection interface can be determined from the candidate functional interfaces through the interface encapsulation module in the view interface layer, and the two component nodes can be connected through this connection interface. As another example, assuming a node needs to be deleted from business extension component A, the corresponding node deletion interface can be determined from the candidate functional interfaces through the interface encapsulation module in the view interface layer, and the node deletion operation can be performed on this business extension component through this node deletion interface. Furthermore, after determining the target function interface based on business expansion needs, the terminal can call the target function interface in the interface encapsulation module of the view interface layer, and then pass the target function interface to the corresponding position in the original workflow canvas to realize the functional expansion of the business expansion component. In this way, relevant technical personnel can expand the original workflow canvas according to business needs through the view module and encapsulation interface module in the view interface layer to obtain the expanded workflow canvas, thereby improving the efficiency of business expansion of the workflow canvas and further improving the applicability of the workflow canvas.
[0082] In step 204, the terminal draws the workflow based on the extended workflow canvas. When it receives an extension request for business protocol data, it obtains the extended business extension field corresponding to the business extension field, parses the extended business extension field, and obtains the parsing result.
[0083] After extending the original workflow canvas according to business expansion needs, the terminal can draw subsequent workflows based on the extended workflow canvas. This business protocol layer includes business protocol data (businessData), which is extensible business data within the business protocol layer. It is a JSON (JavaScript Object Notation) protocol field implemented based on the BPMN standard, specifically including business-oriented extended fields and standardized reserved fields. The business-oriented extended fields support arbitrary extensions of both workflow data and business data, specifically including workflow convention fields and pure business fields. Workflow convention fields are business-oriented extended workflow data for the backend workflow engine. Pure business fields are for the pure business side and are business data that business developers can arbitrarily extend. The standardized reserved fields are data parsed by the backend workflow engine and are fields that are not modified. In this way, by separating business-oriented extended fields from standardized reserved fields, the scalability and controllability of business protocol data are enhanced. This allows for adaptation to changes in business requirements through the "expansion" of business-oriented extended fields, rather than by "modifying" existing code. This is beneficial for code maintenance and the expansion of new business requirements, improves the efficiency of business expansion of the workflow canvas, and further enhances the applicability and development and maintenance efficiency of the workflow canvas.
[0084] Specifically, when it is necessary to extend the business protocol data at the business protocol layer, the terminal can obtain the extended business protocol field corresponding to the extended business protocol field. This extended business protocol field can be a field obtained by extending the business protocol data based on the extended business protocol field. Then, the extended business protocol field can be parsed to obtain the parsing result.
[0085] In step 205, when there is a pure business field in the extended business field, the terminal obtains the pure business field in the extended business field according to the parsing result.
[0086] Specifically, the terminal can detect the extended business-oriented field based on the parsing result. When a pure business field is detected in the extended business-oriented field, the terminal can obtain the pure business field in the extended business-oriented field based on the parsing result and pass the pure business field to the corresponding backend server. The backend server can then transmit the pure business field to the workflow canvas of the web frontend, so that the workflow canvas can implement the business logic corresponding to the pure business field.
[0087] In step 206, when there is a workflow convention field in the extended business extension field, and the terminal has connection data in the workflow convention field, the connection data in the extended business extension field is assembled into the connection data of the standardized reserved field.
[0088] When a workflow convention field exists in the extended business logic field, the terminal can assemble the workflow convention field from the extended business logic field into the corresponding target field in the standardized reserved field based on the parsing result. Specifically, the terminal can determine the specific location in the standardized reserved field where the workflow field is assembled based on the field type in the workflow field. For example, when the workflow convention field contains flow data (flowData), the flow data from the extended business logic field is assembled into the flow data (taskFlows) in the standardized reserved field, so that the flow data in the original standardized reserved field is updated and extended to the flow data in the extended business logic field, thus realizing the business extension of the flow data.
[0089] In step 207, when node data exists in the workflow agreement field, the terminal assembles the node data in the extended business extension field into the task node data in the standardized reserved field, and creates a workflow canvas with extended business protocol based on the assembled business protocol data.
[0090] When node data (taskData) exists in the workflow convention field, the terminal can assemble the node data in the extended business-oriented extended field into the task node data (tasks) in the standardized reserved field, so that the task node data in the original standardized reserved field is updated and extended with the node data in the extended business-oriented extended field, realizing the business extension of task node data.
[0091] For example, when it's necessary to expand task node data, event node data, and "pure business fields," the agreed-upon fields of the task node data (taskData), the agreed-upon fields of the connection data (flowData), and the "pure business fields" in the business protocol data (businessData) can be expanded separately. The terminal can then parse these expanded business protocol data and, based on the parsing results of the connection data (flowData), assemble the expanded connection data into the connection data (taskFlows) with standardized reserved fields. Similarly, the terminal assembles the expanded node data into the node data (tasks) with standardized reserved fields based on the parsing results of the task node data (taskData).
[0092] As described above, in this embodiment, the terminal creates an original workflow canvas based on the business protocol layer in the system component architecture. When a component extension request for the view interface layer is received, the business extension component is passed into the slot of the original workflow canvas through the view module in the view interface layer. When a data extension request for the view interface layer is received, the terminal obtains the business view extension data corresponding to the business extension component, passes the business view extension data into the business extension component, and dynamically generates a business view corresponding to the business extension data in the original workflow canvas based on the business view extension data. The terminal determines the target function interface corresponding to the business extension component from the candidate function interfaces through the interface encapsulation module in the view interface layer, passes the target function interface of the business extension component into the view interface layer through the interface encapsulation module, and obtains the extended workflow canvas. The terminal draws the workflow based on the extended workflow canvas. When a request to extend business protocol data is received, the terminal obtains the extended business protocol field corresponding to the extended business protocol field, parses the extended business protocol field, and obtains the parsing result. If the extended business protocol field contains a pure business field, the terminal obtains the pure business field from the extended business protocol field based on the parsing result, and executes the business logic corresponding to the pure business field based on the pure business field. If the extended business protocol field contains a workflow convention field, and if the workflow convention field contains connection data, the terminal assembles the connection data from the extended business protocol field into the connection data of the standardized reserved field. If the workflow convention field contains node data, the terminal assembles the node data from the extended business protocol field into the task node data of the standardized reserved field, and creates a workflow canvas with extended business protocol data based on the assembled business protocol data. Therefore, by dividing the system component architecture into a view interface layer and a business protocol layer, the original workflow canvas is created through the business protocol layer, and the view components are extended through the view modules in the view interface layer, as well as the functional attributes of the view components are extended through the interface encapsulation modules in the view interface layer. At the same time, the business protocol data is divided into standardized reserved fields and business-oriented extended fields to extend the protocol data of the workflow canvas. This improves the efficiency of business extension of the workflow canvas, and further enhances the applicability and development and maintenance efficiency of the workflow canvas.
[0093] To better implement the above methods, embodiments of the present invention also provide a workflow drawing device, which can be integrated into an electronic device, which can be a terminal.
[0094] For example, such as Figure 7The diagram shown is a structural schematic of a workflow drawing device provided in an embodiment of this application. The workflow drawing device may include a creation unit 301, a component input unit 302, a determination unit 303, an interface input unit 304, and a drawing unit 305, as follows: Create unit 301 to create the original workflow canvas based on the business protocol layer in the system component architecture; The component input unit 302 is used to input business extension components from the original workflow canvas through the view module in the view interface layer; The determining unit 303 is used to determine the target functional interface corresponding to the business extension component from the candidate functional interfaces through the interface encapsulation module in the view interface layer. The interface input unit 304 is used to input the target function interface of the business extension component through the interface encapsulation module in the view interface layer to obtain the extended workflow canvas. The drawing unit 305 is used to draw the workflow based on the expanded workflow canvas.
[0095] In one embodiment, the component input unit 302 includes: The component extension subunit is used to pass the business extension component through the slot in the original workflow canvas through the view module in the view interface layer when a component extension request for the view interface layer is received. The data extension subunit is used to dynamically pass the business view extension data corresponding to the business extension component into the original workflow canvas through the parameter receiving interface when a data extension request for the view interface layer is received.
[0096] In one embodiment, the component extends the subunit, including: The target module component is passed in as a module, which is used to pass the target module component through the slot in the original workflow canvas based on the view module in the view interface layer; The global operation area insertion module is used to insert the global operation area into the slot of the target module component. The subcomponent insertion module is used to insert the target business subcomponent into this global operation area.
[0097] In one embodiment, the data expansion subunit includes: The acquisition module is used to acquire the business view extension data corresponding to the business extension component; The generation module is used to pass the business view extension data into the business extension component, and dynamically generate the corresponding business view of the business extension component in the original workflow canvas based on the business view extension data.
[0098] In one embodiment, the workflow drawing device further includes: The acquisition unit is used to acquire the extended business extension field corresponding to the business extension field when an extension request for business protocol data is received. The parsing unit is used to parse the extended business-oriented fields and obtain the parsing results; An assembly unit is used to assemble the extended business-oriented fields into the standardized reserved fields of the business protocol data based on the parsing result. The Business Protocol Extension Creation Unit is used to create a workflow canvas with extended business protocol data based on the assembled business protocol data.
[0099] In one embodiment, the assembly unit includes: The pure business field acquisition subunit is used to obtain the pure business field in the extended business field according to the parsing result when there is a pure business field in the extended business field, so as to execute the business logic corresponding to the pure business field based on the pure business field. The workflow convention field assembly subunit is used to assemble the workflow convention field in the extended business extension field into the target field of the standardized reserved field according to the parsing result when the extended business extension field contains a workflow convention field.
[0100] In one embodiment, the workflow convention field assembly subunit is used for: When there is connection data in the workflow convention field, the connection data in the extended business extension field is assembled into the connection data in the standardized reserved field; When node data exists in the workflow convention field, the node data in the extended business-oriented extended field is assembled into the task node data in the standardized reserved field.
[0101] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.
[0102] As described above, in this embodiment, the creation unit 301 creates an original workflow canvas based on the business protocol layer in the system component architecture; the component input unit 302 inputs the business extension component into the original workflow canvas through the view module in the view interface layer; the determination unit 303 determines the target function interface corresponding to the business extension component from the candidate function interfaces through the interface encapsulation module in the view interface layer; the interface input unit 304 inputs the target function interface of the business extension component through the interface encapsulation module in the view interface layer, thus obtaining the extended workflow canvas; and the drawing unit 305 draws the workflow based on the extended workflow canvas. Therefore, by dividing the system component architecture into a view interface layer and a business protocol layer, and then creating the original workflow canvas through the business protocol layer, extending the view components through the view module in the view interface layer, and extending the functional attributes of the view components through the interface encapsulation module in the view interface layer, the efficiency of business extension of the workflow canvas is improved, further enhancing the applicability and development and maintenance efficiency of the workflow canvas.
[0103] This application also provides an electronic device, such as... Figure 8 The diagram shows a schematic representation of the structure of an electronic device according to an embodiment of this application. This electronic device can be a terminal; specifically: The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will understand that... Figure 8 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 401 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 402, and by calling data stored in the memory 402, thereby controlling the electronic device as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 401.
[0104] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and workflow rendering by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0105] The electronic device also includes a power supply 403 that supplies power to the various components. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 403 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0106] The electronic device may also include an input unit 404, which can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0107] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 401 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 402 according to the following instructions, and the processor 401 runs the applications stored in the memory 402 to realize various functions, as follows: An original workflow canvas is created based on the business protocol layer in the system component architecture; business extension components are passed into the original workflow canvas through the view module in the view interface layer; the target function interface corresponding to the business extension component is determined from the candidate function interfaces through the interface encapsulation module in the view interface layer; the target function interface of the business extension component is passed into the interface encapsulation module in the view interface layer to obtain the extended workflow canvas; and the workflow is drawn based on the extended workflow canvas.
[0108] The specific implementation of each of the above operations can be found in the preceding embodiments, and will not be repeated here. It should be noted that the electronic device provided in this application embodiment and the workflow drawing method in the above embodiments belong to the same concept, and its specific implementation process can be found in the above method embodiments, and will not be repeated here.
[0109] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0110] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the workflow drawing methods provided in embodiments of this application. For example, the instructions can execute the following steps: An original workflow canvas is created based on the business protocol layer in the system component architecture; business extension components are passed into the original workflow canvas through the view module in the view interface layer; the target function interface corresponding to the business extension component is determined from the candidate function interfaces through the interface encapsulation module in the view interface layer; the target function interface of the business extension component is passed into the interface encapsulation module in the view interface layer to obtain the extended workflow canvas; and the workflow is drawn based on the extended workflow canvas.
[0111] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0112] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the workflow drawing methods provided in the embodiments of this application, the beneficial effects that any of the workflow drawing methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0113] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.
[0114] The above provides a detailed description of a workflow drawing method, apparatus, computer-readable storage medium, and electronic device provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A workflow drawing method, characterized in that, include: The original workflow canvas is created based on the business protocol layer in the system component architecture, which also includes a view interface layer. The business extension component is passed into the original workflow canvas through the view module in the view interface layer; The target functional interface corresponding to the business extension component is determined from the candidate functional interfaces by the interface encapsulation module in the view interface layer. The target function interface of the business extension component is passed through the interface encapsulation module in the view interface layer to obtain the extended workflow canvas. The workflow is drawn based on the expanded workflow canvas; The business protocol layer includes business protocol data, which includes business-oriented extended fields and standardized reserved fields. The business-oriented extended fields support the extension of workflow data and business data, while the standardized reserved fields are unmodified data parsed by the backend workflow engine. The method further includes: when receiving an extension request for the business protocol data, obtaining the extended business-oriented extended fields corresponding to the business-oriented extended fields; parsing the extended business-oriented extended fields to obtain a parsing result; assembling the extended business-oriented extended fields into the standardized reserved fields of the business protocol data according to the parsing result; and creating a workflow canvas with extended business protocol data based on the assembled business protocol data.
2. The workflow drawing method as described in claim 1, characterized in that, The process of passing business extension components into the original workflow canvas through the view module in the view interface layer includes: When a component extension request for the view interface layer is received, the business extension component is passed in through slotted instructions in the original workflow canvas via the view module in the view interface layer. When a data extension request for the view interface layer is received, the business view extension data corresponding to the business extension component is dynamically passed into the original workflow canvas through the parameter receiving interface.
3. The workflow drawing method as described in claim 2, characterized in that, The business extension component includes a target module component and a target business sub-component of the target module component. The business extension component is passed to the original workflow canvas through a slot in the view module of the view interface layer, including: Based on the view module in the view interface layer, the target module component is passed through the slot in the original workflow canvas by the main entry component. Insert the target module component slot into the global operation area; Insert the target business sub-component into the global operation area.
4. The workflow drawing method as described in claim 2, characterized in that, The step of dynamically transmitting the business view extension data corresponding to the business extension component into the original workflow canvas via the parameter receiving interface includes: Obtain the business view extension data corresponding to the business extension component; The business view extension data is passed into the business extension component, and the business view corresponding to the business extension component is dynamically generated in the original workflow canvas based on the business view extension data.
5. The workflow drawing method as described in claim 1, characterized in that, The step of assembling the extended business-oriented fields into the standardized reserved fields of the business protocol data based on the parsing result includes: When there is a pure business field in the extended business-oriented extended field, the pure business field in the extended business-oriented extended field is obtained according to the parsing result, so as to execute the business logic corresponding to the pure business field based on the pure business field; When the extended business-oriented extended field contains a workflow convention field, the workflow convention field in the extended business-oriented extended field is assembled into the target field of the standardized reserved field according to the parsing result.
6. The workflow drawing method as described in claim 5, characterized in that, The step of assembling the workflow convention fields in the expanded business-oriented extended fields into the target fields of the standardized reserved fields based on the parsing result includes: When there is connection data in the workflow convention field, the connection data in the extended business-oriented extended field is assembled into the connection data in the standardized reserved field; When node data exists in the workflow convention field, the node data in the extended business-oriented extended field is assembled into the task node data in the standardized reserved field.
7. A workflow drawing device, characterized in that, include: A creation unit is used to create an original workflow canvas based on the business protocol layer in the system component architecture. The system component architecture also includes a view interface layer. The business protocol layer includes business protocol data, which includes business-oriented extended fields and standardized reserved fields. The business-oriented extended fields support the extension of workflow data and business data, and the standardized reserved fields are unmodified data parsed by the backend workflow engine. The component input unit is used to input business extension components into the original workflow canvas through the view module in the view interface layer; The determining unit is used to determine the target functional interface corresponding to the business extension component from the candidate functional interfaces through the interface encapsulation module in the view interface layer; The interface input unit is used to input the target function interface of the business extension component through the interface encapsulation module in the view interface layer to obtain the extended workflow canvas. A drawing unit is used to draw the workflow based on the expanded workflow canvas; The acquisition unit is used to acquire the extended business extension field corresponding to the business extension field when an extension request for the business protocol data is received; The parsing unit is used to parse the extended business-oriented fields and obtain the parsing results; An assembly unit is used to assemble the extended business-oriented extended fields into the standardized reserved fields of the business protocol data according to the parsing result; The Business Protocol Extension Creation Unit is used to create a workflow canvas with extended business protocol data based on the assembled business protocol data.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the workflow drawing method according to any one of claims 1 to 6.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the workflow drawing method according to any one of claims 1 to 6.
10. A computer program product comprising computer instructions stored in a computer-readable storage medium, wherein a processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions such that the electronic device performs the workflow drawing method of any one of claims 1 to 6.
Citation Information
Patent Citations
Service calling method and device
CN107066315A
Componentized and extensible workflow model
CN1755721A