CN117076325A - Gray scale test method, device and system based on workflow engine and server - Google Patents

Gray scale test method, device and system based on workflow engine and server Download PDF

Info

Publication number
CN117076325A
CN117076325A CN202311119852.8A CN202311119852A CN117076325A CN 117076325 A CN117076325 A CN 117076325A CN 202311119852 A CN202311119852 A CN 202311119852A CN 117076325 A CN117076325 A CN 117076325A
Authority
CN
China
Prior art keywords
business process
gray
instance
version
gray scale
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311119852.8A
Other languages
Chinese (zh)
Inventor
吴作鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202311119852.8A priority Critical patent/CN117076325A/en
Publication of CN117076325A publication Critical patent/CN117076325A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3664Environments for testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3696Methods or tools to render software testable
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a gray level testing method, a device, a system and a server based on a workflow engine, which can be applied to the financial field or other fields.

Description

Gray scale test method, device and system based on workflow engine and server
Technical Field
The application relates to the technical field of computer communication, in particular to a gray level testing method, device and system based on a workflow engine and a server.
Background
The workflow engine is a business process managed by a software application program, and can generally provide independent process engine service, and the business processing requirements under different application scenes are met by deploying a server or a cluster formed by a plurality of servers. And the workflow engine is used as an operation platform for developing the business process, can create a process instance according to the latest released business process template version, and is deployed to be operated in a production environment after gray level test.
In the gray scale test system of the business flow example, a business server for a formal version and a gray scale server for a gray scale version are generally deployed, traffic is routed to the corresponding version of the server at a gateway layer according to the configured traffic proportion, and gray scale test is performed in the corresponding environment.
However, the number of servers deployed by the workflow engine is limited, and if one or more servers are selected from the clustered environment as gray level servers to deploy gray level versions, an abnormality occurs in gray level testing in the clustered environment; if a server is selected to deploy a gray scale version for gray scale test, a workflow engine is required to determine a current gray scale server from the deployed servers, so that a business process instance is created according to the gray scale version without restarting the workflow engine, the process is complex, and the gray scale test efficiency and reliability are affected.
In addition, in the gray level test process, the system can schedule the deployment of the service flow on the server in a load balancing mode, but the number of the flow servers is often small, so that the number of the service flow scheduled on the gray level server is large in proportion, and the gray level test performance is influenced.
Disclosure of Invention
In order to solve the technical problems, the application provides the following technical scheme:
in one aspect, the application provides a gray scale test method based on a workflow engine, which comprises the following steps:
obtaining an instance creation request for a business process; the instance creation request is generated by calling a business interface of the workflow engine and contains attribute information of an instance requester;
determining whether a business process instance requested to be created meets a preset gray scale condition according to preset business process configuration information and the attribute information;
determining that the gray scale condition is met, and creating a gray scale version business process instance according to a predetermined gray scale version business process template aiming at the business process;
and determining that the gray condition is not met, and creating a formal version business process instance according to a formal version business process template which is recently released for the business process.
Optionally, the determining, according to the preset service flow configuration information and the attribute information, whether the service flow instance requested to be created meets the preset gray scale condition includes:
determining whether the business process configuration information contains gray scale rules configured for the business process in advance;
if the gray scale rule is not included, determining that the service flow instance requested to be created does not meet the preset gray scale condition;
if the gray scale rule is included, determining whether the instance requester belongs to a gray scale user preconfigured for the business process according to the attribute information and the gray scale rule;
if the service flow instance belongs to the gray level user, determining that the service flow instance requested to be created meets a preset gray level condition;
and if the service flow instance does not belong to the gray level user, determining that the service flow instance requested to be created does not meet the preset gray level condition.
Optionally, the gray scale rule is configured after determining a gray scale version business process template for the business process, and includes a preset gray scale probability and/or a gray scale user list for indicating gray scale users for the business process; wherein the preset gray probability and the gray user list can be increased along with the increase of the gray test duration;
The determining whether the instance requester belongs to a gray level user preconfigured for the business process according to the attribute information and the gray level rule includes any implementation manner as follows:
determining whether the instance requester belongs to a gray level user pre-configured for the business process according to the preset gray level probability;
determining whether the instance requester belongs to a gray level user preconfigured for the business process according to the attribute information and the gray level user list;
and determining whether the instance requester belongs to a gray level user preconfigured for the business process according to the attribute information, the gray level user list and the preset gray level probability.
Optionally, the method further comprises:
detecting operation information of the gray version service flow instance in the server production environment;
and determining that the gray version business process instance has operation abnormality according to the operation information, and outputting corresponding abnormality indication information.
Optionally, the method for presetting the service flow configuration information includes:
obtaining a new version of business process template established for the business process;
Determining that the test executed by the new version business process template in the test environment is passed, determining the new version business process template as a gray version business process template, and deploying the gray version business process template in the production environment of the server;
and configuring a gray rule for a corresponding business process according to a gray release rule for the gray version business process template, wherein the gray rule is used for indicating whether to establish a business process instance for the business process according to the gray version business process template.
Optionally, the method further comprises:
detecting operation information of the gray version service flow instance in the server production environment;
determining whether a switching condition for the gray version business process template is met according to the operation information;
and if the switching condition is met, switching the gray scale version business process template into a formal version business process template, then issuing the formal version business process template, and disabling the gray scale rule.
Optionally, the operation information includes a gray scale test time, and the business process configuration information includes a valid time configured for the gray scale rule;
and determining whether the switching condition for the gray version business process template is met according to the operation information, wherein the determining comprises the following steps:
Determining whether the gray test time reaches the valid time;
if the effective time is reached, executing the steps of switching the gray version business process template into a formal version business process template, then issuing the gray version business process template, and controlling the gray rule to be in an invalid state so as to prohibit calling the gray version business process template;
and if the effective time is not reached, controlling the gray rule to be in an effective state so as to continuously carry out gray test on the gray version business process instance.
On the other hand, the application also provides a gray scale testing device based on the workflow engine, which comprises:
an instance creation request obtaining module, configured to obtain an instance creation request for a business process; the instance creation request is generated by calling a business interface of the workflow engine and contains attribute information of an instance requester;
the first determining module is used for determining whether the service flow instance requested to be created meets the preset gray level condition according to the preset service flow configuration information and the attribute information;
the first creating module is used for determining that the gray scale condition is met and creating a gray scale version business process instance according to a predetermined gray scale version business process template aiming at the business process;
And the second creation module is used for determining that the gray condition is not met and creating a formal version business process instance according to a formal version business process template which is recently released for the business process.
In yet another aspect, the present application further provides a server deployed with a workflow engine, the server comprising: at least one memory and at least one processor, wherein:
the memory is used for storing program codes for realizing the gray scale test method based on the workflow engine;
the processor is used for loading and executing the program codes stored in the memory to realize the gray scale test method based on the workflow engine.
In yet another aspect, the present application further provides a gray scale test system based on a workflow engine, the system comprising:
a server as described above; the method comprises the steps of,
and the at least one business terminal which can be in communication connection with the server is used for responding to the gray level issue configuration instruction aiming at the business process, obtaining corresponding business process configuration information and sending the business process configuration information to the server.
Based on the technical scheme, the application provides a gray level testing method, a device, a system and a server based on a workflow engine, the gray level testing method, the device and the system are used for configuring gray level conditions for gray level version testing for business processes, after any instance creation request for the business processes is obtained, whether the business process instance requested to be created meets the preset gray level conditions or not is determined according to preset business process configuration information and attribute information of an instance requester, so that the business process instance of the corresponding version (such as a gray level version or a latest published formal version) is created according to the business process template of the corresponding version, and the business process instance of the corresponding version can be created on the server.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present application, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an alternative embodiment of a workflow engine-based gray scale testing method according to the present application;
FIG. 2 is a flowchart of a second alternative embodiment of a gray scale testing method based on a workflow engine according to the present application;
FIG. 3 is a flowchart illustrating a third alternative embodiment of a gray scale testing method based on a workflow engine according to the present application;
FIG. 4 is a flowchart illustrating an alternative embodiment of a gray scale testing method based on a workflow engine according to the present application;
FIG. 5 is a schematic diagram of an alternative embodiment of a gray scale testing apparatus based on a workflow engine according to the present application;
FIG. 6 is a schematic hardware architecture of an alternative embodiment of a server suitable for the workflow engine-based gray scale test method of the present application;
Fig. 7 is a schematic structural diagram of an alternative embodiment of a workflow engine-based gray scale testing system according to the present application.
Detailed Description
Aiming at the description content of the background technology part, considering the complexity of the business process, certain problems may not be found in the test environment, gray level version verification is needed by a small part of clients in the production environment, and the range is enlarged after no problem is determined, so that the purpose of gray level test is achieved. However, considering that the workflow engine (i.e. the flow engine) does not deploy too many servers, the present application proposes to configure gray scale rules on the level of the workflow engine to determine whether the current request is a normal service or a gray scale service, i.e. to determine whether the current user is a gray scale user, and to determine that the business flow instance created by the current user is a gray scale version.
And then, the server where the workflow engine is located can determine to provide corresponding normal service or gray scale service for the current user according to the configured gray scale rule, so that gray scale release of a new version business process template is realized, servers which are used for realizing different services, such as a gray scale server supporting gray scale service, a process server supporting business process normal service and the like, are not required to be deployed, a gray scale test system and an implementation method are simplified, and gray scale release efficiency and reliability are improved.
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is to be understood that the embodiments described are merely some, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
For convenience in describing the technical solution of the present application, a flowchart may be used to illustrate operations performed by the server according to the embodiments of the present application. It should be understood that the operations before or after the flowchart are not necessarily performed in the exact order, and that the steps may be performed in reverse order or simultaneously, as desired. In addition, other operations may be added to or removed from these processes, and the present application is not described in detail by way of example.
Referring to fig. 1, a flowchart of a first alternative embodiment of a workflow engine-based gray scale testing method according to the present application may be suitable for a server deploying a workflow engine, and as shown in fig. 1, the method may include:
Step S11, obtaining an instance creation request for a business process; the instance creation request may be generated by invoking a business interface of the workflow engine and contains attribute information of the instance requester;
in practical application of the application, after a business process template of any business process is upgraded to obtain a new version of business process template, after running test under a test environment, all problems may not be found, and the business process template still needs to be migrated to a production environment for gray test, at this time, the new version of business process template can be determined to be a gray version business process template, a gray rule for indicating whether to create a business process instance of the business process according to the gray version business process template can be constructed, and business process configuration information such as a use validity period and a use mode of the gray rule can be configured to instruct a server how to process a business process instance creation request of an integrator from a workflow engine. The application does not limit the content of the business process configuration information and the construction and implementation method thereof, and can be determined according to the situation.
Based on the analysis, when the workflow engine integrating party invokes the business interface of the workflow engine to create the business process instance for a certain business process, the business process instance creation operation executed by the request creator of the integrating party can be used for sending the instance creation request for the business process to the server, and for the server, the instance creation request of different request creators for the same business process or different business processes can be received, and for resolving the business process instance creation requirement, the instance creation request can comprise attribute information of the request creator, such as a request creator identifier of a client id and the like, and can also comprise content, such as a process identifier of the business process and the like, so as to realize subsequent operations according to the operation.
Step S12, determining whether the service flow instance requested to be created meets a preset gray level condition according to preset service flow configuration information and attribute information of an instance requester;
the embodiment of the application can analyze the obtained instance creation request, determine the business process identifier of the business process instance to which the creation request belongs, the attribute information of the request creator and the like, and determine the business process configuration information corresponding to the business process identifier from the business process configuration information of each pre-configured business process, for example, determine the gray scale version in each version business process template aiming at the business process, and the gray scale conditions such as gray scale rule and the like of the gray scale version business process template are used for indicating whether the business process instance is created.
Therefore, the pre-configured gray condition of the application can be used for judging whether the service process is created by the request or the gray version of the service process template or the published formal version, thereby determining the version type of the created service process instance, and compared with the case creation by distributing the instance creation request to the server of the corresponding version type by a gateway layer according to the preset flow proportion or other strategies, the application is directly realized at the workflow engine level, thereby greatly reducing the occupation of the gray release to the server resources, avoiding the gray service from waiting for gateway distribution and flow transmission, reducing the efficiency to network resources and being beneficial to improving the gray test efficiency.
The specific implementation method of step S12 may be determined according to the content of the gray scale conditions, and reference may be made to, but not limited to, the following detailed description of the corresponding parts of the embodiments, which will not be described in detail herein.
Step S13, determining that gray scale conditions are met, and creating a gray scale version business process instance according to a predetermined gray scale version business process template aiming at the business process;
step S14, determining that gray conditions are not met, and creating a formal version business process instance according to a formal version business process template which is recently released for the business process.
And then, the analysis is carried out, the gray scale conditions are determined to be met according to the judging method, the gray scale version of the service flow instance is required to be created, so that gray scale test is realized, whether the service flow instance runs under the production environment or not is determined, and the normal running of the service flow created by the release of the new version service flow template after the test is passed under the production environment is ensured. Therefore, under the condition that the gray level condition is met, a business process instance is created according to the gray level version, and the business process instance is operated in the production environment of the server, so that gray level test is realized.
Otherwise, if the gray level condition is determined not to be met, the fact that the gray level version cannot be used by the current creation business process instance is indicated, and the business process template of the latest version which is currently released can be generally called, namely, the business process instance is created according to the business process template of the formal version which is recently released for the business process, and the business process creation requirement of an instance requester is met. Because the published business process templates of all versions are normal versions after gray level test according to the method, the created business process instance is ensured to normally run in the server production environment, so that the business processing requirements are reliable.
In summary, in the embodiment of the present application, when the service flow instance is created on the server deploying the workflow engine, the server directly determines whether a pre-configured gray condition is satisfied, and whether the gray condition is satisfied or not, the server creates the service flow instance of the corresponding version, without scheduling other servers to implement the service flow instance creation, thereby improving the service flow instance creation efficiency and avoiding the influence on the service flow instance creation reliability caused by the error in the scheduling process.
Referring to fig. 2, a flowchart of a second alternative embodiment of the workflow engine-based gray scale testing method according to the present application may describe an alternative refinement implementation of the workflow engine-based gray scale testing method, as shown in fig. 2, and the method may include:
step S21, obtaining an instance creation request for a business process; the instance creation request may be generated by invoking a business interface of the workflow engine and contains attribute information of the instance requester;
regarding the implementation process of step S21, reference may be made to the description of the corresponding parts of the above embodiment, such as the description of the corresponding parts of step S11, which is not repeated herein.
Step S22, determining whether preset business process configuration information contains gray scale rules configured for the business process in advance, if so, entering step S23; if not, executing step S25;
in combination with the above description of the technical solution of the present application in the embodiment, normal service (i.e. the service type of the service flow instance of the formal version is built according to the service flow template of the formal version) and gray scale service (i.e. the service type of the service flow instance of the gray scale version is built according to the service flow template of the gray scale version) need to be implemented on the workflow engine.
Therefore, after any instance creation request is obtained, after corresponding business process configuration information is determined, whether a gray rule is pre-configured or not can be determined, if the gray rule is not configured, a normal service creation business process instance can be directly and defaultively called, namely, the business process instance requested to be created is determined to not meet the pre-configured gray condition; on the contrary, in the case of further judging whether the instance requester is a gray user according to the gray rule content, that is, judging whether the service flow instance requested to be created is a gray version, the implementation method can be according to, but not limited to, the judgment implementation method described in the following steps.
Step S23, determining whether the instance requester belongs to a gray level user pre-configured for the business process according to the attribute information and the gray level rule; if so, the step S24 is performed; if not, executing step S25;
step S24, creating a gray version business process instance according to a predetermined gray version business process template for the business process;
step S25, a formal version business process instance is created according to a formal version business process template which is recently released for the business process.
And if the gray level user list is preset, comparing the attribute information of the instance requester with the attribute information of each gray level user in the gray level user list to determine whether the instance requester belongs to the gray level user, and the like, and the implementation process is not limited to the gray level user judgment implementation mode.
According to the judging method, determining that an instance requester requests to create a business process instance of a gray version, obtaining a predetermined gray version business process template for a corresponding business process, such as an upgrade version of the business process template, calling the business process template of the gray version, creating the business process instance of the gray version, and subsequently performing operation test under a production environment to determine whether the business process of the gray version is normal, thereby determining whether the business process template of the gray version is correct, and the test implementation process is not described in detail in the application; otherwise, determining that the instance requester requests to create the business process instance of the formal version, the latest published business process template of the formal version can be directly called, and the business process instance of the formal version is created, so that the used business process can be executed.
Therefore, in the embodiment of the application, before gray level testing is required to be performed on any business process, gray level versions of the business process are predetermined, namely gray level versions of business process templates of different versions, after a gray level rule for indicating whether a server calls a gray level version to create a business process instance is configured, after the server obtains any instance creation request for the business process, the business process template version for creating the business process instance can be determined directly according to the pre-configured gray level rule, thereby realizing creation of the business process instance.
Referring to fig. 3, a flowchart of a third alternative embodiment of the gray scale testing method based on a workflow engine according to the present application may further refine the implementation process of gray scale user determination in the second embodiment, as shown in fig. 3, and the method may include:
Step S31, obtaining an instance creation request for a business process; the instance creation request may be generated by invoking a business interface of the workflow engine and contains attribute information of the instance requester;
regarding the implementation process of step S31, reference may be made to the description of the corresponding parts of the above embodiment, such as the description of the corresponding parts of step S11, which is not repeated herein.
Step S32, determining a gray rule which is preset for the business process and included in the preset business process configuration information; the gray rule comprises a preset gray probability and a gray user list for indicating gray users aiming at the business process;
in the embodiment of the application, after determining that a version business process template for the business process is a gray scale version, such as a currently upgraded version and a version which is not released, gray scale rules can be configured according to the content of the dimension and the like of the business process, and the gray scale rules are configured according to the probability and/or the user list mode, so that the gray scale rules can include preset gray scale probability and/or the gray scale user list for indicating gray scale users for the business process, the preset gray scale probability can represent all instance creation requests for the business process obtained for a server, and according to the preset gray scale probability, which instance creation requests are instance creation requests sent by gray scale users are determined from the instance creation requests, namely, corresponding instance requesters are gray scale users.
The gray level user list includes gray level users that may be determined by a manager or may be determined in other manners, and the present application does not limit the gray level user determination method and the manner of representing the gray level user list, as the case may be.
Optionally, for the preset gray level probability and/or the number of gray level users included in the gray level user list, which are configured in advance, the number may be increased along with the increase of the gray level test duration, for example, according to a preset step length or a rule increase, so as to obtain an updated gray level rule, and then, according to the updated gray level rule, determine whether the instance requester belongs to the gray level user, thereby realizing a better gray level test effect, but not limited to the method for dynamically updating the gray level rule described in the embodiment.
Step S33, determining that the instance requester belongs to a gray level user pre-configured for the business process according to attribute information of the instance requester, a gray level user list and a preset gray level probability;
continuing the analysis, for the gray rule of the content described in step S32, the attribute information of the current instance requester may be compared with the attribute information of each gray user in the gray user list to determine whether the instance requester is located in the gray user list, and if not, it is directly determined that the preset gray condition is not satisfied; on the contrary, after determining that the instance requester is located in the gray level user list, it can be further determined whether the instance requester belongs to a client within a preset gray level probability, if so, it is determined that the instance requester belongs to a gray level user, that is, a preset gray level condition is satisfied; if not, it may be determined that the instance requester does not belong to a gray user and that the pre-configured gray condition is not satisfied.
The clients within the preset gray probability may be clients selected from the instance requesters of all the instance creation requests obtained from the server according to the preset gray probability, for example, 30% of gray users are initially selected from all the instance requesters, and 50% of gray users may be selected to participate in the gray test with the increase of the gray test time, so as to improve the gray test effect, but the present invention is not limited to the preset gray probability value described in the present embodiment.
In some embodiments, the preconfigured gray rule may also only include the preset gray probability, and in a corresponding scenario, whether the instance requester belongs to a gray user preconfigured for the service flow may be determined according to the preset gray probability, that is, after determining a client in the preset gray probability, whether the instance requester belongs to any client in the preset gray probability may be determined, if yes, the instance requester may be considered to belong to the gray user; conversely, the instance requestor may be considered not to belong to a gray user.
In other embodiments, the preconfigured greyscale rule may also include only the above greyscale user list, so that it may be determined whether the instance requester belongs to a greyscale user preconfigured for the service flow according to the attribute information and the greyscale user list, and in combination with the analysis, it is determined that the instance requester belongs to one of the greyscale users in the greyscale user list, and it is determined that the greyscale condition is satisfied, where the instance requester belongs to the greyscale user preconfigured for the service flow; conversely, it may be determined that the instance requestor does not belong to a gray user pre-configured for the business process.
The application will not be described in detail in the process of implementing the judgment of the gray rule of the two contents, but only the scene including the preset gray probability and the gray rule of the gray user list will be described as an example. Based on the above analysis, according to the attribute information, the gray level user list and the preset gray level probability, it is determined that the instance requester does not belong to the gray level user configured for the service flow, it is determined that the service flow instance requested to be created does not meet the preset gray level condition, and the formal version service flow instance can be created according to the formal version service flow template recently issued for the service flow, and the implementation process can refer to the description of the corresponding part of the above embodiment, which is not described in detail herein.
It should be noted that, for the content for determining whether the instance requester belongs to the gray scale rule of the gray scale user preconfigured for the business process, besides the preset gray scale probability and the gray scale user list described above, other content may be included, that is, whether the instance requester belongs to the gray scale user is determined in other manners, and the application is not described in detail by way of example.
Step S34, a predetermined gray version business process template for the business process is obtained;
The determining manner of the business process template of the gray version may be according to the description content of the corresponding portion, which is not described in detail in this embodiment.
Step S35, creating a gray version business process instance according to the gray version business process template;
in the above analysis, under the condition of determining the gray level version of the business process, the corresponding gray level rule, that is, the gray level user list and the preset gray level probability for determining the gray level user capable of creating the gray level version, can be configured, so that after any instance creation request for the business process is obtained, the workflow engine level can be directly operated, and according to the gray level user list and the preset gray level probability, whether the current instance requester belongs to the gray level user of the gray level version can be quickly and accurately determined, and then, the business process instance of the corresponding version can be directly created according to the business process template of the corresponding version, and business process instances of different versions are created without scheduling different servers, thereby simplifying the processing steps and improving the creation efficiency and reliability of the business process instance.
Step S36, controlling the operation of the business process instance in the server production environment, and detecting the corresponding operation information;
Step S37, according to the operation information, determining that the gray version business process instance has operation abnormality, and outputting corresponding abnormality indication information.
For the gray test method based on the workflow engine described in each embodiment, after the business process instance is created, the business process instance can be deployed in a server production environment to operate, a process instance monitoring module can be called to monitor the operation condition of the gray version business process instance, namely, the operation information of the gray version business process instance operating in the server production environment is detected, then, whether the gray version business process instance has operation abnormality or not can be determined according to the operation information, if the operation abnormality exists, corresponding abnormality prompt information, such as content including the related content of the gray version business process instance and the operation abnormality thereof, can be timely sent to a terminal device of a preset manager, prompt the manager to timely process, and ensure the gray test efficiency.
Optionally, the abnormal prompt information may be output through one or more modes such as a short message, a mail, a voice, etc., and the present application does not limit the content and the output mode thereof, and may be determined according to circumstances. After the business process template of the gray version is adjusted according to the abnormal prompt information, a new business process instance of the gray version can be created according to the adjusted business process template, and then the operation test is carried out according to the method. In other embodiments, the service flow instance of the gray version can be re-created according to the method, the operation test is performed again in the production environment to determine whether the operation is abnormal, the operation is abnormal after the repeated test for a preset number of times, and the service flow template of the gray version is adjusted according to the method.
In combination with the gray level test method based on the workflow engine described in the above embodiments, in practical application, after a customer upgrades a version of a business process template according to business needs, a new version of the business process template created for a business process is obtained, and then the new version of the business process template is deployed under a test environment for running test, but due to complexity of the business process, some problems may not be found, therefore, after determining that the new version of the business process template passes the test executed under the test environment, the new version of the business process template can be determined as a gray level version of the business process template, and then deployed under a production environment of a server, that is, the new version of the business process template is migrated to the production environment for gray level test.
Then, in order to support normal service and gray service directly on the workflow engine level, gray release rules for gray version business process templates can be determined, gray rules for corresponding business processes are configured according to the gray release rules, and the gray rules can be used for indicating whether the gray version business process templates are indicated and creating business process instances for the business processes in combination with descriptions of corresponding parts of the above embodiments.
Therefore, when any user invokes the business interface of the workflow engine to create the business process instance, whether the user is the gray user of the business process can be judged according to the gray rule, and then no matter what the judging result is, the business process instance of the corresponding version can be directly created according to the business process template of the version corresponding to the judging result, so that the instance creation efficiency is improved.
Referring to fig. 4, a flow diagram of a fourth alternative embodiment of a gray scale testing method based on a workflow engine according to the present application may describe an operation testing process of a gray scale version business flow instance in a production environment, and with respect to a creating implementation process of the gray scale version business flow instance, reference may be made to the description of the corresponding portion of the above embodiment, which is not repeated herein. As shown in fig. 4, the method may include:
step S41, monitoring operation information of the gray version service flow instance in the server production environment;
step S42, determining whether the switching condition for the gray version business process template is met according to the operation information; if yes, go to step S43; if not, returning to the step S41, and continuing to carry out gray level test on the gray level version business process instance;
And S43, switching the gray version business process template into a formal version business process template, releasing the formal version business process template, and disabling the corresponding gray rule.
In practical application, the service flow instance of the gray version does not always run, and corresponding switching conditions can be pre-configured to avoid resource waste, so that whether the switching conditions are met or not can be determined according to the running condition of the service flow instance of the gray version in a production environment, if so, the service flow instance of the gray version can be directly switched to a formal version for release, and meanwhile, corresponding gray rules can be disabled, gray user judgment is not performed by using the gray rules subsequently, and occupation of resources by invalid tests is avoided.
Optionally, for the above switching condition, whether to switch the business process instance of the gray scale version into the official version for release may be determined by configuring the effective time of the gray scale rule, where the effective time may be included in the business process configuration information. In this way, the gray scale test time, which may be the cumulative duration, of the gray scale version business process instance running in the server production environment may be detected.
And then, determining whether the gray test time reaches the effective time configured for the gray rule, if so, switching the gray version business process template into a formal version business process template and then issuing the formal version business process template, and controlling the gray rule to be in an invalid state so as to prohibit the gray version business process template from being invoked. If the effective time of the gray rule is not reached, the gray rule can be controlled to be in an effective state so as to continuously carry out gray test on the gray version business process instance.
Based on the method, after the gray rule is configured, the time for gray validation and the failure time point can be designated, and the effective time range of the gray rule is obtained, so that in the gray test process, the gray version business process instance can be canceled or the gray version business process template is released as a new business process template version, namely a formal version business process template, and the gray test duration can be controlled through the preconfigured effective time on the basis of meeting the gray test requirement, thereby avoiding the resource waste caused by running the gray version all the time.
Optionally, in combination with the analysis, the switching of the release of the gray-scale version business process template into the formal version may be implemented by a pre-registered timing event, that is, when the gray-scale test time reaches the gray-scale time, the timing event is triggered, and the gray-scale version switching step is performed, which is not limited to this implementation method.
Referring to fig. 5, a schematic structural diagram of an alternative embodiment of a gray scale testing apparatus based on a workflow engine according to the present application, as shown in fig. 5, may include:
an instance creation request obtaining module 51, configured to obtain an instance creation request for a business process; the instance creation request is generated by calling a business interface of the workflow engine and contains attribute information of an instance requester;
a first determining module 52, configured to determine, according to preset service flow configuration information and the attribute information, whether a service flow instance requested to be created meets a preset gray-scale condition;
a first creating module 53, configured to determine that the gray scale condition is satisfied, and create a gray scale version business process instance according to a predetermined gray scale version business process template for the business process;
the second creating module 54 is configured to determine that the gray-scale condition is not satisfied, and create a formal version business process instance according to a formal version business process template that is currently published for the business process.
Optionally, the first determining module 52 may include:
a first determining unit, configured to determine whether the service flow configuration information includes a gray rule configured in advance for the service flow;
A second determining unit, configured to determine that the service flow instance requested to be created does not satisfy the pre-configured gray scale condition, if the defect result of the first determining unit is that the gray scale rule is not included;
a third determining unit, configured to determine, when the defect result of the first determining unit is that the gray rule is included, whether the instance requester belongs to a gray user configured in advance for the service flow according to the attribute information and the gray rule;
a fourth determining unit, configured to determine that the service flow instance requested to be created satisfies a pre-configured gray scale condition when the determination result of the third determining unit is that the service flow instance belongs to the gray scale user;
and a fifth determining unit, configured to determine that the service flow instance requested to be created does not satisfy the pre-configured gray scale condition, if the determination result of the third determining unit is that the service flow instance does not belong to the gray scale user.
Optionally, the gray scale rule may be configured after determining a gray scale version business process template for the business process, and includes a preset gray scale probability and/or a gray scale user list for indicating gray scale users for the business process; the preset gray scale probability and the gray scale user list can be increased along with the increase of the gray scale test duration.
Based on this, the above-described third determination unit may include any one of the following determination subunits:
a first determining subunit, configured to determine, according to the preset gray probability, whether the instance requester belongs to a gray user configured in advance for the service flow;
a second determining subunit, configured to determine, according to the attribute information and the gray level user list, whether the instance requester belongs to a gray level user configured in advance for the service flow;
and the third determining subunit is configured to determine, according to the attribute information, the gray level user list and the preset gray level probability, whether the instance requester belongs to a gray level user configured in advance for the service flow.
In some embodiments, in combination with the analysis, the apparatus may further comprise:
the first detection module is used for detecting operation information of the gray version service flow instance in the server production environment;
the second determining module is used for determining that the gray version business process instance has abnormal operation according to the operation information;
and the output module is used for outputting corresponding abnormality indication information.
Optionally, in each embodiment, the configuration module for presetting the service flow configuration information may include:
The business process template obtaining module is used for obtaining a business process template of a new version established for the business process;
the deployment module is used for determining that the test executed by the new version of business process template in the test environment is passed, determining the new version of business process template as a gray version business process template, and deploying the gray version business process template in the production environment of the server;
the configuration module is used for configuring gray rules for corresponding business processes according to gray release rules for the gray version business process templates, wherein the gray rules are used for indicating whether to create business process instances for the business processes according to the gray version business process templates.
In still other embodiments, the apparatus may further include:
the second detection module is used for detecting the operation information of the gray version service flow instance in the server production environment;
the third determining module is used for determining whether the switching condition of the gray version business process template is met according to the operation information;
and the switching control module is used for switching the gray scale version business process template into a formal version business process template and then issuing the gray scale rule when the determined result of the third determining module is that the switching condition is met.
Optionally, in a case where the operation information includes a gray scale test time, and the business process configuration information includes a valid time configured for the gray scale rule, the third determining module may include:
a sixth determining unit, configured to determine whether the gray scale test time reaches the valid time, and if so, trigger a switching control module to switch the gray scale version business process template to a formal version business process template and issue the gray scale rule, and control the gray scale rule to be in an invalid state so as to prohibit calling the gray scale version business process template;
and the control unit is used for controlling the gray rule to be in an effective state so as to be capable of continuously carrying out gray test on the gray version business process instance under the condition that the determination result of the sixth determination unit is that the effective time is not reached.
It should be noted that, regarding the various modules, units, and the like in the foregoing embodiments of the apparatus, the various modules and units may be stored as program modules in a memory of a server that deploys a workflow engine, the foregoing program modules stored in the memory may be executed by a processor to implement corresponding functions, or may be implemented by the combination of the program modules and hardware, and regarding the functions implemented by each program module and the combination thereof, and the achieved technical effects, the processing procedure described on the server side of the production environment of the foregoing embodiments may be referred to, which will not be described in detail in this embodiment.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, the computer program is loaded and executed by processors of different devices in the system, each step of the workflow engine-based gray scale test method provided by the application is implemented, and the specific implementation process can refer to the description of the corresponding parts of the above embodiment, so that the description of the embodiment is omitted.
Referring to fig. 6, a hardware architecture diagram of an alternative embodiment of a server suitable for the gray scale test method based on a workflow engine according to the present application, where the workflow engine is deployed, the implementation of the deployment and the architecture thereof will not be described in detail, and as shown in fig. 6, the server may include at least one memory 61 and at least one processor 62, where:
the at least one memory 61 and the at least one processor 62 may be connected by a bus or other communication means for data transmission between each other, the application being illustrated by way of example only in connection with fig. 6. The buses may include address buses, data buses, control buses, etc., which are not shown in fig. 6, and may be determined according to actual requirements, and the present application is not described in detail.
The memory 61 may be used to store program codes for implementing the workflow engine-based gray scale test method proposed by the embodiment of the present application; the processor 62 may be configured to load and execute the program code stored in the memory 61 to implement the workflow engine-based gray scale test method described in the embodiments of the present application, and the implementation process may be referred to above in the description of the corresponding embodiments.
In embodiments of the present application, memory 61 may comprise high-speed random access memory, and may also comprise non-volatile memory, such as at least one magnetic disk storage device or other volatile solid-state storage device. The processor 62 may be a central processing unit (Central Processing Unit, CPU), application-specific integrated circuit (ASIC), digital Signal Processor (DSP), application-specific integrated circuit (ASIC), off-the-shelf programmable gate array (FPGA), or other programmable logic device, etc. The structure and the model of the memory 61 and the processor 62 are not limited, and can be flexibly adjusted according to actual requirements.
In practical applications, in order to realize the communication connection between the server and other devices, such as a service terminal, a database, or other servers, the server may further include a wireless communication module capable of implementing data interaction by using a wireless communication network, such as a WIFI module, a 5G/6G (fifth generation mobile communication network/sixth generation mobile communication network) module, a GPRS module, and the like; or a wired communication module, etc., the application does not limit the communication modes among different devices, and the application can be determined according to the situation. It should be understood that, in order to implement communication between different components in the server, a communication interface such as a USB interface, a serial/parallel interface, etc. may be further included, which is not described in detail in the present application.
It should be understood that the structure of the server shown in fig. 6 is not limited to the server in the embodiment of the present application, and in practical application, the server may include more components than those shown in fig. 6, or some components may be combined, which is not specifically recited herein.
Referring to fig. 7, a schematic structural diagram of an alternative embodiment of a workflow engine-based gray scale testing system according to the present application may include a server 71 and at least one service terminal 72, and the composition of the server 71 may be described with reference to the above server embodiment, which is not described in detail herein.
The service terminal 72 can be in communication connection with the server, and can respond to the gray level issue configuration instruction for the service process to obtain corresponding service process configuration information, and send the service process configuration information to the server 71, so that the server 71 can execute the gray level test method based on the workflow engine provided by the application, and the implementation process of the embodiment is not described in detail.
Alternatively, the service terminal 72 may include, but is not limited to, a smart phone, a tablet computer, a personal computer (personal computer, PC), a netbook, an augmented Reality (Augmented Reality, AR) device, a Virtual Reality (VR) device, a robot, a smart medical device, a smart transportation device, a desktop computer, etc., and the electronic device shown in fig. 7 is merely an example and should not be construed as limiting the functionality and the scope of use of the embodiments of the present application.
It should be understood that the configuration of the workflow engine-based gray scale test system shown in fig. 7 does not constitute a limitation of the workflow engine-based gray scale test system according to the embodiment of the present application, and in practical application, the system may include more components than those shown in fig. 7, or some components may be combined, such as a monitoring device, a database server, etc., which are not listed herein.
It should be noted that, the gray scale test method, device, system and server based on the workflow engine described in the above embodiments of the present application may be applied to the financial field, the cloud computing field, the internet of things field or other communication fields, and the above is merely an example, and the gray scale test method, device, system and application field of the server based on the workflow engine provided by the present application are not limited.
In addition, as used in this disclosure, a "system," "apparatus," "unit," and/or "module" is one way to distinguish between different components, elements, parts, portions, or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions. As used herein, the terms "a," "an," "the," and/or "the" are not specific to the singular, but may include the plural, unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" merely indicate that the steps and elements are explicitly identified, and they do not constitute an exclusive list, as other steps or elements may be included in a method or apparatus. The inclusion of an element defined by the phrase "comprising one … …" does not exclude the presence of additional identical elements in a process, method, article, or apparatus that comprises an element.
Also, in the description of the embodiments of the present application, unless otherwise indicated, "/" means or, for example, a/B may represent a or B; "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. The terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
In addition, various embodiments in the present specification are described in a progressive or parallel manner, and each embodiment is mainly described as different from other embodiments, and identical and similar parts between the various embodiments are mutually referred. For the device, the system and the server disclosed in the embodiments, the description is relatively simple because the device, the system and the server correspond to the methods disclosed in the embodiments, and the relevant parts refer to the description of the method.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the particular solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for gray scale testing based on a workflow engine, the method comprising:
obtaining an instance creation request for a business process; the instance creation request is generated by calling a business interface of the workflow engine and contains attribute information of an instance requester;
determining whether a business process instance requested to be created meets a preset gray scale condition according to preset business process configuration information and the attribute information;
determining that the gray scale condition is met, and creating a gray scale version business process instance according to a predetermined gray scale version business process template aiming at the business process;
And determining that the gray condition is not met, and creating a formal version business process instance according to a formal version business process template which is recently released for the business process.
2. The method according to claim 1, wherein determining whether the service flow instance requested to be created satisfies a pre-configured gray scale condition according to the pre-set service flow configuration information and the attribute information comprises:
determining whether the business process configuration information contains gray scale rules configured for the business process in advance;
if the gray scale rule is not included, determining that the service flow instance requested to be created does not meet the preset gray scale condition;
if the gray scale rule is included, determining whether the instance requester belongs to a gray scale user preconfigured for the business process according to the attribute information and the gray scale rule;
if the service flow instance belongs to the gray level user, determining that the service flow instance requested to be created meets a preset gray level condition;
and if the service flow instance does not belong to the gray level user, determining that the service flow instance requested to be created does not meet the preset gray level condition.
3. The method according to claim 2, wherein the greyscale rules are configured after determining a greyscale version business process template for the business process, comprising a pre-set greyscale probability and/or greyscale user list for indicating greyscale users for the business process; wherein the preset gray probability and the gray user list can be increased along with the increase of the gray test duration;
The determining whether the instance requester belongs to a gray level user preconfigured for the business process according to the attribute information and the gray level rule includes any implementation manner as follows:
determining whether the instance requester belongs to a gray level user pre-configured for the business process according to the preset gray level probability;
determining whether the instance requester belongs to a gray level user preconfigured for the business process according to the attribute information and the gray level user list;
and determining whether the instance requester belongs to a gray level user preconfigured for the business process according to the attribute information, the gray level user list and the preset gray level probability.
4. A method according to any one of claims 1-3, wherein the method further comprises:
detecting operation information of the gray version service flow instance in the server production environment;
and determining that the gray version business process instance has operation abnormality according to the operation information, and outputting corresponding abnormality indication information.
5. A method according to claim 2 or 3, wherein the method for presetting the service flow configuration information comprises:
Obtaining a new version of business process template established for the business process;
determining that the test executed by the new version business process template in the test environment is passed, determining the new version business process template as a gray version business process template, and deploying the gray version business process template in the production environment of the server;
and configuring a gray rule for a corresponding business process according to a gray release rule for the gray version business process template, wherein the gray rule is used for indicating whether to establish a business process instance for the business process according to the gray version business process template.
6. The method of claim 5, wherein the method further comprises:
detecting operation information of the gray version service flow instance in the server production environment;
determining whether a switching condition for the gray version business process template is met according to the operation information;
and if the switching condition is met, switching the gray scale version business process template into a formal version business process template, then issuing the formal version business process template, and disabling the gray scale rule.
7. The method of claim 6, wherein the run information includes a gray scale test time, and wherein the business process configuration information includes a valid time configured for the gray scale rule;
And determining whether the switching condition for the gray version business process template is met according to the operation information, wherein the determining comprises the following steps:
determining whether the gray test time reaches the valid time;
if the effective time is reached, executing the steps of switching the gray version business process template into a formal version business process template, then issuing the gray version business process template, and controlling the gray rule to be in an invalid state so as to prohibit calling the gray version business process template;
and if the effective time is not reached, controlling the gray rule to be in an effective state so as to continuously carry out gray test on the gray version business process instance.
8. A workflow engine-based gray scale testing apparatus, the apparatus comprising:
an instance creation request obtaining module, configured to obtain an instance creation request for a business process; the instance creation request is generated by calling a business interface of the workflow engine and contains attribute information of an instance requester;
the first determining module is used for determining whether the service flow instance requested to be created meets the preset gray level condition according to the preset service flow configuration information and the attribute information;
The first creating module is used for determining that the gray scale condition is met and creating a gray scale version business process instance according to a predetermined gray scale version business process template aiming at the business process;
and the second creation module is used for determining that the gray condition is not met and creating a formal version business process instance according to a formal version business process template which is recently released for the business process.
9. A server, wherein the server is deployed with a workflow engine, the server comprising: at least one memory and at least one processor, wherein:
the memory for storing program code implementing the workflow engine-based gray scale test method of any one of claims 1-7;
the processor is configured to load and execute the program code stored in the memory, and implement the workflow engine-based gray scale test method according to any one of claims 1-7.
10. A workflow engine-based gray scale testing system, the system comprising:
the server of claim 9; the method comprises the steps of,
and the at least one business terminal which can be in communication connection with the server is used for responding to the gray level issue configuration instruction aiming at the business process, obtaining corresponding business process configuration information and sending the business process configuration information to the server.
CN202311119852.8A 2023-08-31 2023-08-31 Gray scale test method, device and system based on workflow engine and server Pending CN117076325A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311119852.8A CN117076325A (en) 2023-08-31 2023-08-31 Gray scale test method, device and system based on workflow engine and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311119852.8A CN117076325A (en) 2023-08-31 2023-08-31 Gray scale test method, device and system based on workflow engine and server

Publications (1)

Publication Number Publication Date
CN117076325A true CN117076325A (en) 2023-11-17

Family

ID=88717007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311119852.8A Pending CN117076325A (en) 2023-08-31 2023-08-31 Gray scale test method, device and system based on workflow engine and server

Country Status (1)

Country Link
CN (1) CN117076325A (en)

Similar Documents

Publication Publication Date Title
CN110191063B (en) Service request processing method, device, equipment and storage medium
CN110289983B (en) Load balancing application creation method and device, computer equipment and storage medium
CN112333096A (en) Micro-service traffic scheduling method and related components
CN110532025B (en) Data processing method, device and equipment based on micro-service architecture and storage medium
CN112433863A (en) Micro-service calling method and device, terminal equipment and storage medium
CN110673933A (en) ZooKeeper-based distributed asynchronous queue implementation method, device, equipment and medium
US11656902B2 (en) Distributed container image construction scheduling system and method
CN115757611A (en) Big data cluster switching method and device, electronic equipment and storage medium
CN113076248B (en) Application processing method, device and equipment and readable storage medium
CN112925648B (en) Business strategy issuing method and device
CN111970162B (en) Heterogeneous GIS platform service central control system under super-integration framework
US10176059B2 (en) Managing server processes with proxy files
CN113191889A (en) Wind control configuration method, configuration system, electronic device and readable storage medium
CN111090442B (en) Application updating method, device and storage medium
CN109992298B (en) Examination and approval platform expansion method and device, examination and approval platform and readable storage medium
CN112256989A (en) Page loading method and device based on offline package, terminal equipment and storage medium
CN114610446B (en) Method, device and system for automatically injecting probe
CN117076325A (en) Gray scale test method, device and system based on workflow engine and server
CN115225645A (en) Service updating method, device, system and storage medium
CN113472638B (en) Edge gateway control method, system, device, electronic equipment and storage medium
US20220276901A1 (en) Batch processing management
CN112667491B (en) Function test method and device for virtual machine
CN113326052A (en) Method and device for upgrading service component, computer equipment and storage medium
CN113590178A (en) API (application program interface) instance management method and device, storage medium and electronic equipment
CN114968505A (en) Task processing system, method, device, apparatus, storage medium, and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination