CN115099765A - Service processing method, device, equipment and storage medium - Google Patents

Service processing method, device, equipment and storage medium Download PDF

Info

Publication number
CN115099765A
CN115099765A CN202210469092.2A CN202210469092A CN115099765A CN 115099765 A CN115099765 A CN 115099765A CN 202210469092 A CN202210469092 A CN 202210469092A CN 115099765 A CN115099765 A CN 115099765A
Authority
CN
China
Prior art keywords
node
flow
service
processing
process node
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
CN202210469092.2A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210469092.2A priority Critical patent/CN115099765A/en
Publication of CN115099765A publication Critical patent/CN115099765A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Engineering & Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Operations Research (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Data Mining & Analysis (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a service processing method, a device, equipment and a storage medium. The method is applied to workflow technology, and comprises the following steps: receiving a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data; the flow node corresponding to the user is a first flow node; the target page is a page developed based on a P2 framework and a micro service; processing the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure; if the first service processing result is successful, calling a preset process engine to transfer the first process node to a second process node; the second process node is the next process node of the first process node; the preset process engine is used for circulation among the process nodes. The method improves the development efficiency of the development business related to the workflow.

Description

Service processing method, device, equipment and storage medium
Technical Field
The present application relates to workflow processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for processing a service.
Background
In the development service of a business management system of OFFICE AUTOMATION (OA) or some flow processes, a development service related to a workflow is often involved.
At present, development services related to workflow are mainly realized by adopting single application development, that is, all functions are packaged in an independent unit, and all functions are tightly coupled and can be operated as a single service. If one of the functions of the application encounters a peak in demand, the architecture of the entire application needs to be expanded. The code in the code library will grow and the addition or improvement of the functionality of the individual applications becomes more complex. But also some of these closely coupled functions can extend the impact of a single functional failure, thereby increasing the risk of application availability.
In conclusion, the single application development mode makes the development efficiency of development services related to the workflow lower.
Disclosure of Invention
The application provides a service processing method, a service processing device, service processing equipment and a storage medium, which are used for solving the problem of low development efficiency of development services related to workflow.
In a first aspect, the present application provides a service processing method, including: receiving a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data; the process node corresponding to the user is a first process node; the target page is a page developed based on a P2 framework and a micro service; processing the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure; if the first service processing result is successful, calling a preset process engine to transfer the first process node to a second process node; the second process node is a next process node of the first process node; the preset process engine is used for circulation among the process nodes.
In a second aspect, the present application provides a service processing apparatus, including: the receiving module is used for receiving a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data; the process node corresponding to the user is a first process node; the target page is a page developed based on a P2 framework and a micro service; the processing module is used for processing the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure; the circulation module is used for executing the following steps: if the first service processing result is successful, calling a preset process engine to transfer the first process node to a second process node; the second process node is a next process node of the first process node; the preset process engine is used for circulation among the process nodes.
In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively coupled to the processor; the memory stores computer-executable instructions; the processor executes computer-executable instructions stored by the memory to implement the method of the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon computer-executable instructions for performing the method of the first aspect when executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the method of the first aspect.
The service processing method, the device, the equipment and the storage medium provided by the application receive a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data; the process node corresponding to the user is a first process node; the target page is a page developed based on a P2 frame and a micro service; processing the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure; if the first service processing result is successful, calling a preset process engine to transfer the first process node to a second process node; the second process node is a next process node of the first process node; the preset process engine is used for circulation among the process nodes. Because the target page is a page developed based on a P2 framework and the micro service, and if the first service processing result is successful, a preset process engine is called to transfer the first process node to a second process node, and the second process node is a next process node of the first process node, the micro service based on the springBoot framework can be realized in an OA or some process processing service management system projects, related services are developed aiming at the workflow, and each function module is developed independently, so that the development efficiency is improved, and the micro service flow is realized in the micro service through the process engine, so that the micro service flow based on the springBoot framework is realized and is applied to the workflow development related services.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic diagram of a single application provided in an embodiment of the present application;
fig. 2 is a schematic architecture diagram of a service processing platform according to an embodiment of the present application;
fig. 3 is a first flowchart of a service processing method according to an embodiment of the present application;
fig. 4 is a second flowchart of a service processing method according to an embodiment of the present application;
fig. 5 is a third flowchart of a service processing method according to an embodiment of the present application;
fig. 6 is an interaction diagram of a service processing method according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a service processing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Specific embodiments of the present application have been shown by way of example in the drawings and will be described in more detail below. These drawings and written description are not intended to limit the scope of the inventive concepts in any manner, but rather to illustrate the inventive concepts to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
Interpretation of terms:
the monomer application: an archive package (which may be JAR, WAR, EAR, or other archive format) contains all functional applications.
A frame: the framework is a semi-finished product, basic codes are packaged and corresponding APIs are provided, and developers can directly call the packaged APIs when using the framework, so that a lot of code writing can be omitted, and the working efficiency and the development speed are improved.
P2 framework: a framework for shielding the difference between request equipment and a protocol, uniformly encapsulating request data of different channels and calling a back-end service transaction interface to process system service is realized through js and jquery technologies.
P8 framework: a back-end framework for real-time processing service realized based on J2EE technology, P8 framework is a popular lightweight service flow engine developed by adopting Java, and is developed based on an activity5.0 branch.
http message: when a client requests a webpage, a P2 framework encapsulates the requested content in the http request message through an http protocol, and a server P8 framework analyzes the message according to protocol specifications after receiving the request message and then returns a response message to the client.
Trading: the concept of managing the backend interface from the trading line dimension is faced at the data management layer.
A flow engine: and the tool is used for driving the business to be circulated according to the set fixed flow.
WFE: the self-developed Java workflow, the WFE is encapsulated in the P8 framework under the ITM cloud.
Transaction: a transaction is a series of rigorous operations in an application that must all be completed successfully, otherwise all changes made in each operation are undone. That is, a transaction is atomic, and a series of operations in a transaction are either all successful or none.
Micro-service: is a cloud-native architecture approach in which a single application is composed of many loosely-coupled and independently deployable smaller components or services.
twice: two-phase commit.
brofreAction: a two-phase submission pre-processing process.
an afterAction: a two-phase commit post-processing procedure.
wfecutil: a tool class package for the process engine.
Office automation is a process that automatically monitors data flow without manual intervention and error. This process uses automated tools to create, collect, store, analyze, and share confidential data necessary to efficiently accomplish everyday tasks and processes. In an office automation scenario, flow between nodes is often faced. For example, for a leave asking scene, in an initial state, the process node is located at a user a to be asked, when the user a fills a leave asking strip and submits an approval request of the request, the process node is transferred to the user B, when the user B finishes approval, if no others need to approve, the approval result is returned to the user a, and if others need to approve, the process node continues to be transferred.
Workflow-related development services are often involved in the development services of business management systems for OFFICE AUTOMATION (OA) or some process. At present, the development service related to the workflow is mainly realized by adopting single application development, that is, all functions are packed in an independent unit, and all functions are tightly coupled and can be operated as a single service.
Fig. 1 is a schematic diagram of a single application provided in the embodiment of the present application. As shown in fig. 1, the single application includes a function module 1, a function module 2, and a function module 3, and the 3 function modules correspond to an archive package in the database. I.e. the archive package is used to implement the 3 functions.
Because of the single archive package file, the entire project file includes a large number of functions, resulting in unclear boundaries and dependencies between modules. Therefore, when the code is changed, if a simple function is added or a BUG is modified, hidden defects can be caused. And the single application can only be expanded as a whole, and cannot be expanded independently according to the service requirement.
In view of the above technical problems, the inventors of the present application found that: the micro service is used as a method for accelerating the development process of the web and the mobile application program, and each functional module can be split, independently developed and deployed. Then, the business requirements are pertinently and quickly confirmed, and iteration is quickly developed. Therefore, each function module can be independently developed based on the microservice realized by the spring boot framework, and a single microservice is developed. And an external process engine tool is adopted to realize the process circulation function.
The following describes the technical solutions of the present application and how to solve the above technical problems with specific examples. The following specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic architecture diagram of a service processing platform according to an embodiment of the present application. As shown in fig. 2, the service processing platform includes: p2 front end 21, P8 back end 22, microservice front end 23, and microservice back end 24;
the P2 front end 21 comprises a plurality of P2 front end function modules developed based on a P2 framework, a uniform entrance for application program login can be provided through some P2 front end function modules, and function modules of the microservice front end are called to realize functions.
The P8 WFE function module 22 is used to provide a flow engine, and is responsible for processing flow jumps and transaction information.
The microservice front-end 23 includes a plurality of microservice front-end function modules developed based on microservice, and the microservice front-end function modules can provide business function front-end display, user operation, and the like.
The microservice backend 24 includes a plurality of microservice backend functional modules developed based on microservices, and the microservice backend functional modules can provide backend logic processing of business functions and processing of adding, deleting, modifying, checking and the like of business information.
Illustratively, the P2 front-end function module may be understood as each menu in the menu interface of the application program, and the microservice front-end function module may be understood as a specific implementation of the function for each menu.
Taking an office scene as an example, the P2 front-end function module, the P8 WFE function module, the micro service front-end function module and the micro service back-end function module are modules for implementing the leave-asking function. When the user clicks the button corresponding to the P2 front-end function module through the terminal device, the P2 front-end function module calls the micro service front-end function module corresponding to the leave asking function to call a leave asking page, which may include leave asking information to be filled in by the user, a save button, and a submit button. The user can click the save button to save the leave information by filling the leave information in the leave page, or click the submit button to submit the leave information to the approver. The micro-service back-end function module corresponding to the leave-asking function is used for storing leave-asking information, and the P8 WFE function module corresponding to the leave-asking function is used for submitting the leave-asking information to an approver.
Based on the service processing platform, fig. 3 is a first flowchart of a service processing method provided in the embodiment of the present application. As shown in fig. 3, the service processing method includes the following steps:
s301, receiving a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data, the flow node corresponding to the user is a first flow node, and the target page is a page developed based on a P2 framework and the micro service.
The execution subject of the method of this embodiment may be the service processing platform shown in fig. 1.
In this embodiment, the first process node may be a process node corresponding to a common employee or administrator in the organization architecture, and the first process node corresponds to a next process node, that is, a second process node. Wherein, common employees and managers can be called users. It can also be understood that the first flow node is a flow node corresponding to an initiator of the service processing request.
The first service data may be service data to be operated, which is input by a user through the terminal device. In the leave-asking scene, the first service data may be leave-asking information filled by the user a, and the first process node is a node corresponding to the user a; in a report approval scene, the first service data may be report data filled by the user a, and the first process node is a node corresponding to the user a; in a group office organization, various files reported by each branch organization need to be collected regularly or irregularly, then are stored in a grading mode and are respectively reported to relevant personnel for reading and processing, and then the files after being read in a grading mode are properly stored for later reference, so that the first process node is the group office organization.
The operation request of the first service data comprises operations of adding, deleting, modifying, inquiring and the like of the first service data.
In this embodiment, the P2 framework implements shielding of differences between requesting devices and protocols by js and jquery technologies, uniformly encapsulates request data of different channels, and invokes the back-end P8 framework to process service transactions of the system in real time. A business transaction is herein also understood to be a business process. In this step, the user sends the first service processing request through the P2 framework, and the P8 framework receives the first service processing request.
Illustratively, continuing with fig. 1, after the user clicks the P2 front-end function module, the user jumps to the target page corresponding to the microservice front-end function module. The user can fill in the first service data through the target page, and after the user clicks the save button, a first service processing request is generated.
S302, processing the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure.
Wherein, the P8 framework processes the first service data to obtain a first service processing result.
Optionally, if the first service processing request is an add operation of the first service data, the P8 framework is to perform the add operation of the first service data in the database. If the first service processing request is a deletion operation of the first service data, the P8 framework is to execute the operation of deleting the first service data in the database. If the first business processing request is a modification operation of the first business data, the P8 framework is to perform the operation of modifying the first business data in the database. If the first service processing request is a query operation of the first service data, the P8 framework is to perform the query operation of the first service data in the database.
Accordingly, the first business process result may include an add success or an add failure, a delete success or a delete failure, a modify success or a modify failure, a query success or a query failure.
S303, if the first service processing result is successful, calling a preset process engine to transfer the first process node to a second process node; the second process node is the next process node of the first process node; the preset process engine is used for circulation among the process nodes.
The exemplary scenario in step S301 is taken over. In the leave-asking scenario, after the user fills in the leave-asking information and submits the leave-asking information, the process engine of the P8 framework is triggered to submit the leave-asking information to the process node corresponding to the approver, and the approver can check the leave-asking information to be approved in the service system.
In a report approval scene, after the user a completes the filling of report data and submits the report data, the process engine of the P8 framework is triggered to submit the report approval information to the process node corresponding to the approver, and the approver can view the report information to be approved in the service system.
In a group office, a worker regularly or irregularly collects and stores various files reported by each branch in a grading manner, and after the files are submitted, the process engine of the P8 framework is triggered to submit the files to the process nodes corresponding to the relevant personnel, and the relevant personnel can check the files to be reviewed in the business system.
The embodiment receives a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data; the process node corresponding to the user is a first process node; the target page is a page developed based on a P2 frame and a micro service; processing the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure; if the first service processing result is successful, calling a preset process engine to transfer the first process node to a second process node; the second process node is a next process node of the first process node; the preset process engine is used for circulation among the process nodes. Because the target page is a page developed based on a P2 framework and the micro service, and if the first service processing result is successful, a preset process engine is called to transfer the first process node to a second process node, and the second process node is the next process node of the first process node, the micro service based on the springBoot framework can be realized in an OA or some process processing service management system projects, related services are developed aiming at the workflow, and each function module is independently developed, so that the development efficiency is improved, and the micro service flow is realized in the micro service through the process engine, so that the micro service flow based on the springBoot framework is realized and is applied to related services of workflow development.
On the basis of the above embodiment, it can be seen that the method includes two kinds of transactions, namely, a business transaction and a flow transaction, where the business transaction can be understood as a processing process of the first business data, and the flow transaction can be understood as a flow process of the flow node. As described above, a transaction is a series of strict operations in an application program, all the operations must be completed successfully, otherwise all changes made in each operation are cancelled, i.e. the consistency of the transaction in the application program is ensured. Therefore, in order to ensure the consistency of the business transaction and the process transaction, the process transaction is divided into the pre-operation of the flow of the process node and the final operation of the process node; the pre-operation of the flow node flow is an operation for simulating the flow of a first flow node to a second flow node; the final operation of a flow node is the operation of flowing the first flow node to the second flow node. The final operation of the flow node characterizes the actual operation of the flow node. The following describes how to implement the consistency of business transaction and flow transaction with reference to the accompanying drawings:
fig. 4 is a second flowchart of a service processing method according to an embodiment of the present application. As shown in fig. 4, in the service processing method, invoking a preset flow engine to transfer the first flow node to the second flow node includes the following sub-steps:
s401, executing the pre-operation of flow node circulation; the pre-operation of a flow node flow is to simulate the operation of transitioning a first flow node flow to a second flow node.
Optionally, the pre-operation of the flow node flow is executed, including: and executing the operation that the current process node recording the service in the intermediate table of the process node is the second process node.
In this embodiment, the intermediate table of the flow node may be understood as a temporary table for recording a pre-operation result of the flow node. The intermediate table is not a permanent table for recording the final operation results of the flow node flow.
S402, determining whether the pre-operation of the flow node circulation is successful.
Determining whether the pre-operation of the flow node circulation is successful comprises the following steps:
and if the operation that the current process node recording the service in the intermediate table of the process node is the second process node is successful, determining that the pre-operation of the flow of the process node is successful.
And if the operation of the current process node recording the service in the intermediate table of the process node is the second process node fails, determining that the pre-operation of the flow of the process node fails.
And S403, if the pre-operation of the flow node flow is successful, calling a preset flow engine to transfer the first flow node flow to a second flow node.
Optionally, invoking a preset process engine in step S403 to transfer the first process node to the second process node, including: and calling a preset process engine to record the current process node of the service as a second process node in a target table of the process node. The target table of the process node can be understood as a permanent table for recording the final operation result of the flow of the process node, that is, the final operation result of the flow of the process node is recorded in the database persistently.
On the basis of the above embodiment, the final operation result of the flow node flow includes operation success or operation failure, and when the final operation result of the flow node flow is operation failure, since the operation of the flow node flow is executed when the first service processing result is processing success in step S303, inconsistency between the service transaction and the flow transaction may occur. In order to further ensure the consistency of the business transaction and the flow transaction, the embodiment of the application adopts a two-stage submission mode to solve the technical problem.
Optionally, after a preset flow engine is called to transfer the first flow node to the second flow node, the method of this embodiment further includes the following steps:
step a1, determines whether the operation of transitioning the first flow node to the second flow node was successful.
Optionally, step a1 includes:
and if the operation that the current process node of the business is recorded in the target table of the process node and is the second process node is successful, determining that the operation of transferring the first process node to the second process node is successful.
And if the current process node of the business recorded in the target table of the process node is the operation failure of the second process node, determining that the operation of transferring the first process node to the second process node fails.
Step a2, if the operation of transferring the first flow node to the second flow node fails, triggering the rollback operation of the service processing to cancel the operation of the first service data.
And the rollback operation of the business processing is an operation of canceling the first business data in the database so as to restore the data in the database to the correct state last time. It may also be understood as restoring the database to a state prior to the operation of the first business data.
In this embodiment, when the operation of transferring the flow of the first flow node to the second flow node fails, the rollback operation of the service processing is triggered to cancel the operation of the first service data, so as to ensure the consistency between the service transaction and the flow transaction.
On the basis of the foregoing embodiment, fig. 5 is a third flowchart of a service processing method provided in the embodiment of the present application. As shown in fig. 5, in the service processing method of this embodiment, if the first service processing result is a successful processing, the preset flow engine is called to transfer the first flow node to the second flow node, and the method includes the following substeps:
s501, receiving a second service processing request of the first process node when the first service processing result is that the processing is successful; the second service processing request comprises an operation request of second service data and a request for transferring the first flow node to the second flow node; the second service data is data modified from the first service data.
When the first service processing result is that the processing is successful, the user does not submit, and therefore, the flow operation of the flow node is not executed at this time. For example, after the user fills in the first service data, the save button is clicked, but the submit button is not clicked at this time. At this time, the first service data will be stored in the draft box of the user, and the process node is still located at the first process node corresponding to the user. Then, the user wants to modify the first service data and click the submit button, the modified first service data is referred to as second service data, and the operation of modifying and submitting the first service data may be referred to as a second service processing request.
S502, processing the second service data to obtain a second service processing result; the second service processing result comprises processing success or processing failure.
Wherein, the P8 framework processes the second service data to obtain a second service processing result.
Optionally, if the second service processing request is an add operation of the second service data, the P8 framework is to perform the add operation of the second service data in the database. If the second service processing request is a deletion operation of the second service data, the P8 framework is to perform an operation of deleting the second service data in the database. If the second service processing request is a modification operation of the second service data, the P8 framework is to perform an operation of modifying the second service data in the database. If the second service processing request is a query operation of the second service data, the P8 framework is to perform the query operation of the second service data in the database.
Accordingly, the second business process result may include an add success or an add failure, a delete success or a delete failure, a modify success or a modify failure, a query success or a query failure.
And S503, if the second service processing result is that the processing is successful, calling a preset process engine to transfer the first process node to the second process node.
Optionally, the implementation manner of invoking the preset flow engine in step S503 to transfer the first flow node to the second flow node is the same as the implementation manner of invoking the preset flow engine in step S403 to transfer the first flow node to the second flow node, which may specifically refer to the description of the implementation manner of invoking the preset flow engine in step S403 to transfer the first flow node to the second flow node, and the description is not repeated here.
On the basis of the above embodiment, if the first service processing result or the second service processing result is processing failure, the operation of flow node circulation is not executed. The operation of the flow node flow here includes a pre-operation of the flow node flow and a final operation of the flow node flow.
Optionally, the target page includes a login page and an operation page, that is, the user first needs to login and then enters the operation page. In order to reduce the problem of nested jump from the login page to the operation page, the login page and the operation page can be realized by adopting the same front end, wherein the front end comprises a micro-service front end or a P2 front end; the functional modules corresponding to the login page and the operation page are realized by micro-service or P2 framework or micro-service.
Optionally, when the first service processing result is that the processing is successful, receiving a second service processing request of the first flow node includes: receiving a second service processing request input by a user through a target page; the target page comprises a trigger button of a preset process engine and an operation request button of second service data; the triggering operation of the preset process engine and the operation of the second service data are realized by the same back end; the back end comprises a micro-service back end or a P8 back end, namely, the functional modules corresponding to the process processing of the process engine and the processing of the business transaction are realized by adopting a P8 framework or micro-service.
The target page comprises a trigger button of a preset process engine and an operation request button of second service data. The preset trigger button of the process engine can be a submit button, the operation request button of the second service data can be a save button, and the submit button and the save button can be realized by adopting the same microservice function module, so that the cross-domain problem is avoided, and the expandability and the reusability can be improved on the transaction processing of the process and the service.
The following describes an embodiment of the present application from interaction among 4 functional modules based on the service processing platform in fig. 1:
fig. 6 is an interaction diagram of a service processing method according to an embodiment of the present application. As shown in fig. 6, this embodiment includes the steps of:
the S601 and P2 front ends send a first request message to the micro service front end.
The P2 front end in step S601 includes a plurality of P2 front end function modules, each P2 front end function module is a function module of a front end developed based on the P2 framework, and the first request message sent to the microservice front end can be understood as a call request for a function. For example, when the user clicks a button in a menu on a front page developed by the P2 framework, a first request message is generated.
S602, the micro-service front end receives a first request message sent by the P2 front end, and sends a second request message to the micro-service back end.
After receiving the first request message sent by the P2 front end, the micro service front end displays a first target page corresponding to the first request message to the user, where the first target page is an empty page in which the user does not fill information, and the user can fill the first service data in the target page and click the save button, thereby generating a second request message and sending the second request message to the micro service rear end.
In step S601, the request message in step S602 may be understood as a call request to a page corresponding to a button clicked by a user.
S603, the micro-service back end analyzes the second request message to obtain analyzed data.
The parsing process in this step may refer to a parsing process of a packet in the related art, and this embodiment is not described in detail here.
S604, the microservice back end checks the analyzed data to check whether the analyzed data is correct.
In this embodiment, the verification of the analyzed data is mainly to verify the integrity of the analyzed data, and some verification algorithms in the related art may be used to verify the integrity of the data. The checking algorithm includes an exclusive-or operation, an MD5 check, and the like.
And S605, if the analyzed data is correct, setting the data identification bit to true.
S606, if the analyzed data is wrong, setting the data identification bit to false.
The data identification bit is used for identifying whether the analyzed data is correct or not.
And S607, the micro-service back end performs message assembly according to the check result to obtain a first response message.
The message assembling process may be understood as generating a first response message according to the data identification bits, that is, the first response message includes the data identification bits.
S608, the micro-service back end sends a first response message to the P2 front end module through the micro-service front end.
And the front end of S609 and P2 determines that the data verification is successful according to the first response message.
S610 and P2 front end send the third request message to P8 rear end, the third request message is used for requesting the pre-operation of the flow transfer node flow.
And the back end of S611 and P8 stores the flow state of the flow node into the intermediate table.
And the back end of the S612 and the P8 judges whether the circulation state of the flow node is successfully stored into the intermediate table.
S613, if the flow state of the flow node is successfully stored in the intermediate table, setting the flow processing identification position to true.
And S614, if the flow state of the process node is failed to be stored in the intermediate table, setting the process processing identification position to false.
And S615, the back end of the P8 assembles the message according to the flow processing identification bit to obtain a second response message.
And S616, the P8 back end sends a second response message to the P2 front end module.
The front end of S617 and P2 determines whether the flow processing flag in the second response message is true, and generates a flow ID when the flow processing flag in the second response message is determined to be true.
According to S601 to S609, the first service data filled by the user may be saved. After the first service data is stored, the flow node does not circulate, so that the user can modify the first service data after the flow ID is generated. If the user modifies the first service data and sends a submission request, the modified data needs to be stored, and then the step of the final operation of the flow node circulation is entered.
Next, a case where the user modifies the first service data and sends a submit request will be described.
And S618 and the P2 front end send a fourth request message to the micro service front end.
And S619, the micro-service front end receives the fourth request message sent by the P2 front end and sends a fifth request message to the micro-service back end.
The fourth request message is used for calling a second target page, and the second target page is a page filled with the first service data by the user.
After receiving the fourth request message sent by the P2 front end, the microservice front end displays a second target page corresponding to the fourth request message to the user, and the user can modify the first service data on the second target page and click the save and submit button, thereby generating a fifth request message and sending the fifth request message to the microservice rear end.
And S620, calling a business transaction interface by the microservice back end to perform business transaction processing.
S621, the microservice back-end judges whether the service processing is successful.
And S622, if the service processing is successful, setting the identification bit of the service transaction as true.
And S623, if the service processing fails, setting the identification bit of the service transaction as false.
And S624, the micro-service back end assembles the message according to the identification position of the service transaction to obtain a third response message.
And S625, the micro-service back end sends a third response message to the P2 front end through the micro-service front end.
And S626 and the front end of P2 determine whether the service transaction is successful according to the third response message.
And if the front end of the S627 and the P2 determines that the service transaction is successful according to the third response message, the front end of the P2 sends a sixth request message of the final operation of the flow node circulation to the P8 back-end function module.
And the back end of S628 and P8 stores the flow state of the flow node into the final table.
The final table here is the target table mentioned in the above-mentioned embodiment, i.e., the permanent table.
And the back ends of S629 and P8 judge whether the circulation state of the flow node is successfully stored in the final table.
S630, if the flow state of the flow node is successfully stored into the final table, setting the identification bit of the flow processing to true;
and S631, if the flow state of the flow node is not successfully stored in the final table, setting the identification bit of the flow processing to false.
And the back ends of S632 and P8 carry out message assembly according to whether the flow state of the process node is successfully stored into the identification bit of the final table or not, and a fourth response message is obtained.
And S633, P8 back end sends fourth response message to P2 front end.
And the front end of S634 and P2 determines whether the flow processing is successful according to the fourth response message.
S635, if the P2 front end determines that the flow processing fails according to the fourth response message, sending a seventh request message to the microservice back end through the microservice front end; the seventh request message is used for requesting to roll back the service transaction.
And S636, the microservice back end calls the service transaction interface and the transaction rollback interface to perform rollback of the service transaction according to the seventh request message.
S637, the microservice back end generates a fifth response message according to the result of the successful rollback of the business transaction; and the fifth response message is used for indicating that the service transaction rollback is successful.
And S638, the micro-service back end sends a fifth response message to the P2 front end through the micro-service front end.
And the front end of S639 and P2 determines that the service transaction rollback is successful according to the fifth response message.
On the basis of the foregoing method embodiment, fig. 7 is a schematic structural diagram of a service processing apparatus provided in the embodiment of the present application. As shown in fig. 7, the service processing apparatus includes: a receiving module 71, a processing module 72 and a circulation module 73; a receiving module 71, configured to receive a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data; the process node corresponding to the user is a first process node; the target page is a page developed based on a P2 framework and a micro service; the processing module 72 is configured to process the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure; a circulation module 73, configured to perform the following steps: if the first service processing result is successful, calling a preset flow engine to transfer the first flow node to a second flow node; the second process node is a next process node of the first process node; the preset process engine is used for flow transfer among the process nodes.
In some embodiments, the transferring module 73 invokes a preset process engine to transfer the first process node to the second process node, specifically including: executing the pre-operation of flow node circulation; the pre-operation of the flow node flow is to simulate an operation of transferring the first flow node flow to a second flow node; determining whether the pre-operation of the flow node flow is successful; and if the flow node flow is pre-operated successfully, calling a preset flow engine to transfer the first flow node flow to a second flow node.
In some embodiments, the pre-operation of the flow node flow includes: recording the current process node of the service as a second process node in a middle table of the process node; when the flow module 73 determines whether the pre-operation of the flow node flow is successful, the method specifically includes: if the operation that the current process node of the service is recorded in the intermediate table of the process node as the second process node is successful, determining that the pre-operation of the flow of the process node is successful; and if the operation that the current process node of the service is recorded in the intermediate table of the process node as the second process node fails, determining that the pre-operation of the flow of the process node fails.
In some embodiments, the flow module 73 performs the following steps: if the first service processing result is that the processing is successful, when a preset process engine is called to transfer the first process node to a second process node, the method specifically includes: receiving a second service processing request of the first process node when the first service processing result is successful; the second service processing request comprises an operation request of second service data and a request for transferring the first flow node to the second flow node; the second service data is data obtained by modifying the first service data; processing the second service data to obtain a second service processing result; the second service processing result comprises processing success or processing failure; and if the second service processing result is successful, calling a preset process engine to transfer the first process node to a second process node.
In some embodiments, the transferring module 73 invokes a preset process engine to transfer the first process node to the second process node, specifically including: and recording the current process node of the service as a second process node in a target table of the process node.
In some embodiments, the apparatus further comprises: a determining module 74, configured to determine whether the operation of forwarding the first process node to the second process node is successful; a rollback module 75 configured to perform the following steps: and if the operation of transferring the first flow node flow to the second flow node fails, triggering a rollback operation of service processing to cancel the operation of the first service data.
In some embodiments, the target page includes a login page and an operations page; the login page and the operation page are realized by adopting the same front end, and the front end comprises a micro-service front end or a P2 front end.
In some embodiments, when the receiving module 71 receives the second service processing request of the first flow node when the first service processing result is successful, specifically, the receiving module includes: receiving the second service processing request input by the user through the target page; the target page comprises a trigger button of a preset process engine and an operation request button of the second service data; the triggering operation of the preset flow engine and the operation of the second service data are realized by adopting the same back end; the back-end includes a microservice back-end or P8 back-end.
The service processing apparatus provided in the embodiment of the present application may be used to implement the technical solution of the service processing method in the foregoing embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or can be realized in a hardware mode completely; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the circulation module 73 may be a separately established processing element, or may be integrated into a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and a processing element of the apparatus calls and executes the functions of the circulation module 73. The other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element here may be an integrated circuit with signal processing capabilities. In implementation, the steps of the above method or the above modules may be implemented by integrated logic circuits of hardware in a processor element or instructions in the form of software.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 8, the electronic device may include: transceiver 81, processor 82, memory 83.
The processor 82 executes computer-executable instructions stored in the memory, causing the processor 82 to perform the aspects of the embodiments described above. The processor 82 may be a general-purpose processor including a central processing unit CPU, a Network Processor (NP), and the like; but also a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
A memory 83 is coupled to the processor 82 via the system bus and communicates with each other, and the memory 83 is used for storing computer program instructions.
The transceiver 81 may be configured to receive the first service processing request, or receive the second service processing request when the first service processing result is a successful processing result.
The system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean only one bus or one type of bus. The transceiver is used for realizing communication between the database access device and other computers (such as a client, a read-write library and a read-only library). The memory may include Random Access Memory (RAM) and may also include non-volatile memory (non-volatile memory).
The electronic device provided in the embodiment of the present application may be the service processing platform in the above embodiment.
The embodiment of the present application further provides a chip for executing the instruction, where the chip is used to execute the technical solution of the service processing method in the embodiment.
An embodiment of the present application further provides a computer-readable storage medium, where a computer instruction is stored in the computer-readable storage medium, and when the computer instruction runs on a computer, the computer is enabled to execute the technical solution of the service processing method in the foregoing embodiment.
The embodiments of the present application further provide a computer program product, where the computer program product includes a computer program, which is stored in a computer-readable storage medium, and at least one processor can read the computer program from the computer-readable storage medium, and when the at least one processor executes the computer program, the technical solution of the service processing method in the foregoing embodiments can be implemented.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (12)

1. A method for processing a service, comprising:
receiving a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data; the process node corresponding to the user is a first process node; the target page is a page developed based on a P2 frame and a micro service;
processing the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure;
if the first service processing result is successful, calling a preset process engine to transfer the first process node to a second process node; the second process node is a next process node of the first process node; the preset process engine is used for circulation among the process nodes.
2. The method of claim 1, wherein invoking the predefined flow engine to flow the first flow node to a second flow node comprises:
executing the pre-operation of flow node circulation; the pre-operation of the flow node flow is to simulate the operation of transferring the first flow node flow to a second flow node;
determining whether the pre-operation of the flow node flow is successful;
and if the pre-operation of the flow node flow is successful, calling a preset flow engine to transfer the first flow node flow to a second flow node.
3. The method of claim 2, wherein the pre-operation of the flow node flow comprises: recording the current process node of the service as a second process node in a middle table of the process node;
wherein the determining whether the pre-operation of the flow node flow is successful comprises:
if the operation that the current process node of the service is the second process node is recorded in the intermediate table of the process nodes, determining that the pre-operation of the process node circulation is successful;
and if the operation that the current process node of the service is the second process node is recorded in the intermediate table of the process node, determining that the pre-operation of the flow of the process node fails.
4. The method of claim 1, wherein if the first service processing result is a processing success, invoking a preset flow engine to transfer the first flow node to a second flow node, comprising:
receiving a second service processing request of the first flow node when the first service processing result is successful; the second service processing request comprises an operation request of second service data and a request for transferring the first flow node to the second flow node; the second service data is data obtained by modifying the first service data;
processing the second service data to obtain a second service processing result; the second service processing result comprises processing success or processing failure;
and if the second service processing result is successful, calling a preset process engine to transfer the first process node to a second process node.
5. The method of any of claims 1-4, wherein invoking the pre-defined flow engine to flow the first flow node to a second flow node comprises:
and recording the current process node of the service as a second process node in a target table of the process node.
6. The method of claim 5, wherein after invoking the predefined flow engine to forward the flow of the first flow node to the second flow node, the method further comprises:
determining whether an operation to flow the first flow node to a second flow node is successful;
and if the operation of transferring the first flow node flow to the second flow node fails, triggering a rollback operation of service processing to cancel the operation of the first service data.
7. The method according to any one of claims 1-4, wherein the target page comprises a login page and an operation page;
the login page and the operation page are realized by the same front end, and the front end comprises a micro-service front end or a P2 front end.
8. The method of claim 7, wherein the receiving the second traffic processing request from the first flow node when the first traffic processing result is a successful processing comprises:
receiving the second service processing request input by the user through the target page; the target page comprises a trigger button of a preset process engine and an operation request button of the second service data;
the triggering operation of the preset process engine and the operation of the second service data are realized by adopting the same back end; the back-end includes a microservice back-end or P8 back-end.
9. A traffic processing apparatus, comprising:
the receiving module is used for receiving a first service processing request input by a user through a target page; the first service processing request comprises an operation request of first service data; the process node corresponding to the user is a first process node; the target page is a page developed based on a P2 framework and a micro service;
the processing module is used for processing the first service data to obtain a first service processing result; the first service processing result comprises processing success or processing failure;
the circulation module is used for executing the following steps: if the first service processing result is successful, calling a preset process engine to transfer the first process node to a second process node; the second process node is a next process node of the first process node; the preset process engine is used for circulation among the process nodes.
10. An electronic device, comprising: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored by the memory to implement the method of any of claims 1-8.
11. A computer-readable storage medium having computer-executable instructions stored therein, which when executed by a processor, are configured to implement the method of any one of claims 1-8.
12. A computer program product, characterized in that it comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1-8.
CN202210469092.2A 2022-04-29 2022-04-29 Service processing method, device, equipment and storage medium Pending CN115099765A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210469092.2A CN115099765A (en) 2022-04-29 2022-04-29 Service processing method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210469092.2A CN115099765A (en) 2022-04-29 2022-04-29 Service processing method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115099765A true CN115099765A (en) 2022-09-23

Family

ID=83287595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210469092.2A Pending CN115099765A (en) 2022-04-29 2022-04-29 Service processing method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115099765A (en)

Similar Documents

Publication Publication Date Title
CN108346028B (en) Business approval processing method, device and system
US7900216B2 (en) Creating a modified service request and processing the results of its execution
US7769821B2 (en) Systems and methods for enhanced meassage support using a generic client proxy
US9665465B1 (en) Automated determination of application permissions
CN102971711A (en) An apparatus for processing a batched unit of work
CN111064621B (en) Service data docking method and device
CN114925084B (en) Distributed transaction processing method, system, equipment and readable storage medium
WO2023207146A1 (en) Service simulation method and apparatus for esop system, and device and storage medium
CN112486719B (en) Method and equipment for RPC interface call failure processing
CN113672350B (en) Application processing method and device and related equipment
CN111597020A (en) Application Programming Interface (API) debugging method and debugging terminal
CN115099765A (en) Service processing method, device, equipment and storage medium
CN110221952B (en) Service data processing method and device and service data processing system
CN116149745A (en) Application configuration data management method and device, electronic equipment and storage medium
CN111176653B (en) Program compiling and packaging method and device, electronic equipment and storage medium
CN111061576B (en) Method and system for creating entity object
CN116095074A (en) Resource allocation method, device, related equipment and storage medium
CN114679491A (en) Micro front-end service application method and device, storage medium and electronic equipment
CN111865726A (en) Service message testing method, device, computer system and storage medium
CN112583770B (en) Data transmission method, device, storage medium and equipment
CN113554498B (en) Processing method and device for user account request
CN110191141B (en) Service calling information processing method and device and computer system
CN116974814A (en) Data recovery method, apparatus, device, storage medium and computer program product
CN114924967A (en) Simulation test method, device, equipment and system for automatic driving algorithm
CN116582578A (en) Heterogeneous blockchain management platform and implementation method

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