Page flow form generation method, device, equipment, medium and program product
Through the process form generation method and the process node configuration operation, the problems of high form development costs and difficult maintenance are solved, and the flexible presentation and code reuse of form elements in different processes are realized, thereby reducing maintenance costs.
Patent Information
- Application Number
- CN202210776439.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-06-30
AI Technical Summary
In the prior art, the form development cost of workflows is high and maintenance is difficult, and the code reuse rate is low. Especially when the form is modified, code modification is required for different workflows, which increases labor and time costs.
By responding to the process form to generate instructions, determine the process node, and obtain element templates and button templates based on the preset element configuration and button configuration, perform process configuration operations, and generate process forms.
Improve the controllability and code reusability of process form generation, so that the same form elements have different presentation in different processes, reducing maintenance costs and improving adaptability.
Smart Images

Figure CN115034764B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of automated office technology, and in particular to a page flow form generation method, apparatus, device, medium, and product. Background Art
[0002] Currently, workflow-related forms are relatively complex. For example, each form in the system workflow has an average of 50 form elements. However, the system currently has over 20 workflow processes, each of which requires maintaining a form's code and a set of form button operation codes in the front-end code. This results in extremely high development and maintenance costs, while also significantly reducing code reuse. In particular, when modifying a form, the corresponding code must be modified for each workflow, increasing both manpower consumption and time costs.
[0003] Therefore, how to improve the reuse rate of forms for multiple different workflows and reduce the maintenance cost of forms has become a technical problem that needs to be solved urgently. Summary of the Invention
[0004] In view of the above technical problems, the present disclosure provides a page flow form generation method, apparatus, device, medium and product.
[0005] A first aspect of the present disclosure provides a page process form generation method, the extraction method comprising: determining a process node in response to a process form generation instruction, wherein the process form generation instruction includes a preset element configuration and a preset button configuration; determining a form element and a form button based on the process node; obtaining an element template and a button template based on the form element and the form button, respectively; performing a first process configuration operation on the element template through the preset element configuration based on the process node, the first configuration operation being used to edit the process node properties of the element template; performing a second process configuration operation on the button template through the preset button configuration based on the process node, the second configuration operation being used to edit the process node properties of the button template; and generating a process form based on the configured element template and the configured button template.
[0006] According to an embodiment of the present disclosure, obtaining an element template and a button template based on the form element and the form button, respectively, includes: classifying the form element to obtain a form element type; and based on the form element type, obtaining the element template corresponding to the form element type.
[0007] According to an embodiment of the present disclosure, when the form element type is a dictionary selector, obtaining the element template and the button template based on the form element and the form button, respectively, also includes: determining whether a data dictionary exists; if a data dictionary exists, adding a dictionary form element template; and / or if a data dictionary does not exist, calling a dictionary interface to obtain a data dictionary.
[0008] According to an embodiment of the present disclosure, obtaining an element template and a button template based on the form element and the form button, respectively, also includes: classifying the form button to obtain a button type; and based on the button type, obtaining the button template corresponding to the button type.
[0009] According to an embodiment of the present disclosure, based on the process node, the first process configuration operation is performed on the element template through the preset element configuration. The first configuration operation is used to edit the process node properties of the element template, including: extracting the verification rules in the preset element configuration, wherein the preset element configuration has a first corresponding relationship with the element templates in different process nodes; and based on the first corresponding relationship, adding the verification rules to the element template.
[0010] According to an embodiment of the present disclosure, based on the process node, the second configuration operation of the process is performed on the button template through the preset button configuration, and the second configuration operation is used to edit the process node properties of the button template, including: extracting the operation public method in the preset button configuration, wherein the operation public method has a second corresponding relationship with the button template in different process nodes; based on the second corresponding relationship, adding the operation public method to the button template.
[0011] According to a second aspect of the present disclosure, a device for generating a page process form is provided, the device comprising a process node determination module, a process information determination module, a code acquisition module, a first configuration module, a second configuration module, and a form generation module, wherein the process node determination module is configured to determine a process node in response to a process form generation instruction, wherein the process form generation instruction includes a preset element configuration and a preset button configuration; the process information determination module is configured to determine a form element and a form button based on the process node; the code acquisition module is configured to respectively acquire an element template and a button template based on the form element and the form button; the first configuration module is configured to perform a first process configuration operation on the element template using the preset element configuration based on the process node, the first configuration operation being configured to edit the process node attributes of the element template and the first configuration operation being configured to specify the process attributes of the form element corresponding to the process node; the second configuration module is configured to perform a second process configuration operation on the button template using the preset button configuration based on the process node, the second configuration operation being configured to edit the process node attributes of the button template; and the form generation module is configured to generate a process form based on the configured element template and the configured button template.
[0012] According to an embodiment of the present disclosure, the code acquisition module is further used to classify the form elements to obtain form element types; and based on the form element types, acquire the element template corresponding to the form element types.
[0013] According to an embodiment of the present disclosure, when the form element type is a dictionary selector, the code acquisition module is also used to determine whether a data dictionary exists; if a data dictionary exists, add a dictionary form element template; and / or if a data dictionary does not exist, call a dictionary interface to obtain the data dictionary.
[0014] According to an embodiment of the present disclosure, the code acquisition module is further configured to classify the form buttons to obtain button types; and based on the button types, acquire the button template corresponding to the button types.
[0015] According to an embodiment of the present disclosure, the first configuration module is also used to extract the verification rules in the preset element configuration, wherein there is a first correspondence between the preset element configuration and the element template in different process nodes; and based on the first correspondence, add the verification rules to the element template.
[0016] According to an embodiment of the present disclosure, the second configuration module is also used to extract the common operation method in the preset button configuration, wherein the common operation method has a second corresponding relationship with the button template in different process nodes; based on the second corresponding relationship, the common operation method is added to the button template.
[0017] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; a memory for storing one or more programs, wherein, when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned page flow form generation method.
[0018] A fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned page flow form generation method.
[0019] A fifth aspect of the present disclosure further provides a computer program product, including a computer program, which implements the above-mentioned page flow form generation method when executed by a processor.
[0020] Compared with related technologies, the page process form generation method, device, equipment, medium and product provided by the present disclosure can configure the process by the code corresponding to the form elements, thereby increasing the controllability of the process form generation, so that the same form elements can have different presentations in different processes, thereby greatly increasing the adaptability and code reusability of the page process form generation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0022] Figure 1 The application scenario diagram of the page flow form generation method according to an embodiment of the present disclosure is schematically shown.
[0023] Figure 2 A flowchart of a page flow form generation method according to an embodiment of the present disclosure is schematically shown.
[0024] Figure 3 A schematic diagram of a leave request process according to an embodiment of the present disclosure is shown schematically.
[0025] Figure 4 A schematic diagram of a process form according to an embodiment of the present disclosure is schematically shown.
[0026] Figure 5A flowchart of a first configuration operation method according to an embodiment of the present disclosure is schematically shown.
[0027] Figure 6 A flowchart of another first configuration operation method according to an embodiment of the present disclosure is schematically shown.
[0028] Figure 7 A flowchart of a second configuration operation method according to an embodiment of the present disclosure is schematically shown.
[0029] Figure 8 The following schematically shows a structural block diagram of a page flow form generating device according to an embodiment of the present disclosure.
[0030] Figure 9 A block diagram of an electronic device suitable for implementing a page flow form generating method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0031] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the detailed description below, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0032] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise," "include," etc. used herein indicate the presence of the features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0033] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0034] When expressions such as "at least one of A, B and C, etc." are used, they should generally be interpreted in accordance with the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0035] Before describing the technical solution of the present disclosure, the technical terms in this field are explained as follows:
[0036] Process: A form follows a prescribed procedure to achieve a certain goal. This prescribed procedure is called a process. For example, in order to request leave, the application must go through various approvals before it is finally approved. The process by which a leave application flows is called a process.
[0037] Process form: A page that contains input boxes, date selection boxes, buttons, etc.
[0038] Form elements: The components of the above process forms are called form elements. Let's take the leave application form as an example. The person requesting leave, the leave start time, etc. are all form elements.
[0039] Process Node: The state of a form when it is viewed by different people in the process is called a node. Take the leave application mentioned above as an example. When the leave application reaches the team leader and the team leader approves it, it is a node.
[0040] Data dictionary: The values of some form elements on a page come from fixed options, which are called data dictionaries. For example, gender data can only come from [Male, Female, Confidential], so [Male, Female, Confidential] is a data dictionary.
[0041] Data dictionary code value: When a form has multiple data dictionaries, you need to use a criterion to distinguish which data dictionary the form element's value comes from. This criterion is called a data dictionary code value. For example, if a page has two data dictionaries, gender and ethnicity, you can name the gender dictionary code value "gender" and the ethnicity dictionary code value "nation." This way, you can clearly identify which data dictionary the corresponding form element's option comes from.
[0042] In existing technology, process form development requires a large amount of work, and each form requires writing a set of form pages and process operation logic. Currently, a system has an average of 20 processes, which requires writing 20 sets of form pages and process operation logic. If form elements change, code must be added to the corresponding front-end code to support the change. For example, if certain form elements need to be added to three process forms and the form elements need to be required or length-checked, the front-end code for each of the three forms needs to be found and added separately.
[0043] Compared with the related art, the embodiments of the present disclosure provide a page process form generation method, apparatus, device, medium and product, wherein the page process form generation method includes: determining a process node in response to a process form generation instruction, wherein the process form generation instruction includes a preset element configuration and a preset button configuration; determining a form element and a form button based on the process node; obtaining an element template and a button template based on the form element and the form button, respectively; based on the process node, performing a first process configuration operation on the element template through the preset element configuration, the first configuration operation being used to edit the process node properties of the element template, the first configuration operation being used to specify the process properties of the form element corresponding to the process node; based on the process node, performing a second process configuration operation on the button template through the preset button configuration, the second configuration operation being used to edit the process node properties of the button template; and generating a process form based on the configured element template and the configured button template.
[0044] The present disclosure increases the controllability of process form generation by configuring the code corresponding to the form elements in the process, so that the same form elements can have different presentations in different processes, thereby greatly increasing the adaptability and code reusability of the page process form generation method.
[0045] Figure 1 The application scenario diagram of the page flow form generation method according to an embodiment of the present disclosure is schematically shown.
[0046] like Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium for providing a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired or wireless communication links or optical fiber cables.
[0047] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0048] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0049] The server 105 may be a server that provides various services, such as a background management server (for example only) that supports websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process received data such as user requests, and feed back processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0050] It should be noted that the page flow form generation method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the page flow form generation device provided in the embodiment of the present disclosure can generally be set in the server 105. The page flow form generation method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the code annotation device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.
[0051] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.
[0052] The following will be passed Figure 2-Figure 7 A page flow form generation method, apparatus, device, medium and product according to an embodiment of the present disclosure are described in detail.
[0053] Figure 2 A flow chart of a page flow form generation method according to an embodiment of the present disclosure is schematically shown.
[0054] like Figure 2 As shown, this embodiment provides a page flow form generation method, which includes operations S210 to S260, specifically as follows:
[0055] In operation S210 , a process node is determined in response to a process form generation instruction, wherein the process form generation instruction includes a preset element configuration and a preset button configuration.
[0056] For example, the code information related to the process form generation instruction is as follows:
[0057] {
[0058] "processKey": "leave-process", / / unique identifier of the process
[0059] "processName": "Leave process", / / The name of the process type
[0060] "activityList": ["applyerDraft", "leaderApprove", ...] / / Indicates how many process nodes there are in the leave application process, including applicant drafting, leader approval, and other process nodes.
[0061] }
[0062] The process type is a leave request process, and accordingly, the process form generation instruction includes multiple process nodes.
[0063] Figure 3 A schematic diagram of a leave request process according to an embodiment of the present disclosure is shown schematically.
[0064] like Figure 3 As shown, this embodiment provides a leave request process, which includes operations S31 to S34, as follows:
[0065] In operation S31, fill in the application form;
[0066] In operation S32, the team leader approves;
[0067] In operation S33, the responsible leader approves;
[0068] In operation S34, human resources are registered.
[0069] Specifically, in operations S31-S34, each operation faces a different operator, and the next operation needs to be initiated based on the success of the previous operation. Among them, each operation in the above operations S31-S34 is a process node, and each process node corresponds to a process form. Different process forms face different operators.
[0070] It is understandable that the process form generation instruction corresponds to multiple process forms corresponding to the entire series of process nodes, rather than a process form corresponding to a single process node. The process form corresponding to each process node may be in the form of a WEB page.
[0071] Figure 4 A schematic diagram of a process form according to an embodiment of the present disclosure is schematically shown.
[0072] like Figure 4As shown, taking the process type of leave process as an example, when the process node is in operation S31, the process form (i.e., leave form) corresponding to the process node may include: the person requesting leave (displayed as an input box on the page), the start time of leave (displayed as a date selection box on the page), the end time of leave (displayed as a date selection box on the page), the reason for leave (displayed as an input box on the page), the submit button (displayed as a button on the page), etc.
[0073] In operation S220 , form elements and form buttons are determined based on the process node.
[0074] It is understandable that the process node is used to describe the information of the node, which form elements are available at the current process node, which form elements are editable, which form elements are required, and which form elements can be displayed. For example, the code of the team leader approval process node of the leave application is as follows:
[0075] {
[0076] "activityName": "Team Leader Approval", / / The name of the current process node
[0077] "activityId": "leaderApprove", / / The unique identifier of the current process node
[0078] "fields": ["applyer", "startTime", "endTime"], / / The current process node can display the form element identifier
[0079] "editableFields": [], / / The editable form elements are empty, which means that in the team leader approval process node, the team leader can only view the form and cannot modify the leave information filled in by the leave requester
[0080] "requiredFields": ["applyer", "startTime", "endTime"], / / Identifier of required form elements. This example indicates that the leave applicant, leave start time, and leave end time are required form elements
[0081] "buttonList": ["saveButton", "deleteButton", "commitButton"] / / The displayed form button list. Here it means that the [Save], [Delete], and [Submit] buttons need to be displayed
[0082] }
[0083] Specifically, based on the process node, the form elements and form buttons required for the process node can be obtained, and then the preset element configuration and the preset button configuration can be obtained. The form elements and the form buttons both have corresponding public codes in the database, which are referred to as element templates and button templates in this disclosure.
[0084] It is understood that the preset element configuration and the preset button configuration are configured for the process form corresponding to each process node. Therefore, the preset element configuration is inconsistent between process forms corresponding to different process nodes. Similarly, the preset button configuration is also inconsistent between process forms corresponding to different process nodes.
[0085] In operation S230 , an element template and a button template are acquired based on the form element and the form button, respectively.
[0086] According to an embodiment of the present disclosure, obtaining an element template and a button template based on the form element and the form button, respectively, includes: classifying the form element to obtain a form element type; and based on the form element type, obtaining the element template corresponding to the form element type.
[0087] Specifically, the form element types include at least an input box, a date selector, a person selector, and a dictionary selector. Correspondingly, the element templates include at least an input box template, a date selector template, and a dictionary selector template.
[0088] Among them, for the call (or addition) of the element template, when the form element type is an input box, an input box template (input box code) is added; when the form element type is a date selection box, a date selection box template (date selection box code) is added; when the form element type is a personnel selector, a personnel selector template (personnel selector code) is added.
[0089] For example, in a leave application form, the element template (code format) when the form element type is "input box" is as follows:
[0090] {
[0091] "label": "Leave Requester", / / This is the text that describes the form element
[0092] "type": "input", / / This is to describe the type of form element, input is the input box type
[0093] "prop": "applyer", / / This is the data value that describes the binding of the form element. For example, if the data returned by the background is the following structure {"applyer": "Zhang San"}, then it will be obtained. If the value of applyer is "Zhang San", then Zhang San will be displayed on the page.
[0094] }
[0095] It should be noted that when calling (or adding) an element template of a certain form element type, it does not simply add the corresponding template.
[0096] According to an embodiment of the present disclosure, when the form element type is a dictionary selector, it is determined whether a data dictionary exists; if a data dictionary exists, a dictionary form element template is added; and / or if a data dictionary does not exist, a dictionary interface is called to obtain the data dictionary.
[0097] That is to say, for certain fixed-option form element types such as dictionary selectors, further verification is required to check whether a data dictionary exists. If not, a dictionary interface needs to be called to obtain the data dictionary. The data dictionary can be called according to the data dictionary code value.
[0098] According to an embodiment of the present disclosure, when the form element type is an attachment, the attachment upload component in the public component is rendered.
[0099] For example, the attachment upload component is used to implement common upload, download, delete and preview functions.
[0100] According to an embodiment of the present disclosure, when the form type is an opinion field, the opinion component in the public component is rendered.
[0101] For example, the opinion component is used to implement common opinion filling, opinion deletion, opinion modification, and commonly used opinion selection functions.
[0102] According to an embodiment of the present disclosure, obtaining an element template and a button template based on the form element and the form button, respectively, also includes: classifying the form button to obtain a button type; and based on the button type, obtaining the button template corresponding to the button type.
[0103] Specifically, the button types include at least Save, Submit, Close, and Return.
[0104] It can be understood that the element template and button template can be regarded as reusable templates (or public components). The template (or public component) does not exist in any process, but is publicly used and only requires less configuration to become part of the process form.
[0105] It is understandable that different process nodes correspond to different process forms, and each different process form contains its own set of form elements. For the form element sets corresponding to different process forms, there may be individual form elements with the same form element type. However, based on different process nodes, these form elements with the same form element type need to be further configured so that these form elements comply with the verification rules of the process node. For example, in operation S31, when filling out the application form, the form element (form element type is personnel selector) "Leave Requester" needs to be configured as editable, and in operation S32, when the team leader approves, the form element (form element type is) "Leave Requester" needs to be configured as non-editable. Therefore, although it is the same form element, some attributes of the same form element also need to be further configured based on different process nodes.
[0106] In operation S240, based on the process node, a first process configuration operation is performed on the element template through the preset element configuration. The first configuration operation is used to edit the process node properties of the element template. The first configuration operation is used to specify the process properties of the form element corresponding to the process node.
[0107] The process attributes of the form elements at least include verification rules of form elements at different process nodes.
[0108] It is understandable that the element template is a form element, but the element template exists as an editable form element. When the element template and / or button template does not exist, you can edit and add the element template and / or button template by yourself.
[0109] Figure 5 A flowchart of a first configuration operation method according to an embodiment of the present disclosure is schematically shown.
[0110] like Figure 5 As shown, this embodiment provides a first configuration operation method, which includes operations S510 to S520, specifically as follows:
[0111] In operation S510 , a verification rule in the preset element configuration is extracted, wherein a first corresponding relationship exists between the preset element configuration and the element templates in different process nodes.
[0112] The attributes of the verification rules include mandatory check, minimum input length check, maximum input length check, and regular check. Each verification rule attribute includes adjustable parameters. For example, the parameter in the minimum input length check can be set to five, that is, the minimum input length is at least five characters.
[0113] Specifically, the preset element configuration is an edited configuration. Based on this edited configuration, the corresponding element template is found through the first corresponding relationship, and then, the verification rule can be directly added at the corresponding position.
[0114] It can be understood that the first correspondence is used to define the correspondence between the preset element configuration and the element template in the process node, that is, different preset element configurations find different corresponding process nodes through their corresponding first correspondence.
[0115] In operation S520 , the verification rule is added to the element template based on the first corresponding relationship.
[0116] The first corresponding relationship includes: any number (including zero) of the verification rules corresponds to one element template.
[0117] Specifically, adding the verification rule to the element template based on the first correspondence includes: finding the element template in the corresponding process node based on the first correspondence, and then adding the verification rule. Therefore, based on different process nodes, the same element template (or configuration item) can have attributes with the same verification rules or attributes with different verification rules. Furthermore, the same element template (or configuration item) in different process nodes can have different verification rules.
[0118] For example, the verification rules in the "Leave Requester" element template have different parameters in the first and second process nodes. On the applicant side (or the first process node), the parameter of the attribute "Is it editable" is "Yes", while on the approver side (or the second process node), the parameter of the attribute "Is it editable" is "No".
[0119] For another example, the parameters of the verification rules in the "Leave Applicant" element template are different in the number of verification rules in the first process node and the second process node. In the first process node, the "Leave Applicant" will have a "minimum input length verification" verification rule, while in the second process node, the "Leave Applicant" will not have a "minimum input length verification" rule.
[0120] In the embodiment of the present disclosure, the verification rules can be regarded as preset common components. Based on the free combination of the preset common components, the process attributes of different form elements can be formed, which improves the diversity of process attribute configuration while reducing maintenance costs.
[0121] Figure 6A flowchart of another first configuration operation method according to an embodiment of the present disclosure is schematically shown.
[0122] like Figure 6 As shown, this embodiment provides another first configuration operation method, which includes operations S601 to S611, specifically as follows:
[0123] In operation S601, a form element is acquired.
[0124] In operation S602, it is determined whether the form element is required. If so, operation S603 is executed; otherwise, operation S612 is executed.
[0125] In operation S603 , a mandatory check is added.
[0126] In operation S604, it is determined whether the form element is configured with minimum input length check, if so, operation S605 is executed, otherwise, operation S612 is executed.
[0127] In operation S605 , a minimum input length check is added.
[0128] In operation S606, it is determined whether the form element is configured with a maximum input length check. If so, operation S607 is executed; otherwise, operation S612 is executed.
[0129] In operation S607 , a maximum input length check is added.
[0130] In operation S608, it is determined whether the form element is configured with regular check. If so, operation S609 is executed; otherwise, operation S612 is executed.
[0131] In operation S609 , a regularization check is added.
[0132] In operation S610 , it is determined whether all the above verification rules are added successfully. If yes, operation S612 is executed; otherwise, operation S613 is executed.
[0133] In operation S611 , a prompt indicating that the configuration is successful is displayed.
[0134] In operation S612, the adding of the verification rule is terminated.
[0135] According to an embodiment of the present disclosure, after adding a check, if the form value does not meet the check, an error reminder is reported.
[0136] It should be noted that there is a causal relationship between the different verification rules mentioned above. That is, only when it is determined that verification rule A needs to be configured can the determination of whether to configure verification rule B be continued. Of course, there may be no causal relationship between different verification rules. That is, when judging different verification rules, it is not necessary to meet the condition of verification rule A before the verification / addition process of verification rule B can be started. This will not be elaborated here.
[0137] In operation S250 , based on the process node, a second process configuration operation is performed on the button template through the preset button configuration, where the second configuration operation is used to edit the process node attribute of the button template.
[0138] It's important to note that existing processes are difficult to maintain, and changes to the process require extensive page modifications. For example, when clicking the "Save" button, the original logic verifies that all required fields are filled in. Once completed, the form data is saved. If any required fields are missing, the form is not saved. This change will now prevent required fields from being checked when clicking the "Save" button, and will only be checked when clicking the "Submit" button. Using existing technology, this would require the same logic modification across 20 process form pages.
[0139] Figure 7 A flowchart of a second configuration operation method according to an embodiment of the present disclosure is schematically shown.
[0140] like Figure 7 As shown, this embodiment provides a second configuration operation method, which includes operations S710 to S720, specifically as follows:
[0141] In operation S710 , a common operation method in the preset button configuration is extracted, wherein a second corresponding relationship exists between the common operation method and the button templates in different process nodes.
[0142] It can be understood that the second correspondence is used to define the correspondence between the preset button configuration and the meta-button template in the process node, that is, different preset button configurations find different corresponding process nodes through their corresponding second correspondence.
[0143] In operation S720 , based on the second corresponding relationship, the public operation method is added to the button template.
[0144] Specifically, adding the operation public method to the button template based on the second corresponding relationship includes: finding the button template in the corresponding process node based on the second corresponding relationship, and then adding the operation public method. Therefore, based on different process nodes, the same button template (or configuration item) can be a property with the same operation public method, or a property with different operation public methods. Moreover, the same button template (or configuration item) of different process nodes can also have different operation public methods. I will not go into details here.
[0145] According to an embodiment of the present disclosure, the adding the common operation method to the button template includes: configuring a plurality of the common operation methods so that the plurality of common operation methods can be executed in a preset order.
[0146] For example, after clicking Save, the execution of the operation public method includes: Operation public method (1): obtaining form data and making a save interface call.
[0147] For another example, after clicking submit, the execution of the operation public method includes: operation public method (1): verifying the form; operation public method (2): if passed, a pop-up window for the next node processor pops up; operation public method (3): the user selects the processor; operation public method (4): calling the interface to drive the process to the next process node.
[0148] For another example, after clicking Close, the execution of the operation public method includes: operation public method (1): prompting the user whether to save the form; operation public method (2): if the user chooses to save the form, the save form interface is called to save the form; operation public method (3): not saving, directly closing the page.
[0149] For another example, after clicking back, the execution of the operation public method includes: operation public method (1): obtaining the node that has flowed before; operation public method (2): the user selects a node; operation public method (3): calling the interface to drive the process to the selected node.
[0150] In the embodiments of the present disclosure, the common operation method can be regarded as a preset common component. Based on the free combination of the preset common components, combined operations behind different form buttons can be formed, especially for form buttons with high reusability, which improves maintainability.
[0151] In operation S260 , a process form is generated based on the configured element template and the configured button template.
[0152] With the help of a page process form generation method in this embodiment, the process configuration of the code corresponding to the form elements is performed, which increases the controllability of the process form generation, so that the same form elements can have different presentations in different processes, thereby greatly increasing the adaptability and code reusability of the page process form generation method.
[0153] Based on the above Figure 2-Figure 7 The present disclosure also provides a page flow form generation device. Figure 8 The device is described in detail.
[0154] Figure 8 The following schematically shows a structural block diagram of a page flow form generating device according to an embodiment of the present disclosure.
[0155] like Figure 8 As shown, this embodiment provides a page process form generation device 800, which includes a process node determination module 810, a process information determination module 820, a code acquisition module 830, a first configuration module 840, a second configuration module 850 and a form generation module 860, wherein:
[0156] The process node determination module 810 is configured to determine a process node in response to a process form generation instruction, wherein the process form generation instruction includes a preset element configuration and a preset button configuration;
[0157] The process information determination module 820 is used to determine form elements and form buttons based on the process nodes;
[0158] The code acquisition module 830 is used to acquire an element template and a button template based on the form element and the form button respectively;
[0159] The first configuration module 840 is configured to perform a first process configuration operation on the element template based on the process node through the preset element configuration, wherein the first configuration operation is used to edit the process node attributes of the element template, and the first configuration operation is used to specify the process attributes of the form element corresponding to the process node;
[0160] The second configuration module 850 is configured to perform a second configuration operation on the button template based on the process node through the preset button configuration, wherein the second configuration operation is used to edit the process node properties of the button template; and
[0161] The form generation module 860 is used to generate a process form based on the configured element template and the configured button template.
[0162] According to an embodiment of the present disclosure, the code acquisition module 830 is further configured to classify the form elements to obtain form element types; and based on the form element types, acquire the element template corresponding to the form element types.
[0163] According to an embodiment of the present disclosure, when the form element type is a dictionary selector, the code acquisition module 830 is also used to determine whether a data dictionary exists; if a data dictionary exists, add a dictionary form element template; and / or if a data dictionary does not exist, call a dictionary interface to obtain a data dictionary.
[0164] According to an embodiment of the present disclosure, the code acquisition module 830 is further configured to classify the form buttons to obtain button types; and based on the button types, acquire the button template corresponding to the button types.
[0165] According to an embodiment of the present disclosure, the first configuration module 840 is also used to extract the verification rules in the preset element configuration, wherein there is a first correspondence between the preset element configuration and the element template in different process nodes; and based on the first correspondence, add the verification rules to the element template.
[0166] According to an embodiment of the present disclosure, the second configuration module 850 is also used to extract the common operation method in the preset button configuration, wherein the common operation method has a second corresponding relationship with the button template in different process nodes; based on the second corresponding relationship, the common operation method is added to the button template.
[0167] With the help of a page process form generation method in this embodiment, the process configuration of the code corresponding to the form elements is performed, which increases the controllability of the process form generation, so that the same form elements can have different presentations in different processes, thereby greatly increasing the adaptability and code reusability of the page process form generation method.
[0168] Figure 9 A block diagram of an electronic device suitable for implementing a page flow form generating method according to an embodiment of the present disclosure is schematically shown.
[0169] like Figure 9As shown, the electronic device 900 according to an embodiment of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage part 908 into a random access memory (RAM) 903. The processor 901 may, for example, include a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a dedicated microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 901 may also include an onboard memory for caching purposes. The processor 901 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0170] Various programs and data required for the operation of the electronic device 900 are stored in the RAM 903. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 executes the various operations of the method flow according to the embodiment of the present disclosure by executing the programs in the ROM 902 and / or the RAM 903. It should be noted that the programs may also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 may also execute the various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.
[0171] According to an embodiment of the present disclosure, the electronic device 900 may further include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 may further include one or more of the following components connected to the I / O interface 905: an input portion 906 including a keyboard, a mouse, etc.; an output portion 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage portion 908 including a hard disk, etc.; and a communication portion 909 including a network interface card such as a LAN card or a modem. The communication portion 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in the drive 910 as needed, so that a computer program read therefrom can be installed into the storage portion 908 as needed.
[0172] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments, or may exist independently and not be incorporated into the device / apparatus / system. The computer-readable storage medium carries one or more programs, and when executed, implements the method according to the embodiments of the present disclosure.
[0173] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 902 and / or RAM 903 described above and / or one or more memories other than ROM 902 and RAM 903.
[0174] The embodiments of the present disclosure also include a computer program product, which includes a computer program containing program code for executing the method shown in the flowchart. When the computer program product is executed in a computer system, the program code is used to cause the computer system to implement the item recommendation method provided by the embodiments of the present disclosure.
[0175] The computer program executes the above functions defined in the system / device of the embodiment of the present disclosure when the processor 901 executes the computer program. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0176] In one embodiment, the computer program may be stored on a tangible storage medium such as an optical storage device or a magnetic storage device. In another embodiment, the computer program may be transmitted and distributed in the form of a signal on a network medium, downloaded and installed via the communication portion 909, and / or installed from a removable medium 911. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to wireless, wired, or any suitable combination thereof.
[0177] In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 909, and / or installed from a removable medium 911. When the computer program is executed by the processor 901, the above-described functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the systems, devices, means, modules, units, etc. described above can be implemented by computer program modules.
[0178] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computer programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, languages such as Java, C++, python, "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect via the Internet).
[0179] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0180] Those skilled in the art will appreciate that the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways, even if such combinations and / or couplings are not explicitly described in this disclosure. In particular, the features described in the various embodiments and / or claims of this disclosure may be combined and / or coupled in various ways without departing from the spirit and teachings of this disclosure. All such combinations and / or couplings are intended to fall within the scope of this disclosure.
[0181] The embodiments of the present disclosure are described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although each embodiment has been described separately above, this does not mean that the measures in each embodiment cannot be used in combination to advantage. The scope of the present disclosure is defined by the appended claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A page flow form generation method, characterized in that: include: In response to a process form generation instruction, determining a process node, wherein the process form generation instruction includes a preset element configuration and a preset button configuration; Based on the process nodes, determine the form elements and form buttons; Based on the form element and the form button, respectively obtain an element template and a button template; Based on the process node, performing a first process configuration operation on the element template through the preset element configuration, wherein the first configuration operation is used to edit the process node attribute of the element template; Based on the process node, performing a second process configuration operation on the button template through the preset button configuration, wherein the second configuration operation is used to edit the process node attributes of the button template, and the first configuration operation is used to specify the process attributes of the form element corresponding to the process node; and Generate a process form based on the configured element template and button template; Among them, the process attributes of the form element include at least the verification rules of the form elements of different process nodes; the verification rules include a first verification rule and a second verification rule, and the configuration method of the verification rules includes: when the first verification rule is successfully configured, configuring the second verification rule.
2. The method according to claim 1, characterized in that The acquiring of an element template and a button template based on the form element and the form button respectively includes: Classifying the form elements to obtain form element types; Based on the form element type, the element template corresponding to the form element type is acquired.
3. The method according to claim 2, characterized in that in, When the form element type is a dictionary selector, The acquiring of an element template and a button template based on the form element and the form button, respectively, further includes: Determine whether a data dictionary exists; If a data dictionary exists, add a dictionary form element template; and / or If the data dictionary does not exist, call the dictionary interface to obtain the data dictionary.
4. The method according to claim 1, wherein The acquiring of an element template and a button template based on the form element and the form button, respectively, further includes: Classifying the form buttons to obtain button types; and Based on the button type, the button template corresponding to the button type is acquired.
5. The method according to any one of claims 1 to 4, characterized in that The step of performing a first process configuration operation on the element template based on the process node through the preset element configuration, wherein the first configuration operation is used to edit the process node attributes of the element template, includes: Extracting a verification rule from the preset element configuration, wherein a first correspondence exists between the preset element configuration and the element templates in different process nodes; and Based on the first corresponding relationship, the verification rule is added to the element template.
6. The method according to any one of claims 1 to 4, characterized in that The step of performing a second configuration operation on the button template based on the process node through the preset button configuration, wherein the second configuration operation is used to edit the process node attributes of the button template, includes: Extracting a common operation method in the preset button configuration, wherein a second corresponding relationship exists between the common operation method and the button templates in different process nodes; Based on the second corresponding relationship, the public operation method is added to the button template.
7. A page flow form generating device, characterized in that: The device includes a process node determination module, a process information determination module, a code acquisition module, a first configuration module, a second configuration module and a form generation module, wherein: The process node determination module is configured to determine a process node in response to a process form generation instruction, wherein the process form generation instruction includes a preset element configuration and a preset button configuration; The process information determination module is used to determine form elements and form buttons based on the process nodes; The code acquisition module is used to acquire an element template and a button template based on the form element and the form button respectively; The first configuration module is configured to perform a first process configuration operation on the element template based on the process node through the preset element configuration, wherein the first configuration operation is used to edit the process node attributes of the element template, and the first configuration operation is used to specify the process attributes of the form element corresponding to the process node; The second configuration module is configured to perform a second configuration operation on the button template based on the process node through the preset button configuration, wherein the second configuration operation is used to edit the process node attributes of the button template; and The form generation module is used to generate a process form based on the configured element template and the configured button template; Among them, the process attributes of the form element include at least the verification rules of the form elements of different process nodes; the verification rules include a first verification rule and a second verification rule, and the configuration method of the verification rules includes: when the first verification rule is successfully configured, configuring the second verification rule.
8. An electronic device comprising: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors are enabled to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Form generation method and form generator
CN103577165A
Form generation method and device and electronic equipment
CN114595664A