Method, device, medium and program product for configuring function operators based on business processes
Patent Information
- Application Number
- CN202611168196.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-10-27
AI Technical Summary
[0002]在数据处理或数据分析等大型软件平台中,可以通过设置多个执行不同功能的功能算子,来完成某一个业务流程,对于某一个业务流程,可能包含数百个功能算子,对于每一个功能算子(Operator)都需要单独提供一套程序,来实现不同的功能,因此,对于业务流程的各个功能算子的开发工作量巨大且维护困难
若所述条件字段中存在所述预设前缀数据,则确定向算子级全局作用域组件发送多级作用域通知;
Smart Images

Figure CN122985152A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a configuration method, device, medium, and program product for functional operators based on business processes. Background Technology
[0002] In large software platforms such as data processing or data analysis, a business process can be completed by setting up multiple functional operators that perform different functions. A business process may contain hundreds of functional operators. Each functional operator needs to provide a separate program to implement different functions. Therefore, the development workload for each functional operator in the business process is huge and maintenance is difficult. Summary of the Invention
[0003] The purpose of this application is to provide a configuration method, device, medium, and program product for functional operators based on business processes, so as to improve the configuration efficiency and accuracy of functional operators for business processes.
[0004] In a first aspect, embodiments of this application provide a configuration method for functional operators based on business processes, including: Obtain the configuration information of the functional operators in the business process, wherein the configuration information includes the target functional operator identifier and the target basic information corresponding to the target functional operator identifier; Based on a pre-stored component mapping table, target component identification information corresponding to the configuration information is determined. The pre-stored component mapping table is used to determine whether there is a component corresponding to the functional operator. The pre-stored component mapping table includes component identification information and component information corresponding to the component identification information. The component information includes preset basic information and multi-dimensional description information. The multi-dimensional description information is used to describe the inheritance relationship of the component, determine whether it is associated with the preset functional operator identifier, and control the data source switching, display status, or execution operation of the component. The multi-dimensional description information includes data description information, visibility description information, and behavior description information. Based on the target component identification information corresponding to the configuration information, determine the component corresponding to the functional operator; The components of each functional operator in the business process are retrieved, and the business process is rendered in a component-based manner.
[0005] In this embodiment, a component mapping table is generated in advance, containing the components and component information corresponding to each functional operator in the business process. The component information includes preset basic information and multi-dimensional description information. Then, the configuration information of the functional operators in the business process is obtained. Based on the target functional operator identifier and target basic information in the configuration information, the pre-established component mapping table is matched to determine the component identifier information corresponding to each functional operator. Then, the corresponding component is generated based on the component identifier information. The components corresponding to all functional operators in the business process are used to perform component-based rendering of the business process. In this way, by setting a component mapping table, which contains multi-dimensional description information to describe the complete behavior of a component, and matching the functional operator identifier and target basic information of the functional operator with the component mapping table, the component corresponding to each functional operator is obtained. This realizes the mapping from component identifier to component, eliminating the need to program each functional operator. Only the component needs to be configured to achieve component rendering of the business process, improving the efficiency and accuracy of component rendering.
[0006] Optionally, the pre-stored component mapping table is obtained in the following manner: Obtain component rendering information for each component. The component rendering information includes component identification information and component information. The component information includes preset basic information and multi-dimensional description information. The data description information is used to determine the input constraint information of the component's data source. The visibility description information is used to characterize the influencing factors of component visibility. The behavior description information is used to characterize the interface call behavior triggered according to different values of the component. The preset basic information includes the data source, the data source activation conditions corresponding to the data source, component dependency relationship, component inheritance identifier, and component type. The data source includes the port name of the previous operator and the data type corresponding to the port name. Convert the component rendering information in XML format into component rendering information in JSON format; The data description information, visibility description information, and behavior description information in the component rendering information in the JSON format are judged; The component mapping table is determined based on the component rendering information associated with the preset function operator identifier and the component rendering information not associated with the preset function operator identifier. In this embodiment, the component rendering information of each component is stored in XML format, then the XML component rendering information is converted into JSON format component rendering information, and the multi-dimensional description information and function operators in the JSON format component rendering information are associated to form a component mapping table. Through purely declarative XML configuration, complex conditional visibility control and dynamic data source switching are realized, and the entire linkage process does not require writing any TypeScript code.
[0007] Optionally, the method further includes: Inheritance is used to extend components of the same type in the component mapping table. In this embodiment, inheritance allows for the extension of components of the same type without adding code; simply adding a declaration is sufficient to achieve the extension of similar components.
[0008] Optionally, determining the target component identification information corresponding to the configuration information based on a pre-stored component mapping table includes: The target basic information is compared with the preset basic information in the pre-stored component mapping table; If the target basic information matches the preset basic information, the component identifier information corresponding to the preset basic information is determined as the target component identifier information corresponding to the configuration information. In this embodiment, the target basic information in the configuration information of the functional operator in the business process is precisely matched with the preset basic information in the pre-stored component mapping table. Based on the matching result, the component corresponding to the configuration information of the functional operator is determined automatically without writing any code, thus automatically completing component routing, type resolution, and data filtering.
[0009] Optionally, determining the target component identification information corresponding to the configuration information based on a pre-stored component mapping table includes: If the target basic information and the preset basic information do not match, the target function operator identifier and the preset function operator identifier are matched. If the target function operator identifier and the preset function operator identifier match, the component identifier information corresponding to the preset function operator identifier is determined as the target component identifier information corresponding to the configuration information.
[0010] In this embodiment of the application, if no component is matched when the target basic information is accurately matched, the target function operator identifier is matched again to match the component corresponding to the target function operator identifier, thereby achieving component matching.
[0011] Optionally, determining the target component identification information corresponding to the configuration information based on a pre-stored component mapping table includes: If the target function operator identifier and the preset function operator identifier do not match, the component type corresponding to the configuration information is obtained by searching the pre-stored component mapping table according to the configuration information. The configuration information is matched with a pre-established regular expression to obtain variable parameters corresponding to the configuration information, wherein the variable parameters include the data source port and the data type corresponding to the data source port; Based on the component type and the variable parameters, determine the target component identification information corresponding to the configuration information.
[0012] In this embodiment of the application, if no component is matched based on the target function operator identifier, a regular expression is used to match the configuration information to determine the component identifier information corresponding to the configuration information, thereby matching the component in multiple ways.
[0013] Optionally, the method further includes: If the configuration information and the pre-established regular expression fail to match, the preset component identification information corresponding to the configuration information will be determined as the target component identification information.
[0014] In this embodiment of the application, if no component identification information is found through multiple methods, the preset component identification information can be determined as the target component identification information corresponding to the configuration information.
[0015] Optionally, determining the component corresponding to the functional operator based on the target component identifier information corresponding to the configuration information includes: If the target component identification information contains a component inheritance identifier, the component corresponding to the functional operator is determined based on the component inheritance identifier. In this embodiment, after obtaining the target component identification information, if the target component identification information contains a component inheritance identifier, it is necessary to search based on the component inheritance identifier to obtain the component corresponding to the functional operator.
[0016] Optionally, the method further includes: Based on the multi-scope publish and subscribe communication mechanism, in response to a component value modification instruction, a multi-scope notification is sent to components in the same scope or to the operator-level global scope component. This allows the component that receives the multi-scope notification to recalculate visibility information based on visibility, switch the accessed data source, or perform behavioral operations, including calling third-party services.
[0017] Optionally, sending multi-level scope notifications to sibling scope components or operator-level global scope components includes: Based on filtrex expressions, determine whether a condition field in a multidimensional description information stores a preset prefix data; If the preset prefix data exists in the condition field, then it is determined to send a multi-level scope notification to the operator-level global scope component; If the preset prefix data is not present in the condition field, then a multi-level scope notification is sent to the sibling scope component.
[0018] In this embodiment, complex conditional visibility control and dynamic data source switching are achieved through purely declarative XML configuration, and the entire linkage process does not require writing any TypeScript code.
[0019] Secondly, embodiments of this application provide a configuration device for functional operators based on business processes, including: The acquisition module is used to acquire configuration information of functional operators in the business process, wherein the configuration information includes a target functional operator identifier and target basic information corresponding to the target functional operator identifier; The determination module is used to determine the target component identification information corresponding to the configuration information based on a pre-stored component mapping table. The pre-stored component mapping table is used to determine whether there is a component corresponding to the function operator. The pre-stored component mapping table includes component identification information and component information corresponding to the component identification information. The component information includes preset basic information and multi-dimensional description information. The multi-dimensional description information is used to describe the inheritance relationship of the component, determine whether it is associated with the preset function operator identifier, and control the data source switching, display status, or execution operation of the component. The multi-dimensional description information includes data description information, visibility description information, and behavior description information. The generation module is used to determine the component corresponding to the functional operator based on the target component identification information corresponding to the configuration information; The rendering module is used to retrieve the components of each functional operator in the business process and perform component-based rendering of the business process.
[0020] In this embodiment, a component mapping table is generated in advance, containing the components and component information corresponding to each functional operator in the business process. The component information includes preset basic information and multi-dimensional description information. Then, the configuration information of the functional operators in the business process is obtained. Based on the target functional operator identifier and target basic information in the configuration information, the pre-established component mapping table is matched to determine the component identifier information corresponding to each functional operator. Then, the corresponding component is generated based on the component identifier information. The components corresponding to all functional operators in the business process are used to perform component-based rendering of the business process. In this way, by setting a component mapping table, which contains multi-dimensional description information to describe the complete behavior of a component, and matching the functional operator identifier and target basic information of the functional operator with the component mapping table, the component corresponding to each functional operator is obtained. This realizes the mapping from component identifier to component, eliminating the need to program each functional operator. Only the component needs to be configured to achieve component rendering of the business process, improving the efficiency and accuracy of component rendering.
[0021] Optionally, the apparatus further includes a setup module, the setup module being used for: Obtain component rendering information for each component. The component rendering information includes component identification information and component information. The component information includes preset basic information and multi-dimensional description information. The data description information is used to determine the input constraint information of the component's data source. The visibility description information is used to characterize the influencing factors of component visibility. The behavior description information is used to characterize the interface call behavior triggered according to different values of the component. The preset basic information includes the data source, the data source activation conditions corresponding to the data source, component dependency relationship, component inheritance identifier, and component type. The data source includes the port name of the previous operator and the data type corresponding to the port name. Convert the component rendering information in XML format into component rendering information in JSON format; The data description information, visibility description information, and behavior description information in the component rendering information in the JSON format are judged; The component mapping table is determined based on the component rendering information associated with the preset function operator identifier and the component rendering information not associated with the preset function operator identifier.
[0022] In this embodiment, the component rendering information of each component is stored in XML format, and then the XML component rendering information is converted into JSON format component rendering information. The multi-dimensional description information and functional operators in the JSON format component rendering information are associated to form a component mapping table. Through pure declarative XML configuration, complex conditional visibility control and dynamic data source switching are realized. The entire linkage process does not require writing any TypeScript code.
[0023] Optionally, the determining module is configured to: The same type of components in the component mapping table are extended using inheritance.
[0024] In this embodiment of the application, inheritance is used to extend the same type of components without adding code; simply adding a declaration is sufficient to extend the same type of components.
[0025] Optionally, the determining module is configured to: The target basic information is compared with the preset basic information in the pre-stored component mapping table; If the target basic information matches the preset basic information, then the component identification information corresponding to the preset basic information is determined as the target component identification information corresponding to the configuration information.
[0026] In this embodiment, the target basic information in the configuration information of the functional operator in the business process is precisely matched with the preset basic information in the pre-stored component mapping table. Based on the matching result, the component corresponding to the configuration information of the functional operator is determined. Without writing any code, component routing, type parsing and data filtering are automatically completed.
[0027] Optionally, the determining module is configured to: If the target basic information and the preset basic information do not match, the target function operator identifier and the preset function operator identifier are matched. If the target function operator identifier and the preset function operator identifier match, the component identifier information corresponding to the preset function operator identifier is determined as the target component identifier information corresponding to the configuration information.
[0028] In this embodiment of the application, if no component is matched when the target basic information is accurately matched, the target function operator identifier is matched again to match the component corresponding to the target function operator identifier, thereby achieving component matching.
[0029] Optionally, the determining module is configured to: If the target function operator identifier and the preset function operator identifier do not match, the component type corresponding to the configuration information is obtained by searching the pre-stored component mapping table according to the configuration information. The configuration information is matched with a pre-established regular expression to obtain variable parameters corresponding to the configuration information, wherein the variable parameters include the data source port and the data type corresponding to the data source port; Based on the component type and the variable parameters, determine the target component identification information corresponding to the configuration information.
[0030] In this embodiment of the application, if no component is matched based on the target function operator identifier, a regular expression is used to match the configuration information to determine the component identifier information corresponding to the configuration information, thereby matching the component in multiple ways.
[0031] Optionally, the determining module is configured to: If the configuration information and the pre-established regular expression fail to match, the preset component identification information corresponding to the configuration information will be determined as the target component identification information.
[0032] In this embodiment of the application, if no component identification information is found through multiple methods, the preset component identification information can be determined as the target component identification information corresponding to the configuration information.
[0033] Optionally, the generation module is used for: If the target component identification information contains a component inheritance identifier, the component corresponding to the functional operator is determined based on the component inheritance identifier.
[0034] In this embodiment of the application, after obtaining the target component identification information, if the target component identification information contains a component inheritance identifier, it is necessary to search according to the component inheritance identifier to obtain the component corresponding to the functional operator.
[0035] Optionally, the generation module is used for: Based on the multi-scope publish and subscribe communication mechanism, in response to a component value modification instruction, a multi-scope notification is sent to components in the same scope or to the operator-level global scope component. This allows the component that receives the multi-scope notification to recalculate visibility information based on visibility, switch the accessed data source, or perform behavioral operations, including calling third-party services.
[0036] Optionally, the generation module is used for: Based on filtrex expressions, determine whether a condition field in a multidimensional description information stores a preset prefix data; If the preset prefix data exists in the condition field, then it is determined to send a multi-level scope notification to the operator-level global scope component; If the preset prefix data is not present in the condition field, then a multi-level scope notification is sent to the sibling scope component.
[0037] In this embodiment, complex conditional visibility control and dynamic data source switching are achieved through purely declarative XML configuration, and the entire linkage process does not require writing any TypeScript code.
[0038] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, can implement the method described in any embodiment of the first aspect.
[0039] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.
[0040] Fifthly, embodiments of this application provide a computer program product, the computer program product including a computer program, wherein when the computer program is executed by a processor, it can implement the method described in any embodiment of the first aspect. Attached Figure Description
[0041] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 A flowchart illustrating a configuration method for functional operators based on business processes provided in an embodiment of this application; Figure 2 A flowchart illustrating another configuration method for functional operators based on business processes provided in this application embodiment; Figure 3 A flowchart illustrating the component descriptor registration process provided in this application embodiment; Figure 4 A flowchart illustrating the dynamic rendering process of components provided in this application embodiment; Figure 5 The component linkage response diagram provided in the embodiments of this application; Figure 6 A schematic diagram of the structure of a configuration device for a business process-based functional operator provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0043] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.
[0044] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0045] like Figure 1 As shown in the figure, this application embodiment provides a configuration method for functional operators based on business processes, which may include the following steps: S101. Obtain the configuration information of the functional operators in the business process, wherein the configuration information includes the target functional operator identifier and the target basic information corresponding to the target functional operator identifier; Specifically, the terminal device pre-stores various functional operators corresponding to the business process, and each functional operator has corresponding configuration information. This configuration information can be one or more, and can be set according to requirements. During the configuration process, the terminal device displays the various functional operators of the business process. When the user clicks on any functional operator, the terminal device receives the user's input command to select the functional operator. The terminal device then obtains the configuration information for that functional operator. This configuration information includes the target functional operator identifier and the target basic information corresponding to the target functional operator identifier. The target basic information includes the operator type, data source, and data type.
[0046] For example, the target function operator identifier can be a MySQL database, and the target basic information corresponding to the MySQL database includes the component type, the data source, and the data type corresponding to the data source.
[0047] S102. Based on the pre-stored component mapping table, determine the target component identification information corresponding to the configuration information. The pre-stored component mapping table is used to determine whether there is a component corresponding to the function operator. The pre-stored component mapping table includes component identification information and component information corresponding to the component identification information. The component information includes preset basic information and multi-dimensional description information. The multi-dimensional description information is used to describe the inheritance relationship of the component, determine whether it is associated with the preset function operator identifier, and control the data source switching, display status, or execution operation of the component. The multi-dimensional description information includes data description information, visibility description information, and behavior description information. Specifically, after obtaining the configuration information, the terminal device performs multiple matches with the pre-stored component mapping table based on different types of data to determine the target component identification information corresponding to the configuration information.
[0048] The terminal device first performs a precise match between the target basic information and the preset basic information in the component mapping table. If no target component identifier information is matched, it performs a match between the target function operator identifier and the preset function operator identifier in the component mapping table. If no target function operator identifier is matched, regular expressions can be used to match each field in the preset basic information. Based on the matching results, the target component identifier information corresponding to the configuration parameters of the function operator is determined.
[0049] S103. Determine the component corresponding to the functional operator based on the target component identification information corresponding to the configuration information; After obtaining the target component identification information corresponding to the configuration information, the terminal device looks up the component information corresponding to the target component identification information from the pre-stored component mapping table, and then generates the corresponding component instance based on the component information. Based on the component instance, it generates the component corresponding to the function operator. The components include input boxes, drop-down boxes, switches, date pickers, table column pickers, file pickers, or code editors.
[0050] For example, if a function operator includes two configuration information, the first configuration information corresponds to component 1 and the second configuration information corresponds to component 2, where component 1 can be a drop-down list and component 2 is an input box.
[0051] S104. Retrieve the components of each functional operator in the business process and perform component-based rendering of the business process.
[0052] Specifically, after determining the components of each functional operator, the terminal device calls all the components to generate a component display interface corresponding to the business process, thus realizing component-based rendering.
[0053] In this embodiment, a component mapping table is generated in advance, containing the components and component information corresponding to each functional operator in the business process. The component information includes preset basic information and multi-dimensional description information. Then, the configuration information of the functional operators in the business process is obtained. Based on the target functional operator identifier and target basic information in the configuration information, the pre-established component mapping table is matched to determine the component identifier information corresponding to each functional operator. Then, the corresponding component is generated based on the component identifier information. The components corresponding to all functional operators in the business process are used to perform component-based rendering of the business process. In this way, by setting a component mapping table, which contains multi-dimensional description information to describe the complete behavior of a component, and matching the functional operator identifier and target basic information of the functional operator with the component mapping table, the component corresponding to each functional operator is obtained. This realizes the mapping from component identifier to component, eliminating the need to program each functional operator. Only the component needs to be configured to achieve component rendering of the business process, improving the efficiency and accuracy of component rendering.
[0054] Another embodiment of this application further supplements the description of the configuration method of business process-based functional operators provided in the above embodiments.
[0055] like Figure 2 As shown, this application provides a declarative UI component dynamic rendering method based on multidimensional descriptors. It employs XML declarative configuration, multidimensional descriptors, regular expression routing, an expression engine, and dynamic loading of a component factory to achieve component-based rendering of business processes, including: A. Declarative configuration layer: CompoxLib.xml + custom operator CompoxXML; B. Descriptor parsing layer: CompoxService, XML parsing, JSON, descriptor object registration; C. Component routing layer: CompoxService.getCompox() and CompoxRegExpList perform regular expression matching; D. Component Factory Layer: ComponentFactory executes ViewContainerRef to dynamically create component instances; Specifically, the terminal device uses the ComponentFactory component and modern front-end frameworks (such as Angular) to dynamically create components at runtime. This includes obtaining component descriptors (component information, including regular expression routes) through CompoxService; retrieving the component class corresponding to the target component's identifier from the component registry and dynamically creating component instances; injecting descriptors and runtime parameters; and registering component parameters in the cache for other components to query. In this way, the component factory acts as a unified entry point, shielding the complexity of component routing and instantiation. When parameters change, the container is automatically cleared and the component is recreated (the handling in ngOnChanges). Descriptors configured in XML are passed to component instances via descriptor injection. Dynamic loading of multiple component types is supported without prior declaration in the template.
[0056] E. Component runtime layer: SooXCompoxComponent performs expression evaluation, communication, linkage, and constraint verification.
[0057] Optionally, the pre-stored component mapping table is obtained in the following manner: Obtain component rendering information for each component. The component rendering information includes component identification information and component information. The component information includes preset basic information and multi-dimensional description information. The data description information is used to determine the input constraint information of the component's data source. The visibility description information is used to characterize the influencing factors of component visibility. The behavior description information is used to characterize the interface call behavior triggered according to different values of the component. The preset basic information includes the data source, the data source activation conditions corresponding to the data source, component dependency relationship, component inheritance identifier, and component type. The data source includes the port name of the previous operator and the data type corresponding to the port name. Convert the component rendering information in XML format into component rendering information in JSON format; The data description information, visibility description information, and behavior description information in the component rendering information in the JSON format are judged; The component mapping table is determined based on the component rendering information associated with the preset function operator identifier and the component rendering information not associated with the preset function operator identifier.
[0058] Specifically, this application embodiment defines a CompoxDescriptor multidimensional descriptor to comprehensively describe a UI component from three orthogonal dimensions: data description information (embedded input constraints), visibility description information, and behavior description information. That is, component rendering information is pre-set for each component. The component rendering information includes component identification information and component information. The component information includes preset basic information and multidimensional description information. The multidimensional description information includes data description information, visibility description information, and behavior description information. The preset basic information includes the component's attribute information, such as the component's unique identifier, parent component identifier (for inheritance), component type (container, controller, chart), data type, version number, developer, style series, and appearance parameters. The data description information includes the data source judgment conditions and the data source type corresponding to the data source judgment conditions; there can be one or more data description information. Visibility description information includes visibility judgment conditions and the display state corresponding to the visibility judgment conditions, such as component showing or component hiding; The behavior description information includes the behavior judgment conditions and the behavior operation corresponding to the behavior judgment conditions; there may be one or more behavior description information.
[0059] This application embodiment uses a three-dimensional orthogonal description of data, visibility, and behavior, and embeds input constraints (ConstraintDescriptor) as sub-descriptors of the data descriptor, reflecting the natural semantic coupling of "constraints attached to data". This achieves a complete declarative definition of the behavior of UI components. The three orthogonal dimensions are uncoupled, can be configured independently, and can be flexibly combined. The ConstraintDescriptor in the same data descriptor takes effect according to its data source, and can automatically apply the matching constraint rules when the conditional data source is switched.
[0060] Specifically, such as Figure 3 As shown in the figure, this application embodiment provides a detailed process for parsing XML configuration into component descriptors and registering them to the service center at startup. The specific steps are as follows: 1. When the application starts, the modern front-end framework creates a CompoxService instance, and the modern front-end framework's dependency injection system creates a global singleton CompoxService service instance.
[0061] 2. CompoxService loads CompoxLib.xml from local storage. In the constructor, it calls this.memory.getItem('CompoxLib') to obtain the pre-set XML configuration string. That is, the terminal device stores the component rendering information of each component as a string in XML format.
[0062] 3. The CompoxService calls addCompoxes() to parse the component rendering information in XML format, converts the XML string into a JSON object (i.e., the component rendering information in JSON format) using xmlString2Json(), and extracts the compoxes.compox array.
[0063] 4. CompoxService iterates through each compox definition and parses each compox definition in the array as follows: 5. Parse dataDescriptor / dataDescriptors to extract data (static JSON data in CDATA), defaultValue, actionScript (dynamic data retrieval script), and condition (conditional expression), as well as extract data description information, visibility description information, and behavior description information, and the corresponding conditional expressions; 6. CompoxService determines whether the data description information, visibility description information, and behavior description information are associated with the preset operator identifier. That is, it stores the parsed Compox object in the this.compoxes mapping table with the first identifier as the key. If a preset operator identifier operatorId is specified, then the second identifier is used as the key to achieve operator-level isolation. The component rendering information corresponding to the first identifier and the component rendering information corresponding to the second identifier are registered in the compoxes mapping table. The first identifier is the component identifier that is not associated with the preset operator identifier, and the second identifier is the component identifier that is associated with the preset operator identifier.
[0064] 7. CompoxService initializes compoxList, registering multiple predefined component IDs to the compoxes mapping table to ensure that the component factory can find the corresponding component class.
[0065] 8. Register a route listener for CompoxService to monitor route change events. When switching pages, clear the parameter cache and dataset cache to avoid data pollution across pages.
[0066] This application defines the CompoxDescriptor multidimensional descriptor model, which decomposes the behavior of UI components into three orthogonal dimensions: data description (DataDescriptor), visibility description (VisibleDescriptor), and behavior description (ActionDescriptor), each of which is configured independently. Input constraints (ConstraintDescriptor) are embedded as sub-descriptors of DataDescriptor, reflecting the semantic coupling of "constraints are attached to data" and taking effect synchronously with data source switching. DataDescriptor supports multiple instances and conditional data source switching is achieved through condition expressions.
[0067] Existing component descriptions are often limited to a single dimension, typically only describing field types and basic attributes. This invention implements a multi-dimensional descriptor model that comprehensively depicts the complete behavior of a UI component from three orthogonal dimensions: data description information (embedded input constraints), visibility description information, and behavior description information. The data description information describes the data source of functional operators (such as dropdown controls), the visibility description information sets whether the control is visible or not due to the influence of the dropdown, and the behavior description information identifies when the dropdown is selected, triggering the corresponding behavior.
[0068] For existing methods that describe component field types and basic attributes using only a single configuration (such as JSON Schema), the dynamic behavior, conditional visibility, and event response of the component require additional coding. This application's embodiment incorporates all the behavior of the component into a declarative descriptor system, achieving "zero-code" component behavior definition. A component's entire behavior, from data loading, conditional visibility, user interaction to input constraints, can be completely described through XML configuration without writing any imperative code.
[0069] Furthermore, for existing solutions that only support simple explicit / implicit linkage and cannot support complex conditional logic driven by expressions, this application implements a reactive linkage mechanism driven by an expression engine, supporting the description of arbitrarily complex inter-component dependencies through expressions in declarative configuration. Moreover, existing solutions use exact matching component mapping, requiring separate registration for each new component. This application aims to implement dynamic component routing based on regular expression pattern matching, enabling component identifiers with the same rendering logic to be automatically routed to the same component implementation.
[0070] In this embodiment, the component rendering information of each component is stored in XML format, and then the XML component rendering information is converted into JSON format component rendering information. The multi-dimensional description information and functional operators in the JSON format component rendering information are associated to form a component mapping table. Through pure declarative XML configuration, complex conditional visibility control and dynamic data source switching are realized. The entire linkage process does not require writing any TypeScript code.
[0071] Optionally, the method further includes: The same type of components in the component mapping table are extended using inheritance.
[0072] This invention uses XML format to declaratively define component descriptors and supports single-root inheritance through parentId parent node identifiers: Specifically, the basic component is defined as follows: <compox id="soox-combox" type="CONTROLER"> <datadescriptor> <data><![CDATA[[{"label":"Option 1","value":"1"},{"label":"Option 2","value":"2"}]]]>< / data> < / datadescriptor> < / compox> The declaration of inheritance and extension is shown below: <compox id="customCompox" parentid="soox-combox" type="CONTROLER"> <datadescriptor> <data><![CDATA[[{"label":"UTF-8","value":"UTF-8"},{"label":"GBK","value":"GBK"}]]]>< / data> <defaultvalue><![CDATA[UTF-8]]>< / defaultvalue> < / datadescriptor> < / compox> The inheritance-based XML parsing, registration, and inheritance logic is as follows: 1. Registration Phase: This phase preserves the default operator identifier $_parentId as is, without merging parent and child components. It converts the XML string to JSON; iterates through each compox definition; parses dataDescriptors, supporting JSON / scripts within CDATA; parses visibleDescriptors to extract condition expressions; parses actionDescriptors to extract event and actionScript; registers the compoxes table according to its prototype, retaining the default operator identifier for later lookup; only child compoxes are stored in the compoxes table as is, without copying parent descriptors, to avoid registration order dependencies and duplicate storage. 2. Lookup Phase: Type fallback and descriptor inheritance are achieved through the preset operator identifier $_parentId. The child compox itself does not implement a UI and needs to fall back to the parent type for rendering. Merging Strategy: Based on the child compox, its dataDescriptors are retained and rewritten with the same name as the parent type, thus reusing the parent class's UI implementation. A lazy inheritance strategy of "no merging at registration, inheritance at lookup" is adopted: In getCompox(), the $_parentId of the child compox is checked. Using the child compox as the base, the "component type" is fallen back to the parent class through object extension ({ ...compox, $_id: parentTypeId}), while the "descriptors (data / visibility / actions / constraints)" still use the child compox's definition. The component factory then uses the parent type's UI implementation for rendering, but runtime behavior is entirely driven by the child compox's descriptors.
[0073] In this embodiment, the child component only needs to declare the differences from the parent component (e.g., only overriding `dataDescriptor`), and undeclared descriptors are set to empty, thus achieving single-root inheritance of "UI implementation reuse + behavior difference overriding" at the XML level. All component behaviors are defined through XML without coding; child components inherit all descriptors from the parent component via `parentId`, only needing to declare the differences, achieving single-root inheritance; the XML is parsed and registered at runtime, supporting operator-level custom component extensions and achieving dynamic registration; the same component ID can have different definitions in different operators (isolated by `operatorId`), achieving operator isolation.
[0074] In this embodiment of the application, based on the XML declarative configuration component inheritance system, child components can inherit all descriptor definitions from parent components and extend them. Using inheritance, components of the same type can be extended without adding code; only adding declarations is required to achieve the extension of similar components. Optionally, determining the target component identifier information corresponding to the configuration information based on a pre-stored component mapping table includes: The target basic information is compared with the preset basic information in the pre-stored component mapping table; If the target basic information matches the preset basic information, the component identifier information corresponding to the preset basic information is determined as the target component identifier information corresponding to the configuration information. In this embodiment, the target basic information in the configuration information of the functional operator in the business process is precisely matched with the preset basic information in the pre-stored component mapping table. Based on the matching result, the component corresponding to the configuration information of the functional operator is determined automatically without writing any code, thus automatically completing component routing, type resolution, and data filtering.
[0075] Optionally, determining the target component identification information corresponding to the configuration information based on a pre-stored component mapping table includes: If the target basic information and the preset basic information do not match, the target function operator identifier and the preset function operator identifier are matched. If the target function operator identifier and the preset function operator identifier match, the component identifier information corresponding to the preset function operator identifier is determined as the target component identifier information corresponding to the configuration information.
[0076] In this embodiment of the application, if no component is matched when the target basic information is accurately matched, the target function operator identifier is matched again to match the component corresponding to the target function operator identifier, thereby achieving component matching.
[0077] Optionally, determining the target component identification information corresponding to the configuration information based on a pre-stored component mapping table includes: If the target function operator identifier and the preset function operator identifier do not match, the component type corresponding to the configuration information is obtained by searching the pre-stored component mapping table according to the configuration information. The configuration information is matched with a pre-established regular expression to obtain variable parameters corresponding to the configuration information, wherein the variable parameters include the data source port and the data type corresponding to the data source port; Based on the component type and the variable parameters, determine the target component identification information corresponding to the configuration information.
[0078] Specifically, the terminal device pre-stores multiple lists of regular expressions. Based on the configuration information, it matches against these pre-stored lists to obtain the variable parameters corresponding to the variable fields in the configuration information, including the data source port and the data type corresponding to the data source port. That is, by defining a set of regular expression lists, CompoxRegExpList, pattern matching routing from component identifier to component implementation is achieved. For example, the regular expression is defined as follows: const ColumnSelector_Compox_RegExp = / (prefix\-).*?(?=\-column-selector) / g; const Settings_Compox_RegExp = / (prefix\-).*?(?=\-settings) / g; const Script_Compox_RegExp = / (prefix\-).*?(?=(\-script|\-script-template)) / g; In this embodiment, various regular expressions are pre-defined to match the fields in the configuration information of the functional operators.
[0079] In this embodiment, the terminal device searches a pre-stored component mapping table based on the target basic information in the configuration information to determine the component corresponding to the configuration information of the function operator. That is, it first performs an exact match. If no component is matched, it matches the function operator identifier. If no match is found, it uses a regular expression for matching. That is, it traverses the CompoxRegExpList and converts the matched identifier into a general identifier. For example, it converts "prefix-srcIn-column-selector" into "prefix-xxx-column-selector".
[0080] By using regular expression pattern matching, component identifiers with the same rendering logic but different parameters (such as prefix-srcIn-column-selector, prefix-result-column-selector) are automatically routed to the same component implementation (prefix-xxx-column-selector). When adding a new component of the same type, there is no need to register a new component implementation; as long as it conforms to the naming pattern, it will be automatically routed. Furthermore, runtime parameters such as port name and data type can also be extracted from the regular expression matching results.
[0081] The component dynamic routing mechanism based on regular expressions provided in this application defines a list of regular expressions called `CompoxRegExpList`. When an exact match fails, the `CompoxService.getCompox()` method iterates through the list to perform pattern matching, replacing the variable parts of a component identifier with the wildcard "xxx", and routing to the corresponding generic component implementation. Simultaneously, runtime parameters such as port name and data type are extracted from the regular expression matching results. This one-to-many component routing is achieved through regular expression pattern matching; a single regular expression can cover an unlimited number of component variants. For example, 17 regular expressions can cover the routes of multiple components, and adding a new component in the same family does not require modifying the routing configuration. The regular expression matching results are also passed to the component as runtime parameters, realizing "routing as configuration".
[0082] In this embodiment of the application, if no component is matched based on the target function operator identifier, a regular expression is used to match the configuration information to determine the component identifier information corresponding to the configuration information, thereby matching the component in multiple ways.
[0083] Optionally, the method further includes: If the configuration information and the pre-established regular expression fail to match, the preset component identification information corresponding to the configuration information will be determined as the target component identification information.
[0084] In this embodiment of the application, if no component identification information is found through multiple methods, the preset component identification information can be determined as the target component identification information corresponding to the configuration information.
[0085] Optionally, determining the component corresponding to the functional operator based on the target component identifier information corresponding to the configuration information includes: If the target component identification information contains a component inheritance identifier, the component corresponding to the functional operator is determined based on the component inheritance identifier.
[0086] In this embodiment of the application, after obtaining the target component identification information, if the target component identification information contains a component inheritance identifier, it is necessary to search according to the component inheritance identifier to obtain the component corresponding to the functional operator.
[0087] like Figure 4 As shown in the embodiment of this application, when a user clicks on a function operator in a business process, a method for dynamically rendering the corresponding UI component according to configuration parameters is defined, including: Step A1: When a user clicks on a function operator in the business process on the terminal device, it triggers the rendering of the attribute panel. The upper-level business component of the terminal device then passes the parameter list of the function operator to the template for use. <compox-factory>Each parameter is rendered, and the parameter list includes configuration information for the function operator, which includes IP address, username, password, and port.
[0088] Step A2: The compox-factory receives parameter input. The ComponentFactory component receives the Parameter object through @Input().
[0089] Step A3: ComponentFactory calls CompoxService.getCompox() to find components: First, it attempts exact matching: it searches for the descriptor corresponding to parameter.compox in the compoxes mapping table; if not found, it attempts operator-level matching: it searches for the parameter.compox.operatorId key; if still not found, it executes regular expression routing: it iterates through multiple regular expressions in CompoxRegExpList, converting the matched component identifier into a general identifier, that is, replacing the variable part with "xxx"; Step A4: CompoxService processes component inheritance. If the found component descriptor contains the parent component identifier $_parentId, it searches upwards along the inheritance chain until it finds the component implementation registered in compoxList. The parent component identifier is the component inheritance identifier.
[0090] Step A5: ComponentFactory dynamically creates component instances by calling ViewContainerRef.createComponent(compoxes[compox.$_id]).
[0091] Step A6: Inject the component descriptor into the ComponentFactory. This descriptor contains component information corresponding to the target component's identifier information. Assign the component descriptor to the component instance using cptInstance.descriptor = compox, triggering the descriptor's setter method to parse the descriptor in each dimension.
[0092] Step A7: Initialize the SooXCompoxComponent component. The following steps are executed sequentially in the component's ngOnInit: initDataDescriptors(): Parses data descriptors, sets default values, and loads dynamic data; initDependencies(): Resolves dependencies and subscribes to events that change the value of dependencies; onLoad(): Triggers the LOAD event and executes the initial loading script; Optionally, the method further includes: Based on the multi-scope publish and subscribe communication mechanism, in response to a component value modification instruction, a multi-scope notification is sent to components in the same scope or to the operator-level global scope component. This allows the component that receives the multi-scope notification to recalculate visibility information based on visibility, switch the accessed data source, or perform behavioral operations, including calling third-party services.
[0093] Optionally, sending multi-level scope notifications to sibling scope components or operator-level global scope components includes: Based on filtrex expressions, determine whether a condition field in a multidimensional description information stores a preset prefix data; If the preset prefix data exists in the condition field, then it is determined to send a multi-level scope notification to the operator-level global scope component; If the preset prefix data is not present in the condition field, then a multi-level scope notification is sent to the sibling scope component.
[0094] Specifically, this application provides an expression engine-driven reactive component linkage method, introducing the Filtrex expression engine. Dependencies are declared in the `condition` field of the component descriptor. At runtime, the system parses variable references in the expression using `compileExpression()`, automatically subscribing to value change events of the corresponding variables (via `NotifyService`). When an event is triggered, the expression is re-evaluated, and the component's visibility, data source, and other states are switched accordingly. Linkage logic is configured through declarative expressions, supporting arbitrarily complex Boolean expressions and custom functions (such as `regExp` and `startWith`), and automatically completing dependency tracking and event subscription. Component linkage logic is fully declarative; adding or modifying linkage rules only requires modifying the `condition` expression in the XML, without modifying any code. The expression engine supports custom function extensions, adapting to various complex business judgment logics.
[0095] This application's embodiments introduce the Filtrex expression engine, which declares linked conditions in the condition field of the component descriptor, and dynamically parses and evaluates them at runtime.
[0096] Based on different conditions of the functional operators, their data description information is parsed, and different data sources are determined according to different data description information. This allows for switching of data sources based on different conditions. In this way, the dependencies between components can be declared in the XML configuration using expressions, such as condition="dataType data type== 'Integer' or dataType == 'Long'"). Dependency variables are automatically parsed, change events are subscribed to, and values are dynamically evaluated to realize complex component linkage logic without writing any imperative code.
[0097] In this embodiment, inter-component communication is implemented based on NotifyService. Two levels of scope are distinguished by a prefix convention in the event name: no prefix indicates a sibling ParameterGroup scope (propagated only between sibling components within the same ParameterGroup), while the `gee.` prefix indicates an operator-level global scope (accessing any level of attribute within the operator via a complete hierarchical path to obtain a flattened value). When a component value changes, notifications from both scopes are sent simultaneously. The listener automatically selects the data from the corresponding scope based on the prefix in the condition, thus constructing a multi-level scope inter-component communication system through NotifyService. When a component value changes, multiple notifications from different scopes are sent simultaneously; the listener automatically selects the event from the corresponding scope to subscribe to based on the prefix convention in the condition.
[0098] If the value of a certain level of a certain functional operator changes, a notification is sent to other levels or components in the same level. That is, scope 1 is the sibling scope, which includes the operator identifier information Id, the parent attribute identifier information Id, and the attribute name. Scope 2 is the operator-level global scope (gee.), which includes the operator identifier information Id and the complete hierarchical path. The presence or absence of the "gee." prefix in the condition determines which scope's events to subscribe to. If the "gee." prefix is present, the event is subscribed to in the global scope, meaning notifications are sent to other layers. If the prefix is absent, the event is subscribed to in the sibling scope.
[0099] In this way, when other components in other layers or other components in the same layer receive the notification, they can update in different ways. For example, based on the received notification, they can set the current component to be hidden or visible, switch the source of the access data source, or perform other operations, such as calling third-party software.
[0100] In this application embodiment, a multi-scope publish-subscribe communication mechanism is provided, which supports communication between components in two scopes: sibling scope and operator-level global scope. The same change source can drive multiple components at different levels simultaneously and automatically complete the visibility switching.
[0101] In this application embodiment, communication between components within the same ParameterGroup and at the same scope level is protected from cross-level interference.
[0102] Event name format: {operatorId}_{parentId}_{name}_vchange; Operator-level global scope (gee. prefix): Operator global property communication across ParameterGroups, locating properties through the full hierarchical path.
[0103] Event name format: {operatorId}_gee.{level1.level2.name}_vchange; When a component is destroyed, all subscriptions are automatically canceled (by iterating through subscriptionArr in ngOnDestroy) to avoid memory leaks.
[0104] This application's embodiments achieve isolation and penetration of two-level scopes through naming conventions, ensuring that local communication between sibling components does not interfere with other levels, while also supporting cross-ParameterGroup global communication triggered by the `gee.` prefix. Communication between components is precisely controllable, and the same attribute name will not conflict at different levels; the `gee.` prefix can break through the hierarchical limitations of ParameterGroup, enabling cross-level attribute linkage and adapting to complex nested attribute panel scenarios.
[0105] The declarative action event parsing and remote invocation mechanism based on handler expressions provided in this application defines handler expressions in ActionDescriptor to declaratively describe "what method to call and what parameters to pass in". At runtime, the terminal device automatically parses the handler, collects parameter values, calls the backend service, and populates the results back into the corresponding component. The event handling logic is declaratively defined through the handler expression "methodName(param1,param2)", eliminating the need to write event handling code. It automatically collects parameter values with specified names from the parameter tree, without requiring any attention to parameter retrieval logic. The backend returns results automatically; if the key matches the compox id, the data source is updated; if the key matches the parameter name, the value is populated. Define a handler expression in ActionDescriptor with the format "methodName(param1,param2)". At runtime, the method name and parameter name list are extracted through regular expression parsing. The parameter values with the specified names are automatically collected from the parameter tree (rootParameter) and a request is constructed to call the backend support API. After the backend returns the result, the system automatically distributes the response based on the type of the returned key. If the key matches the component compox id, the data source (addDataList) is updated. If the key matches the parameter name, the corresponding parameter value is populated back.
[0106] This application's embodiments declaratively define "what to call and what parameters to pass" through handler expressions, enabling the terminal device to automatically complete the entire chain of parameter collection, interface calls, and result distribution. The event handling logic is fully declarative, and the complete front-end and back-end interaction chain can be described by configuring handler="textFormat(editor)" in XML; it supports two scenarios: tool calls (button → processing → backfilling) and data loading (LOAD → getting options); the back-end only needs to return the {paramName:value} format according to the convention for automatic backfilling, thus decoupling the front-end and back-end.
[0107] like Figure 5 As shown in the embodiment of this application, when the value of a component changes, the detailed process of how to trigger the related components to update in a coordinated manner through the publish-subscribe mechanism is as follows: 1. User modifies the value of component A: The user modifies the value of a component through the configuration information of the UI component of the functional operator in the business process via the browser, triggering the onModelChange event.
[0108] 2. Constraint validation: SooXCompoxComponent calls constraintHandler() to validate whether the input value meets the constraints (range, format, length, etc.) defined by ConstraintDescriptor.
[0109] If the conditions are not met, the subsequent process will be blocked and an error message will be displayed. If the conditions are met, the subsequent operations will continue.
[0110] 3. Sending multi-scope notifications: SooXCompoxComponent sends notifications from two different scopes simultaneously via NotifyService: {operatorId}_{parentId}_{name}_vchange: sibling scope; {operatorId}_gee.{levelPath}_vchange: Operator-level global scope; 4. The relevant components receive the notification, and NotifyService distributes the notification to all components that have subscribed to the corresponding event name.
[0111] 5. Visibility recalculation: The SooXCompoxComponent of the relevant component determines whether a component's visibility description VisibleDescriptor's condition references a changed property name. Modern front-end frameworks (such as Angular) will trigger a re-evaluation of visibility, i.e., the re-evaluation of getvisible(), which retrieves the current values of all variables in the expression, calls the Filtrex expression engine to calculate the result, and shows or hides the component based on the result. 6. When switching data sources, the SooXCompoxComponent of the relevant component determines if the condition of a component's DataDescriptor references a changed property name. If the callback subscribed in initDataDescriptors is triggered, the condition expression is re-evaluated. If the condition is met, the component switches to the corresponding DataDescriptor and calls initDataDescriptor() to reload the data. 7. Execute the action. SooXCompoxComponent determines whether the component defines a behavior description information ActionDescriptor of type VCHANGE, and based on its content, there are two execution paths: If a handler expression is defined: parse the method name and parameter name list (runHandlerOfActionEvent), collect parameter values from the parameter tree, call the backend support API, and populate the returned results back to the corresponding data source or parameter according to the convention.
[0112] If actionScript is defined: execute that script fragment.
[0113] 8. Cache update: If the parameter defines the c_Cache attribute, SooXCompoxComponent will update the new value to the global cache compoxCache for reference by the DataDescriptor of other components.
[0114] For example, in a data type-driven conditional column selector, the data processing operator needs to allow the user to select a column from the input port, but the selectable columns need to be automatically filtered based on the data type of the upstream port.
[0115] XML configuration example: <parameters> <parametergroup name="general" c_alias="基本配置"> <parameter name="inputColumn" c_Alias="输入列" c_Compox="prefix-srcIn-Integer-column-selector" (配置信息) c_Option="true" / > <parameter name="outputColumn" c_Alias="输出列" c_Compox="prefix-result-column-selector" c_Option="true" / > Runtime behavior: ComponentFactory receives parameter(compox="prefix-srcIn-Integer-column-selector"); CompoxService.getCompox() performs a regular expression match in the component mapping table based on prefix-srcIn-Integer-column-selector. If no exact match is found, it iterates through CompoxRegExpList. ColumnSelector_Compox_RegExp matched successfully, extracting portName="srcIn" and filterValues=["Integer"]; The component identifier route is "prefix-xxx-column-selector"; The ComponentFactory dynamically creates instances of ColumnSelectorComponent; Based on the extracted portName and filterValues, this component filters Integer type columns from the column metadata of the upstream port for the user to select. Simply write the component identifier with type information in the c_Compox attribute of the parameter, and the system will automatically complete the component routing, type resolution and data filtering without writing any code.
[0116] Example 2: Expression-driven conditional visibility and data source switching. An operator has a "storage type" dropdown. When the user selects different storage types, the visibility and data source of subsequent configuration items (such as connection parameters) need to be dynamically switched.
[0117] XML configuration example: <compox id="custom-storage-config" type="CONTROLER"> <datadescriptors>; <!-- Data source 1: Enabled when storageType is 'HDFS' --> <datadescriptor> <condition><![CDATA[storageType == 'HDFS']]>< / condition> <data><![CDATA[[{"label":"Path","value":"path"},{"label":"Format","value":"format"}]]]>< / data> < / datadescriptor> <!-- Data source 2: Enabled when storageType is 'MySQL' --> <datadescriptor> <condition><![CDATA[storageType == 'MySQL']]>< / condition> <data><![CDATA[[{"label":"Table Name","value":"table"},{"label":"Schema","value":"schema"}]]]>< / data> < / datadescriptor> <!-- Default data source: Serves as default when there is no condition --> <datadescriptor> <data><![CDATA[[{"label":"Default","value":"default"}]]]>< / data> <visibledescriptor type="VISIBLE"> <condition><![CDATA[storageType == 'HDFS' or storageType == 'MySQL']]>< / condition> ; Runtime behavior: Initial state: storageType is empty, VisibleDescriptor condition evaluates to false, component is invisible; user selects storageType="HDFS": NotifyService sends {operatorId}_{parentId}_storageType_vchange notification; If the visibility condition "storageType == 'HDFS' or storageType == 'MySQL'" evaluates to true, the component becomes visible. When the condition "storageType == 'HDFS'" in DataDescriptor is evaluated to true, the data source is switched to HDFS, and the drop-down menu options become ["path", "format"]. When a user switches storageType="MySQL": the condition "storageType =='MySQL'" in the DataDescriptor evaluates to true, the user switches to the MySQL data source, and the dropdown options automatically change to ["table name", "Schema"].
[0118] Example 3: Application of multi-scope communication in nested property panels. The property panel of a data processing operator has a multi-level nested structure. The outer ParameterGroup has a "Run Mode" drop-down box, and the inner nested ParameterGroup has several properties (such as batchSize, timeout) whose visibility needs to be controlled according to different values of the "Run Mode".
[0119] Using the `gee.` prefix to achieve cross-level communication in the global scope: The user modifies the component's `runMode` value to "batch": The `onModelChange` method sends two levels of notifications simultaneously: {operatorId}_general_runMode_vchange (sibling scope) {operatorId}_gee.general.runMode_vchange (global scope) The condition of the batchSize component contains the gee. prefix, and the subscription event name generated by its getEventName() is {operatorId}_gee.general.runMode_vchange; the notification is matched successfully, triggering visibility recalculation.
[0120] getObjValueOfParameters() detects the gee. prefix, and obtains the flattened value {"gee.general.runMode": "batch"} from the operator global parameter tree, the expression gee.general.runMode == 'batch' evaluates to true, and the batchSize component is displayed; when the user switches runMode to "stream", the {operatorId}_gee.general.runMode_vchange notification is also triggered; the timeout component subscribes to this event, re-evaluates gee.general.runMode == 'stream' to true, and the component is displayed; at this time, the condition of batchSize, gee.general.runMode == 'batch', evaluates to false, and it is automatically hidden.
[0121] In the embodiments of the present application, the gee. prefix breaks through the hierarchical restriction of ParameterGroup, realizes cross-level attribute reference, and the same change source drives multiple components in different ParameterGroups that respond to different values, without any imperative code.
[0122] Example 4: Convenient tools based on component inheritance and ActionDescriptor, scenario: The platform provides a series of convenient tools (such as XML formatting tool, JSON compression tool), which are composed of "editor + operation button". When the button is clicked, the content of the editor needs to be sent to the backend for processing, and the processing result is backfilled into the editor.
[0123] XML configuration example: <!-- Define the button component, inherit from soox-button, and extend ActionDescriptor --> <compox id="ctrlFormater" parentid="soox-button" type="CONTROLER"> <event eventtype="click" handler="textFormat(editor)">< / event> <compox id="ctrlZipper" parentid="soox-button" type="CONTROLER"> <event eventtype="click" handler="textZip(editor)">< / event> The tool interface using these components is shown below: <parametergroup name="general" c_alias="Xml编辑器" c_coord="0.8,0.8" c_compox="soox-valign"> ; <parameter name="editor" c_Alias="内容" c_Compox="soox-xml" c_Option="false" / > ; <parametergroup name="button" c_alias="button" c_compox="soox-halign"> <parameter name="textFormat" c_Alias="格式化" c_Compox="ctrlFormater" c_Option="false" / > <parameter name="textZip" c_Alias="压缩" c_Compox="ctrlZipper" c_Option="false" / > Runtime behavior: The ComponentFactory renders a list of parameters. The "editor" parameter is rendered as an XML code editor. The "textFormat" and "textZip" buttons inherit the rendering logic of the button component through parentId="soox-button".
[0124] When the user clicks the "Format" button, a click event is triggered: When `SooXCompoxComponent.runActionEvent('click')` is executed, the handler for `ActionDescriptor` is found to be "textFormat(editor)". The `runHandlerOfActionEvent()` function parses the handler, extracting the method name "textFormat" and the parameter name "editor". It retrieves the value of the parameter named "editor" (i.e., the current content of the editor) from the `rootParameter`. It then calls the backend support API, passing in `supportInfo="textFormat"` and `params={"editor": "...xml content..."}`. The backend returns the formatted result: `{"editor": "...formatted xml..."}`. The terminal device automatically finds the parameter named "editor", updates its value to the formatted content, and the editor UI automatically refreshes to display the formatted XML.
[0125] By using component inheritance (parentId="soox-button"), the button's rendering logic is reused, with only the ActionDescriptor being additionally defined.
[0126] The entire tool can be developed without writing front-end code. It only requires XML configuration to complete the entire interaction chain of editor, buttons, backend calls and result feedback. It provides a multi-dimensional and comprehensive description: it fully depicts the behavior of UI components from three orthogonal dimensions: data (embedded input constraints), visibility, and behavior. It is highly scalable, and adding new component types does not require modifying the core framework code. It features declarative linkage, and complex inter-component linkage relationships are declared through expressions, eliminating the need for coding.
[0127] It supports two communication scopes: sibling scope and operator-level global scope; configuration reuse, child components inherit all descriptors from parent components, only differences need to be declared; dynamic loading, multiple component types are created on demand at runtime, no pre-compilation required; operator isolation, the same component ID can have different configurations in different operators; graceful degradation, automatically falling back to the default input box rendering when no component is found; declarative action invocation, event handling is declared through handler expressions, automatically completing parameter collection, interface calls, and result backfilling.
[0128] It should be noted that each of the implementable methods in this embodiment can be implemented individually or in any combination without conflict. This application does not limit this.
[0129] Please refer to Figure 6 , Figure 6 This illustration shows a block diagram of a configuration apparatus for a business process-based functional operator provided in some embodiments of this application. It should be understood that this configuration apparatus for the business process-based functional operator is similar to the one described above. Figure 1 Corresponding to the method embodiments, it is able to execute each step involved in the above method embodiments. The specific functions of the configuration device based on the business process function operator can be found in the description above. To avoid repetition, detailed descriptions are appropriately omitted here.
[0130] Figure 6 The configuration device for a business process-based functional operator includes at least one software functional module that can be stored in a memory or embedded in the configuration device in the form of software or firmware. The configuration device includes an acquisition module 601, a determination module 602, a generation module 603, and a rendering module 604, wherein: The acquisition module 601 is used to acquire configuration information of functional operators in the business process, wherein the configuration information includes a target functional operator identifier and target basic information corresponding to the target functional operator identifier; The determining module 602 is used to determine the target component identification information corresponding to the configuration information according to the pre-stored component mapping table. The pre-stored component mapping table is used to determine whether there is a component corresponding to the function operator. The pre-stored component mapping table includes component identification information and component information corresponding to the component identification information. The component information includes preset basic information and multi-dimensional description information. The multi-dimensional description information is used to describe the inheritance relationship of the component, determine whether it is associated with the preset function operator identifier, and control the data source switching, display status or execution operation of the component. The multi-dimensional description information includes data description information, visibility description information and behavior description information. The generation module 603 is used to determine the component corresponding to the functional operator based on the target component identification information corresponding to the configuration information; The rendering module 604 is used to retrieve the components of each functional operator in the business process and perform component-based rendering of the business process.
[0131] In this embodiment, a component mapping table is generated in advance, containing the components and component information corresponding to each functional operator in the business process. The component information includes preset basic information and multi-dimensional description information. Then, the configuration information of the functional operators in the business process is obtained. Based on the target functional operator identifier and target basic information in the configuration information, the pre-established component mapping table is matched to determine the component identifier information corresponding to each functional operator. Then, the corresponding component is generated based on the component identifier information. The components corresponding to all functional operators in the business process are used to perform component-based rendering of the business process. In this way, by setting a component mapping table, which contains multi-dimensional description information to describe the complete behavior of a component, and matching the functional operator identifier and target basic information of the functional operator with the component mapping table, the component corresponding to each functional operator is obtained. This realizes the mapping from component identifier to component, eliminating the need to program each functional operator. Only the component needs to be configured to achieve component rendering of the business process, improving the efficiency and accuracy of component rendering.
[0132] Optionally, the apparatus further includes a setup module, the setup module being used for: Obtain component rendering information for each component. The component rendering information includes component identification information and component information. The component information includes preset basic information and multi-dimensional description information. The data description information is used to determine the input constraint information of the component's data source. The visibility description information is used to characterize the influencing factors of component visibility. The behavior description information is used to characterize the interface call behavior triggered according to different values of the component. The preset basic information includes the data source, the data source activation conditions corresponding to the data source, component dependency relationship, component inheritance identifier, and component type. The data source includes the port name of the previous operator and the data type corresponding to the port name. Convert the component rendering information in XML format into component rendering information in JSON format; The data description information, visibility description information, and behavior description information in the component rendering information in the JSON format are judged; The component mapping table is determined based on the component rendering information associated with the preset function operator identifier and the component rendering information not associated with the preset function operator identifier.
[0133] In this embodiment, the component rendering information of each component is stored in XML format, and then the XML component rendering information is converted into JSON format component rendering information. The multi-dimensional description information and functional operators in the JSON format component rendering information are associated to form a component mapping table. Through pure declarative XML configuration, complex conditional visibility control and dynamic data source switching are realized. The entire linkage process does not require writing any TypeScript code.
[0134] Optionally, the determining module is configured to: The same type of components in the component mapping table are extended using inheritance.
[0135] In this embodiment of the application, inheritance is used to extend the same type of components without adding code; simply adding a declaration is sufficient to extend the same type of components.
[0136] Optionally, the determining module is configured to: The target basic information is compared with the preset basic information in the pre-stored component mapping table; If the target basic information matches the preset basic information, then the component identification information corresponding to the preset basic information is determined as the target component identification information corresponding to the configuration information.
[0137] In this embodiment, the target basic information in the configuration information of the functional operator in the business process is precisely matched with the preset basic information in the pre-stored component mapping table. Based on the matching result, the component corresponding to the configuration information of the functional operator is determined. Without writing any code, component routing, type parsing and data filtering are automatically completed.
[0138] Optionally, the determining module is configured to: If the target basic information and the preset basic information do not match, the target function operator identifier and the preset function operator identifier are matched. If the target function operator identifier and the preset function operator identifier match, the component identifier information corresponding to the preset function operator identifier is determined as the target component identifier information corresponding to the configuration information.
[0139] In this embodiment of the application, if no component is matched when the target basic information is accurately matched, the target function operator identifier is matched again to match the component corresponding to the target function operator identifier, thereby achieving component matching.
[0140] Optionally, the determining module is configured to: If the target function operator identifier and the preset function operator identifier do not match, the component type corresponding to the configuration information is obtained by searching the pre-stored component mapping table according to the configuration information. The configuration information is matched with a pre-established regular expression to obtain variable parameters corresponding to the configuration information, wherein the variable parameters include the data source port and the data type corresponding to the data source port; Based on the component type and the variable parameters, determine the target component identification information corresponding to the configuration information.
[0141] In this embodiment of the application, if no component is matched based on the target function operator identifier, a regular expression is used to match the configuration information to determine the component identifier information corresponding to the configuration information, thereby matching the component in multiple ways.
[0142] Optionally, the determining module is configured to: If the configuration information and the pre-established regular expression fail to match, the preset component identification information corresponding to the configuration information will be determined as the target component identification information.
[0143] In this embodiment of the application, if no component identification information is found through multiple methods, the preset component identification information can be determined as the target component identification information corresponding to the configuration information.
[0144] Optionally, the generation module is used for: If the target component identification information contains a component inheritance identifier, the component corresponding to the functional operator is determined based on the component inheritance identifier.
[0145] In this embodiment of the application, after obtaining the target component identification information, if the target component identification information contains a component inheritance identifier, it is necessary to search according to the component inheritance identifier to obtain the component corresponding to the functional operator.
[0146] Optionally, the generation module is used for: Based on the multi-scope publish and subscribe communication mechanism, in response to a component value modification instruction, a multi-scope notification is sent to components in the same scope or to the operator-level global scope component. This allows the component that receives the multi-scope notification to recalculate visibility information based on visibility, switch the accessed data source, or perform behavioral operations, including calling third-party services.
[0147] Optionally, the generation module is used for: Based on filtrex expressions, determine whether a condition field in a multidimensional description information stores a preset prefix data; If the preset prefix data exists in the condition field, then it is determined to send a multi-level scope notification to the operator-level global scope component; If the preset prefix data is not present in the condition field, then a multi-level scope notification is sent to the sibling scope component.
[0148] In this embodiment, complex conditional visibility control and dynamic data source switching are achieved through purely declarative XML configuration, and the entire linkage process does not require writing any TypeScript code.
[0149] It is understood that the above-described device embodiments correspond to the method embodiments of the present invention. The configuration device for a business process-based functional operator provided by the embodiments of the present invention can implement the configuration method for a business process-based functional operator provided by any one of the method embodiments of the present invention.
[0150] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the aforementioned method, and will not be elaborated further here.
[0151] like Figure 7 As shown, some embodiments of this application provide an electronic device 700, which includes: a memory 710, a processor 720, and a computer program stored in the memory 710 and executable on the processor 720. When the processor 720 reads the program from the memory 710 via a bus 730 and executes the program, it can implement any of the methods included in the above-described configuration method for functional operators based on business processes.
[0152] Processor 720 can process digital signals and can include various computing architectures. For example, it can be a complex instruction set computer architecture, a reduced instruction set computer architecture, or an architecture that implements multiple instruction set combinations. In some examples, processor 720 can be a microprocessor.
[0153] The memory 710 can be used to store instructions executed by the processor 720 or data related to the execution of instructions. These instructions or data may include code used to implement some or all of the functions of one or more modules described in the embodiments of this application. The processor 720 of this disclosure embodiment can be used to execute the instructions in the memory 710 to implement the methods shown above. The memory 710 includes dynamic random access memory, static random access memory, flash memory, optical memory, or other memories well known to those skilled in the art.
[0154] Some embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, describes the method described in the method embodiments.
[0155] Some embodiments of this application also provide a computer program product that, when run on a computer, causes the computer to perform the methods described in the method embodiments.
[0156] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For apparatus embodiments, since they are basically similar to method embodiments, the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0157] It should be understood, in the several embodiments provided in this application, that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0158] In addition, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0159] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0160] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application. It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0161] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0162] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.< / parametergroup> < / parametergroup> < / compox> < / compox> < / visibledescriptor> < / datadescriptor> < / datadescriptors> < / compox> < / parametergroup> < / parameters>
Claims
1. A configuration method for functional operators based on business processes, characterized in that, The method includes: Obtain the configuration information of the functional operators in the business process, wherein the configuration information includes the target functional operator identifier and the target basic information corresponding to the target functional operator identifier; Based on a pre-stored component mapping table, target component identification information corresponding to the configuration information is determined. The pre-stored component mapping table is used to determine whether there is a component corresponding to the functional operator. The pre-stored component mapping table includes component identification information and component information corresponding to the component identification information. The component information includes preset basic information and multi-dimensional description information. The multi-dimensional description information is used to describe the inheritance relationship of the component, determine whether it is associated with the preset functional operator identifier, and control the data source switching, display status, or execution operation of the component. The multi-dimensional description information includes data description information, visibility description information, and behavior description information. Based on the target component identification information corresponding to the configuration information, determine the component corresponding to the functional operator; The components of each functional operator in the business process are retrieved, and the business process is rendered in a component-based manner.
2. The configuration method for functional operators based on business processes according to claim 1, characterized in that, The pre-stored component mapping table is obtained in the following way: Obtain component rendering information for each component. The component rendering information includes component identification information and component information. The component information includes preset basic information and multi-dimensional description information. The data description information is used to determine the input constraint information of the component's data source. The visibility description information is used to characterize the influencing factors of component visibility. The behavior description information is used to characterize the interface call behavior triggered according to different values of the component. The preset basic information includes a data source, the data source activation conditions corresponding to the data source, component dependencies, component inheritance identifiers and component types. The data source includes the port name of the previous operator and the data type corresponding to the port name. Convert the component rendering information in XML format into component rendering information in JSON format; The data description information, visibility description information, and behavior description information in the component rendering information in the JSON format are judged; The component mapping table is determined based on the component rendering information associated with the preset function operator identifier and the component rendering information not associated with the preset function operator identifier.
3. The configuration method for functional operators based on business processes according to claim 2, characterized in that, The method further includes: The same type of components in the component mapping table are extended using inheritance.
4. The configuration method for functional operators based on business processes according to claim 2, characterized in that, The step of determining the target component identification information corresponding to the configuration information based on the pre-stored component mapping table includes: The target basic information is compared with the preset basic information in the pre-stored component mapping table; If the target basic information matches the preset basic information, then the component identification information corresponding to the preset basic information is determined as the target component identification information corresponding to the configuration information.
5. The configuration method for business process-based functional operators according to claim 4, characterized in that, The step of determining the target component identification information corresponding to the configuration information based on the pre-stored component mapping table includes: If the target basic information and the preset basic information do not match, the target function operator identifier and the preset function operator identifier are matched. If the target function operator identifier and the preset function operator identifier match, the component identifier information corresponding to the preset function operator identifier is determined as the target component identifier information corresponding to the configuration information.
6. The configuration method for business process-based functional operators according to claim 5, characterized in that, The step of determining the target component identification information corresponding to the configuration information based on the pre-stored component mapping table includes: If the target function operator identifier and the preset function operator identifier do not match, the component type corresponding to the configuration information is obtained by searching the pre-stored component mapping table according to the configuration information. The configuration information is matched with a pre-established regular expression to obtain variable parameters corresponding to the configuration information, wherein the variable parameters include the data source port and the data type corresponding to the data source port; Based on the component type and the variable parameters, determine the target component identification information corresponding to the configuration information.
7. The configuration method for functional operators based on business processes according to claim 6, characterized in that, The method further includes: If the configuration information and the pre-established regular expression fail to match, the preset component identification information corresponding to the configuration information will be determined as the target component identification information.
8. The configuration method for functional operators based on business processes according to claim 2, characterized in that, The step of determining the component corresponding to the functional operator based on the target component identification information corresponding to the configuration information includes: If the target component identification information contains a component inheritance identifier, the component corresponding to the functional operator is determined based on the component inheritance identifier.
9. The configuration method for functional operators based on business processes according to claim 1, characterized in that, The method further includes: Based on the multi-scope publish and subscribe communication mechanism, in response to a component value modification instruction, a multi-scope notification is sent to components in the same scope or to the operator-level global scope component. This allows the component that receives the multi-scope notification to recalculate visibility information based on visibility, switch the accessed data source, or perform behavioral operations, including calling third-party services.
10. The configuration method for functional operators based on business processes according to claim 9, characterized in that, Sending multi-level scope notifications to sibling scope components or operator-level global scope components includes: Based on filtrex expressions, determine whether a condition field in a multidimensional description information stores a preset prefix data; If the preset prefix data exists in the condition field, then it is determined to send a multi-level scope notification to the operator-level global scope component; If the preset prefix data is not present in the condition field, then a multi-level scope notification is sent to the sibling scope component.
11. 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 when the processor executes the program, it can implement the configuration method of the business process-based functional operator as described in any one of claims 1-10.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the configuration method for business process-based functional operators as described in any one of claims 1-10.
13. A computer program product, said computer program product comprising a computer program, wherein, When the computer program is executed by a processor, it can implement the configuration method of the business process-based functional operator as described in any one of claims 1-10.