CN111222850A - Front-end and back-end cooperation work order processing flow method based on finite state machine - Google Patents

Front-end and back-end cooperation work order processing flow method based on finite state machine Download PDF

Info

Publication number
CN111222850A
CN111222850A CN201911425944.2A CN201911425944A CN111222850A CN 111222850 A CN111222850 A CN 111222850A CN 201911425944 A CN201911425944 A CN 201911425944A CN 111222850 A CN111222850 A CN 111222850A
Authority
CN
China
Prior art keywords
action
state
work order
data
transmits
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
CN201911425944.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.)
Shenzhen Ruiwei Intelligent Technology Co ltd
Original Assignee
Shenzhen Ruiwei Intelligent Technology Co 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 Shenzhen Ruiwei Intelligent Technology Co ltd filed Critical Shenzhen Ruiwei Intelligent Technology Co ltd
Priority to CN201911425944.2A priority Critical patent/CN111222850A/en
Publication of CN111222850A publication Critical patent/CN111222850A/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • 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
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Development Economics (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a front-end and back-end cooperation work order processing flow method based on a finite-state machine, which comprises the following steps: 1) the front end acquires the current state, the button and the action code of the service data and transmits the current state, the button and the action code to the terminal control system; 2) according to the current state of the service data, the back end judges executable flow actions and corresponding authorities required by the execution actions, and transmits corresponding action codes to the terminal control system; 3) and the terminal control system transmits the information data transmitted by the back end in the step 2) to the front end, carries corresponding action execution information, and the front end executes corresponding action calling. By adopting the method, the invention can realize the configuration, modularization, reusability and expandability of the flow execution actions; the control and configuration capability of the rear end is highlighted, the front end programming is simplified, and the labor and the maintenance cost are saved; and the authority configuration data is embedded to control the account access authority, so that the authority control problem is solved elegantly and flexibly.

Description

Front-end and back-end cooperation work order processing flow method based on finite state machine
Technical Field
The invention relates to the technical field of software research and development, in particular to a front-end and back-end cooperation work order processing flow method based on a finite-state machine.
Background
On ERP and some Internet application platforms (such as e-commerce, network appointment and the like), work order processing is a common business scene, and the state conversion of the work order is a fixed and variable business processing flow. The following chart shows the processing flow of an e-commerce system order:
therefore, different states of the work order have strong logical relations, each state has corresponding processing actions, each action is changed into the next state after being executed, and the loop finally tends to be in an end state. Some current projects adopt hard coding for such service scenes, judge each state, and write down a set of service logic for each action. However, currently, project groups generally implement strict division of front and back end labor, and along with development changes of services, such as addition and subtraction of states and addition and subtraction of actions, authority limits of operations that can be executed by different user roles, in the face of such complicated and changeable work order service flows, front and back end personnel constantly modify codes due to changes of the services every day, but bugs still frequently appear, and along with the lapse of time, the control of the back end service flow tends to be out of control, and is difficult to expand and maintain, the whole service flow may be affected by slight modification, the butt joint of the front end and the back end is a disaster, and in addition, because the logic of authority control is considered for the data security requirement, the problem of the work order processing flow is further amplified. There are some flow scheduling engines designed based on Finite State Machines (FSM), which generally include the following processes: 1) extracting an operation flow part in the software platform; 2) and constructing a flow engine, and scheduling the operation flow in the flow engine in a finite state machine mode. The specific process of scheduling the operation flow in the step 2) by means of the finite state machine is as follows: setting an operation object of an operation flow as a theme of the finite state machine, setting the position of the theme as the state of the finite state machine, setting operation actions carried out in the operation flow as the actions of the finite state machine, and setting function steps included in the actions as the operations of the finite state machine; and triggering the state transition in the finite state machine through operation and action to realize the scheduling of the operation flow.
Although the existing FSM-based business process engine technology can solve the problems of back-end development, maintenance and expansion caused by variable characteristics in the work order processing flow, the application is only limited to the back-end business processing flow, and the front end still faces complex and variable business scenes. The operation items in the column of 'operation' of the traditional project appear along with the state of the project, if the front end adopts hard coding, a plurality of control logics of i f e l se can be expected to appear along with the expansion and the change of the service, the maintainability of the code is greatly reduced, and the possibility of the occurrence of the Bug is greatly increased. If the operation items have to be changed due to service change, the new change is likely to affect the original service logic, especially, in view of data security of many current service platforms, only part of the operation items are limited to be seen in each current login account, only part of the operation items are operated, and the backend still needs to verify whether the current account has the operation right in the process of executing the specific service logic.
Therefore, it is an urgent technical problem to be solved by those skilled in the art to provide a work order processing flow method which can enable a back-end application (Web, APP) and a front-end Application (APP) to simply and elegantly cope with a complex and variable business application scenario by a work order processing engine based on an FSM and adding front-end cooperation and authority control processing.
Disclosure of Invention
In view of this, the present invention provides a work order processing flow method based on front-end and back-end cooperation of a finite state machine.
In order to solve the technical problems, the invention adopts the following technical scheme:
a front-end and back-end cooperation work order processing flow method based on a finite-state machine is characterized by comprising the following steps:
1) the front end acquires the current state, the button and the action code of the service data and transmits the current state, the button and the action code as the access parameter to the terminal control system;
2) the terminal control system sorts the current state of the received service data and transmits the current state to the back-end system; according to the current state of the service data, the back end judges executable flow actions and corresponding authorities required by the execution actions, and transmits corresponding action codes to the terminal control system;
3) and the terminal control system transmits the information data received in the step 2) to the front end, carries corresponding action execution information, and the front end executes corresponding action calling.
Preferably, the work order flow method needs to configure the service data state, the back-end action and the configuration items of the front-end button in advance.
The beneficial effects of the above technical scheme are: when the service data is returned to the front end, the button configuration item is carried, after the button action is triggered, the action code is carried, the back end receives the request, the authority verification is executed firstly according to the service data state and the action code, and if the authority is present, the flow action is executed.
Preferably, account role data is entered in a configuration item of a front-end button, and before executing a flow action, whether a current account has an execution authority or not is verified, if yes, execution is performed, and if not, prohibition is performed; and subsequent permission control change only needs to modify correspondingly configured permission data without changing business logic.
The beneficial effects of the above technical scheme are: the method not only can well ensure the safety and stability of the data, but also can well prevent the attacked risk.
Preferably, the service data state is the most important characteristic in its life cycle, and the state determines what stage it is currently in, what operations can be performed, and which state it will become after the corresponding operation is performed.
Preferably, the flow acts as an abstraction of a series of operations that may be performed.
Compared with the prior art, the invention has the following technical effects:
(1) the flow execution actions are configured, modularized, reusable and expandable;
(2) the control and configuration capacity of the rear end is highlighted, the front end programming is simplified, and the labor and the maintenance cost are saved;
(3) and the authority configuration data is embedded to control the account access authority, so that the authority control problem is solved elegantly and flexibly.
Drawings
FIG. 1 is a schematic flow chart of a front-end and back-end cooperation based work order processing flow method according to the present invention;
FIG. 2 is a schematic diagram of front-end operation configuration of a front-end collaboration work order processing flow method based on a finite-state machine according to the present invention;
fig. 3 is a schematic diagram of a back-end action configuration of a job order processing flow method based on front-end and back-end cooperation of a finite-state machine according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Examples
Referring to fig. 1, a work order processing flow method based on front-end and back-end cooperation of a finite-state machine includes the following steps:
1) the front end acquires the current state, the button and the action code of the service data and transmits the current state, the button and the action code as the access parameter to the terminal control system;
2) the terminal control system sorts the current state of the received service data and transmits the current state to the back-end system; according to the current state of the service data, the back end judges executable flow actions and corresponding authorities required by the execution actions, and transmits corresponding action codes to the terminal control system;
3) and the terminal control system transmits the information data transmitted by the back end in the step 2) to the front end, carries corresponding action execution information, and the front end executes corresponding action calling.
The work order flow method needs to configure the service data state, the back-end action and the front-end button configuration item data in advance. When the service data is returned to the front end, the service data carries the button configuration item, after the button action is triggered, the service data carries the action code, the back end receives the request, and performs the authority verification according to the service data state and the action code, and if the authority exists, the flow action is executed.
The service data state in the present invention is the most important characteristic in its life cycle, and the state determines what stage it is currently in, what operations can be performed, and what state it will become after the corresponding operations are performed. As shown in fig. 1, state a and state B, which are configured in advance according to the service logic. The abstraction of the business data state well reflects the 'switching principle' of software design, and the increase and decrease of the business state can be realized by simply adding or decreasing the state configuration.
The flow action is an abstraction of a series of operations that can be performed by the business data, for example, an order can perform a customer payment action in a "to-be-paid" state, can perform a customer cancellation action, or can be performed by the system due to unpaid timeout. In the invention, only a subdivision action of informing warehousing is added and configured in the original large payment action, and the engine can naturally execute the business logic informing warehousing without influencing the original payment business logic. A complicated business process is decomposed into a plurality of sub-businesses without mutual interference, so that:
1. action decoupling, the increase, the decrease and the modification of the flow action can not influence each other;
2. the action is reused, the repeated execution flow can be reused only through action configuration, and the service logic of the action is more cohesive;
the abstraction of the flow action simplifies the complex business execution flow into sub-actions with sequence, reusability and easy expansion, so that even in the face of a scene with variable business, the complex business execution flow can be coped with elegantly, and the iteration risk of the business becomes controllable.
The front-end display button of the work order flow method is an abstract design aiming at the secondary mode. The separation of front and back means that the front also undertakes business logic, not just show that if the business state is compared to brain, then the back flow actions and front action buttons are hands and feet, and the brain determines the actions of hands and feet. The specific action buttons are displayed in a common service data list, as shown in fig. 2, the buttons are configured as configuration items, the configuration items do not need to be maintained by a front end, the button information is simultaneously returned by the front end to the rear end when the front end requests data from the rear end, and the front end only needs to be displayed, so that the front end avoids complex button display logic judgment, otherwise, the front end generally displays the corresponding buttons according to the state of the current service data, especially, a plurality of front ends such as Web, Android, IOS, WeChat small programs and the like are possible in some existing service platforms, the design avoids multi-end repetitive development work, and if the service changes, the configuration buttons only need to be modified, so that the operation is simple and controllable.
In some embodiments, account role data is entered in a configuration item of a front-end button of the work order flow method, and before a flow action is executed, whether a current account has an execution authority or not is verified, if yes, execution is performed, otherwise, prohibition is performed; and subsequent permission control change only needs to modify correspondingly configured permission data without changing business logic.
The working principle is as follows: the method comprises the steps that a button and an action code which are configured in a unified mode are obtained through a front end, the information is used as a parameter for calling a back-end flow action, a back-end scheduling engine receives the parameter, whether the current flow action can be executed or not is verified according to the authority of a current account and the action code, and therefore the purpose of controlling operation authority can be achieved.
The invention adopts the front-end and back-end cooperation work order flow method based on the finite-state machine, which comprises the following steps: the method not only can realize the configuration, modularization, reusability and expandability of the flow execution actions; but also can highlight the control and configuration capability of the back end, simplify the front end programming, save labor and maintenance cost, control the account access authority by embedding authority configuration data, solve the authority control problem elegantly and flexibly,
the above description is only a preferred embodiment of the present invention, and is not intended to limit the technical scope of the present invention, so that any minor modifications, equivalent changes and modifications made to the above embodiment according to the technical spirit of the present invention are within the technical scope of the present invention.

Claims (5)

1. A front-end and back-end cooperation work order processing flow method based on a finite-state machine is characterized by comprising the following steps:
1) the front end acquires the current state, the button and the action code of the service data, and transmits the current state, the button and the action code as the access parameter to the terminal control system;
2) the terminal control system sorts the current state of the received service data and transmits the current state to the back-end system; according to the current state of the service data, the back end judges executable flow actions and corresponding authorities required by the execution actions, and transmits corresponding action codes to the terminal control system;
3) and the terminal control system transmits the information data received in the step 2) to the front end, carries corresponding action execution information, and the front end executes corresponding action calling.
2. The method as claimed in claim 1, wherein the work order flow method requires configuring the business data status, the back-end action and the configuration items of the front-end button in advance.
3. The work order processing flow method based on the front-end and back-end cooperation of the finite-state machine as claimed in claim 2, characterized in that account role data are entered in configuration items of front-end buttons, and before executing flow actions, whether the current account has execution authority is verified, if yes, execution is performed, otherwise, prohibition is performed; and subsequent permission control change only needs to modify correspondingly configured permission data without changing business logic.
4. The finite state machine based front-end collaboration work order processing flow method as claimed in claim 1, wherein said business data state is a most important feature in its life cycle, and the state determines at what stage it is currently in, what operations can be performed, and which state it will become after the corresponding operations are performed.
5. The finite state machine based front-end collaboration work order processing flow method as claimed in claim 1, wherein the flow acts as an abstract instruction for a series of operations that can be performed.
CN201911425944.2A 2019-12-31 2019-12-31 Front-end and back-end cooperation work order processing flow method based on finite state machine Pending CN111222850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911425944.2A CN111222850A (en) 2019-12-31 2019-12-31 Front-end and back-end cooperation work order processing flow method based on finite state machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911425944.2A CN111222850A (en) 2019-12-31 2019-12-31 Front-end and back-end cooperation work order processing flow method based on finite state machine

Publications (1)

Publication Number Publication Date
CN111222850A true CN111222850A (en) 2020-06-02

Family

ID=70830963

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911425944.2A Pending CN111222850A (en) 2019-12-31 2019-12-31 Front-end and back-end cooperation work order processing flow method based on finite state machine

Country Status (1)

Country Link
CN (1) CN111222850A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003015000A1 (en) * 2001-08-08 2003-02-20 Trivium Systems Inc. Workflow engine for automating business processes in scalable multiprocessor computer platforms
US20040254842A1 (en) * 2003-06-13 2004-12-16 Jon Kirkegaard Order commitment method and system
CN103049264A (en) * 2012-12-17 2013-04-17 国电南京自动化股份有限公司 Method for controlling business system by dynamic modeling of state machine

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003015000A1 (en) * 2001-08-08 2003-02-20 Trivium Systems Inc. Workflow engine for automating business processes in scalable multiprocessor computer platforms
US20040254842A1 (en) * 2003-06-13 2004-12-16 Jon Kirkegaard Order commitment method and system
CN103049264A (en) * 2012-12-17 2013-04-17 国电南京自动化股份有限公司 Method for controlling business system by dynamic modeling of state machine

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
林统传: ""面向流程定义的软件构造系统设计与实现"", 《CNKI优秀硕士学位论文全文 信息科技辑》 *
邹晶等: "基于有限状态机的工作流引擎的设计", 《计算机应用与软件》 *

Similar Documents

Publication Publication Date Title
CN110377413B (en) Distributed task asynchronous scheduling and monitoring system based on BPMN standard
CN107357567B (en) Design system and method of visual script editor
CN101872305B (en) UI (User Interface) performance and service logic separation method and system
CN101398780B (en) Instantly debugging method and system based on schedule debugger
US8818346B2 (en) Wireless device with a control engine using functional block programming
WO2015014150A1 (en) Method,apparatus,and application platform for updating application object attribute
CN102236764A (en) Method and monitoring system for Android system to defend against desktop information attack
CN102663543A (en) Scheduling system used for enterprise data unification platform
US20100179957A1 (en) Polling Method of Switch Status Based on Timer-triggered Scheduler of Stored Procedures
CN110825457A (en) Method and device for processing business in business engine, storage medium and electronic equipment
CN104516796A (en) Command set based network element backup and recovery method and device
CN103197927B (en) A kind of method that realizes of Workflow and system thereof
CN103702191A (en) Method for avoiding ANR (Application Not Responding) occurring on smart television starter
CN111966263A (en) Method and system for setting relay protection device function matching by adopting menu interface
CN114995816A (en) Business process configuration method and device, electronic equipment and readable storage medium
CN106874072B (en) Embedded operating system partition virtual interrupt processing method based on PowerPC processor
CN104951348A (en) Interruptible recovery upgrading method and device
CN102043669B (en) Workflow concurrency mode control method and device
CN111222850A (en) Front-end and back-end cooperation work order processing flow method based on finite state machine
CN105447384B (en) A kind of anti-method monitored, system and mobile terminal
CN112231231B (en) Cloud service debugging method, system and device
CN112099797B (en) Industrial control screen based function setting method and device and industrial control screen
CN114518885A (en) Information collection method and device, electronic equipment and storage medium
CN110221952B (en) Service data processing method and device and service data processing system
CN113448645A (en) Service providing method and device, readable storage medium and electronic equipment

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