Development method, device and equipment for customizing low code based on Grouping
Through a custom low-code development method based on Groovy, combined with EasyRule rule engine and Kafka message queue, Groovy scripts are loaded dynamically to achieve rapid configuration and execution of rules, solving the problems of inefficient development and waste of resources in the existing development model, and achieving the effect of quickly responding to demand changes and improving development efficiency.
Patent Information
- Application Number
- CN202510265878.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-07
- Publication Date
- 2025-04-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When the existing development model faces real-time changes in enterprise needs, development efficiency is inefficient and resource waste is severe, and every code modification may cause new problems, requiring comprehensive testing and debugging to ensure the stability and correctness of the system.
Using a custom low-code development method based on Groovy, Groovy script editor provides syntax highlighting, code formatting and automatic completion, and combines EasyRule rule engine with Kafka message queue to dynamically load Groovy scripts to achieve fast configuration and execution of rules.
It quickly responds to changes in demand, reduces development and maintenance costs, improves development efficiency, and improves seamless data interaction with Spring services through unified class loading mechanisms, improving the integration capabilities of low-code platforms and external systems.
Smart Images

Figure CN119759329A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of software development technology, and for example, to a development method, device, and equipment based on Groovy custom low-code. Background Art
[0002] In today's era of rapid digital development, low-code development platforms are gradually becoming an important choice for enterprises to build applications. In the application scenarios of low-code development platforms, the needs of enterprises are usually highly personalized and dynamic.
[0003] Traditional development models often require developers to constantly adjust business logic and deploy new code to meet real-time changing needs. When an enterprise puts forward new requirements, developers must first spend a lot of time to understand the details of the business requirements and analyze the compatibility of the existing code structure with the new requirements. In the process of adjusting the business logic, the code needs to be modified and tested, which not only requires developers to have a deep technical foundation, but also requires a lot of time and energy. Moreover, every code modification may cause new problems, requiring comprehensive testing and debugging to ensure the stability and correctness of the system.
[0004] Therefore, in the existing development process, there are problems of low development efficiency and waste of resources.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of this application. Summary of the invention
[0006] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical elements or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0007] The present disclosure provides a development method based on Groovy custom low-code, the method comprising: The Groovy script editor is based on the Monaco Editor framework. By integrating LSP, it can parse the syntax of the Groovy script edited by the user in real time, provide syntax highlighting, code formatting and automatic completion, and verify the edited Groovy script. After verification, it interacts with Minio through the Rest API. Receive the Groovy script associated with the rule selected by the user, and map the storage path of the corresponding script to the Minio version file to ensure the scalability and consistency of the rule logic; The EasyRule rule engine subscribes to event messages of preset topics through Kafka consumers. Each event message triggers the rule engine to execute the corresponding rules and dynamically loads Groovy scripts according to user configuration.
[0008] In some embodiments, the above method may further include: Through aspect programming or active asynchronous call threads, the triggered events are packaged into standardized messages and published to the Kafka cluster, wherein the standardized messages include event source data and context information.
[0009] In some embodiments, aspect programming is to intercept specified business operations through aspects in the Spring framework and capture events; The asynchronous call is an asynchronous call through a message queue, ensuring that the impact of the event triggering on the main business process meets the preset conditions.
[0010] In some embodiments, the above method may further include: Receive trigger conditions entered by users through the graphical interface to configure rules. The trigger conditions are defined in Spring expression language and support dynamic parsing and runtime execution.
[0011] In some embodiments, the above method may further include: When executing rules, event source data is injected into the script execution context through ThreadLocal; Inject dependencies in the Spring container into the Groovy script so that the script can perform business operations with a complexity that meets the preset complex conditions.
[0012] The embodiment of the present disclosure provides a development device based on Groovy custom low-code, the device comprising: Groovy script editor, based on the Monaco Editor framework, integrates LSP to parse the syntax of Groovy scripts edited by users in real time, provides syntax highlighting, code formatting and automatic completion, and verifies the edited Groovy scripts. After verification, it interacts with Minio through the Rest API; The receiving module is used to receive the Groovy script associated with the rule selected by the user and map the storage path of the corresponding script to the version file of Minio to ensure the scalability and consistency of the rule logic; EasyRule rule engine is used to subscribe to event messages of preset topics through Kafka consumers. Each event message triggers the rule engine to execute the corresponding rules and dynamically load Groovy scripts according to user configuration.
[0013] In some embodiments, the above-mentioned apparatus may further include a processing module; The processing module is used to package the triggered events into standardized messages and publish them to the Kafka cluster through aspect programming or active asynchronous calling threads, wherein the standardized messages include event source data and context information.
[0014] In some embodiments, the aspect programming is to intercept the specified business operation through the aspect in the Spring framework and capture the event; Asynchronous calls are asynchronous calls through message queues, ensuring that the impact of event triggering on the main business process meets preset conditions.
[0015] An embodiment of the present disclosure provides an electronic device, the device comprising at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor to enable the at least one processor to execute the above-mentioned Groovy-based custom low-code development method.
[0016] An embodiment of the present disclosure provides a storage medium storing program instructions, which, when run, execute the above-mentioned Groovy-based custom low-code development method.
[0017] The Groovy-based custom low-code development method, apparatus, device, and storage medium provided in the embodiments of the present disclosure can achieve the following technical effects: The present disclosure combines the EasyRule rule engine with a user-defined rule management system based on the Groovy script dynamic loading technology. Through the online Groovy editor, users can write rule scripts and implement syntax highlighting, code prompts, and real-time detection; the scripts are stored in MinIO, supporting version management and dynamic loading; the system registers the scripts in the rule engine, and implements complex logic execution through conditional judgment, priority sorting, and rule chains. In addition, the system implements seamless data interaction between Groovy scripts and Spring services through a unified class loading mechanism and context transfer technology, and supports dynamic parameter binding and service calls. The present disclosure implements application rule configuration by dynamically loading user-defined Groovy scripts, thereby quickly responding to changes in demand, reducing development and maintenance costs, and improving development efficiency. In addition, Groovy scripts can be integrated with external systems. For example, external system calls can be implemented through programming, external data sources can be directly operated, etc., thereby improving the integration capabilities of the low-code platform with external systems.
[0018] The above general description and the following description are exemplary and explanatory only and are not intended to limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] One or more embodiments are exemplarily described by corresponding drawings, which do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements, and the drawings do not constitute a scale limitation, and wherein: Figure 1 It is a flowchart of a development method based on Groovy custom low-code provided in an embodiment of the present disclosure; Figure 2 It is a flowchart of another development method based on Groovy custom low-code provided by an embodiment of the present disclosure; Figure 3 It is a flowchart of configuring application rules provided by an embodiment of the present disclosure; Figure 4 It is a structural diagram of a development device based on Groovy custom low-code provided by an embodiment of the present disclosure; Figure 5 It is a structural diagram of a development device based on Groovy custom low-code provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0020] In order to be able to understand the features and technical contents of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The attached drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0021] The terms "first", "second", etc. in the embodiments of the present disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchanged where appropriate, so as to describe the embodiments of the present disclosure described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions.
[0022] Unless otherwise stated, the term "plurality" means two or more.
[0023] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B indicates: A or B.
[0024] The term "and / or" is a description of the association relationship between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or, A and B.
[0025] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0026] In order to solve the above problems, the present disclosure provides a development method, apparatus, device and storage medium based on Groovy custom low-code.
[0027] The following is an explanation of the Groovy custom low-code development method, apparatus, device and storage medium provided in the embodiments of the present disclosure in conjunction with the accompanying drawings.
[0028] Figure 1 It is a flowchart of a development method based on Groovy custom low-code provided in an embodiment of the present disclosure.
[0029] Combination Figure 1 As shown in the figure, the development method based on Groovy custom low code can include: S101, the Groovy script editor is based on the Monaco Editor framework. It integrates the Language Server Protocol (LSP) to parse the syntax of the Groovy scripts edited by users in real time, provide syntax highlighting, code formatting, and automatic completion, and verify the edited Groovy scripts. After verification, it interacts with Minio through the Representational State Transfer Application Programming Interface (Rest API); S102, receiving the Groovy script associated with the rule selected by the user, and mapping the storage path of the corresponding script to the version file of Minio to ensure the scalability and consistency of the rule logic; S103, the EasyRule rule engine subscribes to the event messages of the preset topic through the Kafka consumer. Each event message triggers the rule engine to execute the corresponding rule and dynamically loads the Groovy script according to the user configuration.
[0030] In some embodiments, Figure 1 The method may also include: Through aspect programming or active asynchronous call threads, the triggered events are packaged into standardized messages and published to the Kafka cluster, wherein the standardized messages include event source data and context information.
[0031] In some embodiments, the aspect programming is to intercept the specified business operation through the aspect in the Spring framework and capture the event; The above asynchronous call is an asynchronous method through a message queue, which ensures that the impact of event triggering on the main business process meets the preset conditions.
[0032] In some embodiments, Figure 1 The method may also include: Receive trigger conditions entered by users through the graphical interface to configure rules. The trigger conditions are defined in Spring expression language and support dynamic parsing and runtime execution.
[0033] In some embodiments, Figure 1 The method may also include: When executing rules, event source data is injected into the script execution context through ThreadLocal; Inject dependencies in the Spring container into the Groovy script so that the script can perform business operations with a complexity that meets the preset complex conditions.
[0034] Figure 2 is a flowchart of another development method based on Groovy custom low-code provided by an embodiment of the present disclosure, Figure 3 is a flowchart of configuring application rules provided by an embodiment of the present disclosure, combined with Figure 2 and Figure 3 ,right Figure 1 The development method based on Groovy custom low code is further described in.
[0035] like Figure 2 As shown, the present disclosure can be divided into three parts: first: online development of Groovy scripts, publishing Groovy script versions and uploading them to the object storage service Minio; second: configuring low-code platform rules. This article is based on the EasyRule rule engine, and its rules include event sources, prerequisites, priorities, and rule data; third: loading Groovy scripts through a unified class loader, binding Spring context and rule data, executing Groovy scripts, and recording rule execution results.
[0036] 1. Edit Groovy scripts online •Highlighting and code hinting functions: The online Groovy script editor is implemented based on the Monaco Editor framework. By integrating LSP (Language Server Protocol), the editor can parse Groovy syntax in real time and provide syntax highlighting, code formatting, and auto-completion functions. For example, when the user enters "System.", the editor will provide all available methods of the System class in real time.
[0037] • Version management and publishing: During the editing process, a script version will be automatically generated each time the user saves. The system will mark the version with a timestamp and a universally unique identifier (UUID). The version information will be stored in the platform database for users to select, roll back, or delete. The publishing operation will verify the selected version of the script (such as syntax checking and dependency analysis), and upload it to Minio storage after verification.
[0038] •Upload to Minio storage: The published script interacts with Minio through the Rest API. The system generates a storage path for each script, such as " / scripts / {script_name} / {version}", to facilitate subsequent quick access and dynamic loading. The upload process includes script compression, encryption (optional), and the addition of metadata (version number, creation time, etc.).
[0039] 2. Configure application rules like Figure 3 As shown in the figure, you can use low-code platform applications, forms, and users as event sources, and publish events to the Kafka cluster through aspects or actively through changes in platform applications, forms, and user data. At the same time, the event listener listens to the event and calls EasyRule to execute the event.
[0040] •Definition and triggering of event sources: Event sources can be changes in applications, forms, or user data, such as order status updates or form submissions. Event triggering is achieved in two ways: 1) Aspect-Oriented Programming (AOP): In the Spring framework, aspects are used to intercept specified business operations and capture events.
[0041] 2) Asynchronous call: Through the asynchronous method of message queue, ensure that event triggering has minimal impact on the main business process.
[0042] • Event message publishing: Triggered events are packaged into standardized messages and published to the Kafka cluster. The message body contains event source data (such as order ID, changed fields) and context information to ensure that consumers can correctly parse the event.
[0043] •Rule condition configuration: Users configure the triggering conditions of the rules through a graphical interface. The conditions are defined using Spring Expression Language (SpEL), which supports dynamic parsing and runtime execution.
[0044] • Bind Groovy scripts: The rule configuration interface allows users to select the Groovy script associated with the rule. The storage path of the selected script is automatically mapped to the specific version file of Minio to ensure the scalability and consistency of the rule logic.
[0045] 3. Unified class loader and rule execution • Unified class loading technology: Designed and implemented a shared class loader to dynamically load Groovy scripts and ensure that the scripts share the same class definitions as Spring applications. This solves common class loading conflict issues and enables Groovy scripts to call Spring Beans seamlessly.
[0046] •Kafka message subscription and event processing: The EasyRule rule engine subscribes to event messages of specific topics through Kafka consumers. Each message triggers the rule engine to execute the corresponding rule and dynamically loads the Groovy script according to user configuration.
[0047] •Contextual data binding and execution: 1) When executing rules, event source data will be injected into the script execution context through ThreadLocal, such as order information, user information, etc.
[0048] 2) The system also supports injecting dependencies in the Spring container (such as database operation services) into Groovy scripts, allowing the scripts to directly perform complex business operations.
[0049] • Rule execution result recording: The input parameters, output results and status information of rule execution will be persisted in the database. Recording structured data facilitates subsequent auditing, debugging and analysis.
[0050] The present invention provides a development method based on Groovy custom low-code, combined with a user-defined rule management system that combines the EasyRule rule engine and Groovy script dynamic loading technology. Through the online Groovy editor, users can write rule scripts and implement syntax highlighting, code prompts and real-time detection; the scripts are stored in Minio, supporting version management and dynamic loading; the system registers the scripts with the rule engine, and implements complex logic execution through conditional judgment, priority sorting and rule chains. In addition, through a unified class loading mechanism and context transfer technology, seamless data interaction between Groovy scripts and Spring services is achieved, supporting dynamic parameter binding and service calls. The flexibility and scalability of the rule engine have been significantly improved, and it is suitable for dynamic rule management and complex business logic orchestration scenarios.
[0051] The present disclosure implements application rule configuration by dynamically loading user-defined Groovy scripts, which can quickly respond to changes in demand and reduce development and maintenance costs. In addition, Groovy scripts can be integrated with external systems, such as programming to implement external system calls and directly operate external data sources, thus improving the low-code platform's ability to integrate with external systems.
[0052] and Figure 1 Corresponding to the development method based on Groovy custom low code, the present disclosure also provides a development device based on Groovy custom low code, such as Figure 4 As shown, the device comprises: Groovy script editor 401 is based on the Monaco Editor framework. It integrates LSP to parse the syntax of the Groovy script edited by the user in real time, provide syntax highlighting, code formatting and automatic completion, and verify the edited Groovy script. After verification, it interacts with Minio through the Rest API; The receiving module 402 is used to receive the Groovy script associated with the rule selected by the user, and map the storage path of the corresponding script to the version file of Minio to ensure the scalability and consistency of the rule logic; The EasyRule rule engine 403 is used to subscribe to event messages of preset topics through Kafka consumers. Each event message triggers the rule engine to execute corresponding rules and dynamically loads Groovy scripts according to user configuration.
[0053] In some embodiments, the apparatus may further include a processing module; The processing module can be used to package the triggered events into standardized messages and publish them to the Kafka cluster through aspect programming or active asynchronous call threads, wherein the standardized messages include event source data and context information.
[0054] In some embodiments, the aspect programming is to intercept the specified business operation through the aspect in the Spring framework and capture the event; Asynchronous calls are asynchronous calls through message queues, ensuring that the impact of event triggering on the main business process meets preset conditions.
[0055] In some embodiments, the receiving module 402 is further used to receive trigger conditions input by the user through a graphical interface to configure the rule. The trigger conditions are defined using Spring expression language and support dynamic parsing and runtime execution.
[0056] In some embodiments, the processing module is also used to inject event source data into the script execution context through ThreadLocal when executing rules; and inject dependencies in the Spring container into the Groovy script so that the script performs business operations with a complexity that meets preset complex conditions.
[0057] Combination Figure 5 As shown, the embodiment of the present disclosure also provides a development device 500 based on Groovy custom low code, including a processor 504 and a memory 501. Optionally, the system may also include a communication interface 502 and a bus 503. Among them, the processor 504, the communication interface 502, and the memory 501 can communicate with each other through the bus 503. The communication interface 502 can be used for information transmission. The processor 504 can call the logical instructions in the memory 501 to execute the development method based on Groovy custom low code of the above embodiment.
[0058] In addition, the logic instructions in the memory 501 described above can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0059] The memory 501 is a computer-readable storage medium that can be used to store software programs and computer executable programs, such as program instructions / modules corresponding to the method in the embodiment of the present disclosure. The processor 504 executes the functional application and data processing by running the program instructions / modules stored in the memory 501, that is, implementing the development method based on Groovy custom low code in the above embodiment.
[0060] The memory 501 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 501 may include a high-speed random access memory and may also include a non-volatile memory.
[0061] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as a development method based on Groovy custom low-code.
[0062] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.
[0063] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method of the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.
[0064] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent possible changes only. Unless explicitly required, individual components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. As used in the description of the embodiments, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or including (comprising) refer to the existence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the existence or addition of one or more other features, wholes, steps, operations, elements, components and / or these groups. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method or device comprising the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same or similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.
[0065] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. Technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. Technicians can clearly understand that for the convenience and simplicity of description, the specific working process of the systems, devices and units described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0066] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit.
[0067] The flowchart and block diagram in the accompanying drawings show the possible architecture, functions and operations of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and a part of the module, program segment or code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
[0068] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0069] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0070] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include electrical connections based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0071] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0072] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0073] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0074] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of this disclosure can be achieved, and this document is not limited here.
[0075] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A development method based on Groovy custom low-code, characterized in that: The method comprises: The Groovy script editor is based on the Monaco Editor framework. By integrating LSP, it can parse the syntax of the Groovy script edited by the user in real time, provide syntax highlighting, code formatting and automatic completion, and verify the edited Groovy script. After verification, it interacts with Minio through the Rest API. Receive the Groovy script associated with the rule selected by the user, and map the storage path of the corresponding script to the Minio version file to ensure the scalability and consistency of the rule logic; The EasyRule rule engine subscribes to event messages of preset topics through Kafka consumers. Each event message triggers the rule engine to execute the corresponding rules and dynamically loads Groovy scripts according to user configuration.
2. The method according to claim 1, characterized in that The method further comprises: Through aspect programming or active asynchronous call threads, the triggered events are packaged into standardized messages and published to the Kafka cluster, wherein the standardized messages include event source data and context information.
3. The method according to claim 2, characterized in that The aspect programming is to intercept the specified business operations and capture events through the aspect in the Spring framework; The asynchronous call is an asynchronous call through a message queue, ensuring that the impact of the event triggering on the main business process meets the preset conditions.
4. The method according to claim 1, characterized in that The method further comprises: Receive trigger conditions entered by users through the graphical interface to configure rules. The trigger conditions are defined in Spring expression language and support dynamic parsing and runtime execution.
5. The method according to claim 1, characterized in that The method further comprises: When executing rules, event source data is injected into the script execution context through ThreadLocal; Inject dependencies in the Spring container into the Groovy script so that the script can perform business operations with a complexity that meets the preset complex conditions.
6. A development device based on Groovy custom low-code, characterized in that: The device comprises: Groovy script editor, based on the Monaco Editor framework, integrates LSP to parse the syntax of Groovy scripts edited by users in real time, provides syntax highlighting, code formatting and automatic completion, and verifies the edited Groovy scripts. After verification, it interacts with Minio through the Rest API; The receiving module is used to receive the Groovy script associated with the rule selected by the user and map the storage path of the corresponding script to the version file of Minio to ensure the scalability and consistency of the rule logic; EasyRule rule engine is used to subscribe to event messages of preset topics through Kafka consumers. Each event message triggers the rule engine to execute the corresponding rules and dynamically load Groovy scripts according to user configuration.
7. The device according to claim 6, characterized in that The device also includes a processing module; The processing module is used to package the triggered events into standardized messages and publish them to the Kafka cluster through aspect programming or active asynchronous calling threads, wherein the standardized messages include event source data and context information.
8. The device according to claim 7, characterized in that The aspect programming is to intercept the specified business operations and capture events through the aspect in the Spring framework; The asynchronous call is an asynchronous call through a message queue, ensuring that the impact of the event triggering on the main business process meets the preset conditions.
9. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; It is characterized in that the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1 to 5.
10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Management method and device of software system service rules
CN103019726A
Rule engine, calculating method, service system and calling method
CN103942228A
Groovy-based rule engine system
CN106325854A
Method and device for constructing a rule engine
CN107133039A
Data processing method and device, server and readable storage medium
CN111538483A