Method for supporting custom business rule based on low-code development platform

By building standard business forms on low-code development platforms and providing expansion point rule base classes and rule engines, the problem of insufficient platform flexibility and scalability is solved, the customization and functional expansion of business rules are realized, and the development efficiency and Application flexibility.

CN119201076AInactive Publication Date: 2024-12-27河钢数字技术股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411131345.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-17
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Low-code development platforms lack flexibility and scalability in dealing with complex business logic and multi-system integration, and cannot meet the complex needs of developers.

Method used

By building standard business forms on low-code platforms, it provides extension point rule base classes, rule engines and CustomDao data access objects, supports dynamic and static rule loading, allowing developers to customize business rules based on business scenarios, improving the flexibility of the platform and Extensibility.

Benefits of technology

It realizes the flexibility and scalability of a low-code development platform, allowing developers to expand standard business form functions according to specific business needs, reduces coding needs, and improves development efficiency and application flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201076A_ABST
    Figure CN119201076A_ABST
Patent Text Reader

Abstract

The invention discloses a method for supporting user-defined business rules based on a low-code development platform, and relates to the technical field of application development, the method for supporting the user-defined business rules based on the low-code development platform comprises the following steps: a first step, a second step, a third step, a fourth step and a fifth step, a low-code platform provides a universal form component to support the establishment of the service form, a form page is designed, and a developer drags a left side component to a middle form design frame to complete the form design; 2, a core module comprises an expansion point rule base class of the standard business form, rich standard business form built-in components, a rule engine for driving execution of an expansion point rule chain, an expansion point rule chain dynamic and static loading mechanism and a CustomDao data access object for operating business data in an expansion point rule; a java development engineer user of a low-code development platform can customize a service rule to extend the function of a standard service form according to a specific service scene and personalized service requirements.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of application development technology, and in particular to a method for supporting customized business rules based on a low-code development platform. Background Art

[0002] With the development of information technology, the demand for application development continues to increase. Traditional application development methods require a lot of coding and testing work, with long development cycles and high costs. Therefore, a low-code development framework is needed to quickly build applications and reduce development costs and time. The original intention of low-code platforms is to lower the development threshold, but this also means that they may have limitations in handling complexity and high customization. When applications need to process large amounts of data, complex business logic, or involve multiple integrated systems, low-code platforms may not provide sufficient flexibility and scalability. Limitations of flexibility and scalability of low-code platforms.

[0003] To address the above issues, a method based on a low-code development platform to support custom business rules is proposed. Summary of the invention

[0004] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art, and to provide a method for supporting customized business rules based on a low-code development platform, which can solve the problems of the background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: a method for supporting custom business rules based on a low-code development platform, comprising the following steps:

[0006] The first step is to build a standard business form on the low-code platform: The low-code platform provides common form components to support the construction of business forms and design form pages. Developers complete the form design by dragging the components on the left to the middle form design box;

[0007] The second step is the core module: the extension point rule base class of the standard business form, a rich set of standard business form built-in components, the rule engine that drives the execution of the extension point rule chain, the dynamic and static loading mechanism of the extension point rule chain, and the CustomDao data access object that operates the business data in the extension point rule;

[0008] The third step is to extend the rule base class to inherit from the virtual base class AbstractCustomFormRule;

[0009] The fourth step is to combine the general needs of the actual business of the form and its processing solutions, and build in a series of basic rules to improve the rapid delivery attributes of the low-code development platform;

[0010] The fifth step is the rule engine architecture, CustomFormRuleEngine, which is responsible for the execution of the rule chain, the extraction of data context involved in the extension point, the processing of rule execution results, and the personalized execution verification logic of the rule. Each rule corresponds to a rule engine;

[0011] Step 6: Rule loading mechanism. The extension point rule loading mechanism includes dynamic loading and static loading.

[0012] Step 7: The CustomDao data access object provides basic methods for adding, deleting, modifying and checking form data. It is a data tool for platform development engineers to develop rule classes to extend form functions. It can perform execution verification of business logic and data processing of form-related business tables.

[0013] Preferably, after the first step of form design is completed, basic functions can be realized, including paging query, adding, modifying, and querying details.

[0014] Preferably, in the second step, through the above-mentioned core module, Java engineers who use the low-code development platform for development work can expand the standard business form according to specific business scenarios and personalized business needs.

[0015] Preferably, the virtual base class in the third step defines the basic behavior interfaces such as the rule executable verification method, rule attribution strategy, and rule core execution logic. The RuleResult interface defines the rule return value, and the CustomFormRuleContext interface defines the rule execution context. Different extension point rule base classes define different implementation classes of the RuleResult and CustomFormRuleContext interfaces to define the usage scenarios, data sources, and responsibilities of the corresponding rules. The extension point rules are embedded in the execution logic of the standard form. The rule engine collects the context data that can be processed at the rule extension point location and places it on the rule chain. After the rule is executed, the result chain of the rule processing is processed by different rule engine logics and fed back to the standard form execution logic to support specific business scenarios and personalized business needs.

[0016] Preferably, the basic rules of the fourth step include data field uniqueness verification rules, form data modification process status check rules, form association process trigger rules, form association process query rules, form query data conversion rules, form data link conversion rules, form list data sorting initialization rules, form query default condition setting rules, form behavior log rules, and number generation rules.

[0017] Preferably, the sixth step implements the writing location of the class, which can be in the low-code platform project code project or a custom code project. The jar generated by the custom code project needs to be placed in the specified location of the low-code server. The static rule loading mode is to scan the rule configuration of the database during service startup, load it into the JVM according to the full path name of the rule class, and register it with the spring container context. The rule definition needs to match the corresponding rule engine, and then complete the initialization logic of the rule engine in serial, and execute the rule cache strategy. The dynamic rule loading mode is that when the low-code platform service is running, use the form design page to add a rule function, configure the full path name of the rule class as the form rule, asynchronously complete the engine registration process of the rule, load the class into the JVM and register it with the spring container context. The rule definition needs to match the corresponding rule engine, and the rule engine updates the rule cache through the write-time copy strategy, and finally the rule takes effect.

[0018] Preferably, the update method of the data access object in the seventh step has a built-in legal use check of the form template to shield the built-in logic damage caused by the development engineer's arbitrary operation of the form data. The query method supports common SQL statements, including select, from, left join, where, and, or, =, >, <, like, in, order by, and limit.

[0019] Compared with the prior art, the present invention has the following beneficial effects:

[0020] (1) This method of supporting customized business rules based on the low-code development platform enables Java development engineer users of the low-code development platform to customize business rules to expand the functions of standard business forms according to specific business scenarios and personalized business needs.

[0021] (2) The method for supporting custom business rules based on the low-code development platform. The low-code development platform supports users to conveniently operate modules in the module library through a visual interface, without writing a lot of code, and quickly build applications. However, in some complex business scenarios, since the low-code platform only provides the functions of adding, deleting, modifying and checking standard business forms, it may not meet the needs of developers. Therefore, our low-code platform needs to provide a series of extensibility points of standard business forms to meet the development work of actual business scenarios. The present invention provides a method that improves the flexibility and extensibility of the low-code platform without having to process the high concurrency, high performance and high availability that the system core should have. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The present invention is further described below in conjunction with the accompanying drawings and embodiments:

[0023] Figure 1 It is a new form page diagram of the present invention;

[0024] Figure 2 This is a list page diagram of the present invention;

[0025] Figure 3 This is a newly added page diagram of the present invention;

[0026] Figure 4 It is a virtual base class definition diagram of the extension point rule of the present invention;

[0027] Figure 5 This is a diagram of the rule engine and rule relationship class architecture of the present invention;

[0028] Figure 6 The rule engine of the present invention is embedded in a standard form to execute a logic flow chart. DETAILED DESCRIPTION

[0029] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0030] In order to further understand the content of the present invention, the present invention is described in detail in conjunction with the accompanying drawings.

[0031] See also Figure 1-6 The present invention provides a technical solution: a method for supporting custom business rules based on a low-code development platform, comprising the following steps:

[0032] The first step is to build a standard business form on the low-code platform: The low-code platform provides common form components to support the construction of business forms and design form pages. Developers complete the form design by dragging the components on the left to the middle form design box. After the form design is completed, basic functions can be realized, including paging query, adding, modifying, and querying details;

[0033] The second step is the core modules: the extension point rule base class of the standard business form, the rich built-in components of the standard business form, the rule engine that drives the execution of the extension point rule chain, the dynamic and static loading mechanism of the extension point rule chain, and the CustomDao data access object that operates the business data in the extension point rule. Through the above core modules, Java engineers who use the low-code development platform for development can extend the standard business form according to specific business scenarios and their personalized business needs.

[0034] The third step is to extend the rule base class to inherit from the virtual base class AbstractCustomFormRule;

[0035] This virtual base class defines basic behavior interfaces such as rule executable verification method, rule attribution strategy, and rule core execution logic. The RuleResult interface defines the rule return value, and the CustomFormRuleContext interface defines the rule execution context. Different extension point rule base classes define different implementation classes of the RuleResult and CustomFormRuleContext interfaces to define the usage scenarios, data sources, and responsibilities of the corresponding rules. The extension point rules are embedded in the execution logic of the standard form. The rule engine collects context data that can be processed at the rule extension point location and places it on the rule chain. After the rule is executed, the result chain of the rule processing is processed by different rule engine logics and fed back to the standard form execution logic to support specific business scenarios and personalized business needs.

[0036] The standard business form data interface is used as the extension point definition. The standard business form data interface includes form data addition, form data update, form data deletion, form data query, and form data custom update. Existing extension points include rules before data addition behavior execution, rules before data addition transaction start, rules after data addition transaction completion, rules after data addition transaction rollback, rules before data modification behavior execution, rules before data modification transaction start, rules after data modification transaction completion, rules after data modification transaction rollback, rules before data deletion behavior execution, rules before data deletion transaction start, rules after data deletion transaction completion, rules after data deletion transaction rollback, rules before data list query behavior, rules before data list query behavior, rules before data detail query behavior, rules after data detail query behavior, and custom button execution rules.

[0037] The fourth step is to combine the general needs of the actual form business and its processing solutions, and build in a series of basic rules to enhance the rapid delivery attributes of the low-code development platform. The basic rules include data field uniqueness verification rules, form data modification process status check rules, form association process trigger rules, form association process query rules, form query data conversion rules, form data link conversion rules, form list data sorting initialization rules, form query default condition setting rules, form behavior log rules, and number generation rules;

[0038] The fifth step is the rule engine architecture, CustomFormRuleEngine, which is responsible for the execution of the rule chain, the extraction of data context involved in the extension point, the processing of rule execution results, and the personalized execution verification logic of the rule. Each rule corresponds to a rule engine;

[0039] Step 6: Rule loading mechanism. The extension point rule loading mechanism includes two methods: dynamic loading and static loading. The writing location of the rule implementation class can be in the low-code platform project code project or in a custom code project. The jar generated by the custom code project needs to be placed in the specified location of the low-code server. The static rule loading mode is to scan the rule configuration of the database during service startup, load it into the JVM according to the full path name of the rule class, and register it with the spring container context. The rule definition must match the corresponding rule engine, and then complete the initialization logic of the rule engine in serial, and execute the rule cache strategy. The dynamic rule loading mode is that when the low-code platform service is running, use the form design page to add a rule function, configure the full path name of the rule class as the form rule, asynchronously complete the engine registration process of the rule, load the class into the JVM and register it with the spring container context. The rule definition must match the corresponding rule engine. The rule engine updates the rule cache through the copy-on-write strategy, and finally the rule takes effect;

[0040] Step 7: The CustomDao data access object provides basic methods for adding, deleting, modifying and checking form data. It is a data tool for platform development engineers to develop rule classes to expand form functions. It can perform business logic execution verification, data processing of form-related business tables, etc. The update method of the data access object has a built-in legal use verification of the form template to shield the built-in logic from damage caused by arbitrary operations on form data by development engineers. The query method supports common SQL statements, including select, from, left join, where, and, or, =, >, <, like, in, order by, limit, etc. Code example:

[0041] 1. Add table data

[0042] TableEntity tableEntity=new TableEntity();

[0043] tableEntity.setTableCode("ef_xdfsdw"); / / Specify the table name

[0044] tableEntity.setColumn("status",1); / / Set column value

[0045] tableEntity.setColumn("xxName","Application Development");

[0046] customDao.save(tableEntity);

[0047] Long id=tableEntity.getPrimaryId();

[0048] 2. Modify table data

[0049] TableEntity tableEntity=new TableEntity();

[0050] tableEntity.setTableCode("ef_xdfsdw"); / / Specify the table name

[0051] tableEntity.setPrimaryId(1L);

[0052] tableEntity.setColumn("status",1); / / Set column value

[0053] customDao.update(tableEntity);

[0054] 3. Query a single piece of data

[0055] TableEntity tableEntity=customDao.getById("ef_xdfsdw",1L);

[0056] Map<String,Object> tableData = tableEntity.getTableData(); / / Get all column data

[0057] Object eName = tableEntity.getColumn("eName"); / / Get single column value

[0058] 4. Delete table data

[0059] TableEntity tableEntity=new TableEntity();

[0060] tableEntity.setTableCode("ef_xdfsdw"); / / Specify the table name

[0061] tableEntity.setPrimaryId(1L);

[0062] customDao.delete(tableEntity);

[0063] Form number generation belongs to the rule before the data addition behavior is executed. This class inherits the AbstractBeforeActionRule class. This rule is executed before the data is added to the database. The rule function is to generate a number based on the form number template and assign a value to the number field. The class source code is as follows:

[0064]

[0065]

[0066] }

[0067] return BeforeActionRuleResult.success();

[0068] }

[0069] }

[0070] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for supporting custom business rules based on a low-code development platform, characterized in that: The steps include: The first step is to build a standard business form on the low-code platform: The low-code platform provides common form components to support the construction of business forms and design form pages. Developers complete the form design by dragging the components on the left to the middle form design box; The second step is the core module: the extension point rule base class of the standard business form, a rich set of standard business form built-in components, the rule engine that drives the execution of the extension point rule chain, the dynamic and static loading mechanism of the extension point rule chain, and the CustomDao data access object that operates the business data in the extension point rule; Step 3: The extension point rule base class inherits from the virtual base class AbstractCustomFormRule; The fourth step is to combine the general needs of the actual business of the form and its processing solutions, and build in a series of basic rules to improve the rapid delivery attributes of the low-code development platform; The fifth step is the rule engine architecture, CustomFormRuleEngine, which is responsible for the execution of the rule chain, the extraction of data context involved in the extension point, the processing of rule execution results, and the personalized execution verification logic of the rule. Each rule corresponds to a rule engine; Step 6: Rule loading mechanism. The extension point rule loading mechanism includes dynamic loading and static loading. Step 7: The CustomDao data access object provides basic methods for adding, deleting, modifying and checking form data. It is a data tool for platform development engineers to develop rule classes to extend form functions. It can perform execution verification of business logic and data processing of form-related business tables.

2. According to claim 1, a method for supporting custom business rules based on a low-code development platform is characterized in that: After the first step of form design is completed, basic functions can be realized, including paging query, adding, modifying, and querying details.

3. According to claim 2, a method for supporting custom business rules based on a low-code development platform is characterized in that: In the second step, through the above core modules, Java engineers who use the low-code development platform for development can expand the standard business forms according to specific business scenarios and personalized business needs.

4. According to claim 3, a method for supporting custom business rules based on a low-code development platform is characterized in that: In the third step, this virtual base class defines the basic behavior interfaces such as the rule executable verification method, rule attribution strategy, and rule core execution logic. The RuleResult interface defines the rule return value, and the CustomFormRuleContext interface defines the rule execution context. Different extension point rule base classes define different implementation classes of the RuleResult and CustomFormRuleContext interfaces to define the usage scenarios, data sources, and responsibilities of the corresponding rules. The extension point rules are embedded in the execution logic of the standard form. The rule engine collects the context data that can be processed at the rule extension point location and places it on the rule chain. After the rule is executed, the result chain of the rule processing is processed by different rule engine logics and fed back to the standard form execution logic to support specific business scenarios and personalized business needs.

5. According to claim 4, a method for supporting custom business rules based on a low-code development platform is characterized in that: The fourth step basic rules include data field uniqueness verification rules, form data modification process status check rules, form association process trigger rules, form association process query rules, form query data conversion rules, form data link conversion rules, form list data sorting initialization rules, form query default condition setting rules, form behavior log rules, and number generation rules.

6. A method for supporting custom business rules based on a low-code development platform according to claim 5, characterized in that: The sixth step implements the writing location of the class, which can be in the low-code platform project code project or a custom code project. The jar generated by the custom code project needs to be placed in the specified location of the low-code server. The static loading mode of rules is to scan the rule configuration of the database during service startup, load it into the JVM according to the full path name of the rule class, and register it with the spring container context. The rule definition needs to match the corresponding rule engine, and then complete the initialization logic of the rule engine in serial, and execute the rule cache strategy. The dynamic loading mode of rules is that when the low-code platform service is running, use the form design page to add a rule function, configure the full path name of the rule class as the form rule, asynchronously complete the engine registration process of the rule, load the class into the JVM and register it with the spring container context. The rule definition needs to match the corresponding rule engine, and the rule engine updates the rule cache through the write-time copy strategy, and finally the rule takes effect.

7. A method for supporting custom business rules based on a low-code development platform according to claim 6, characterized in that: The update method of the data access object in the seventh step has a built-in legal use check of the form template to shield the built-in logic from damage caused by the development engineer's arbitrary operation of the form data. The query method supports common SQL statements, including select, from, left join, where, and, or, =, >, <, like, in, order by, and limit.