Graphical construction method and system of RPA business process
Technical Field
The invention belongs to the field of robot process automation in enterprise application, and particularly relates to a graphical construction method and a graphical construction system for an RPA (resilient packet Access) business process.
Background
Rpa (robotic Process automation), namely robot Process automation, also known as software robot or virtual laborer, refers to a way of using software automation technology to replace manual operation to complete computer operation. The RPA business process is also software, needs professional computer technicians to develop according to business logic, and the technicians usually need to learn and continuously follow up various business environments, so that a great deal of energy is consumed in a communication link of business requirements, and the development efficiency is low; meanwhile, service personnel familiar with the service environment are difficult to master due to the absence of technical background, which greatly limits the development efficiency of the RPA service flow and the application range of the RPA service flow development technology.
The method for solving the problem reduces the difficulty of the development of the service process by a graphical programming mode, so that service personnel can independently complete the development of the RPA service process. The method divides the complete RPA service flow into general actions, then encapsulates the code segment for realizing each action in the graphic control, reserves the code entry form on the corresponding control, and the user fills in the entry as required. And finally, connecting the graphic controls according to the service sequence to form a complete RPA service flow. However, because the RPA needs a lot of software types to operate, the number of related actions is large, and the entry and return values of each action are also very different, different graphical styles are usually created for different actions, which causes frequent expansion and maintenance of the action library, and further causes the construction of the graphical control to be complicated, flexible and difficult to expand.
Disclosure of Invention
The invention aims to provide a graphical construction method and a graphical construction system of an RPA (resilient packet Access) business process, which aim to solve the problems that the construction work of a graphical control is more complicated, the flexibility is poor and the expansion is difficult when different graphical controls are created for different actions in the prior art.
In order to achieve the above purpose, the invention provides the following technical scheme:
a graphical construction method of RPA service flow comprises the following steps:
carrying out logic description on basic actions of the RPA business process to form an action function, and storing the action function into a tool box;
selecting one or more action functions from the tool box according to business requirements, rendering the action functions into action icons, and connecting the action icons according to the sequence of business processes;
configuring a reference form and/or a return value form of the action function corresponding to each action icon;
and according to the connection sequence of the action icons, generating an executable script of the RPA business process by translation.
Preferably, the method for logically describing the basic action of the RPA service flow to form and store the action function specifically includes:
carrying out logic description on the basic action of the RPA business process by utilizing a Python function;
packaging the Python function by using an XML language to form an action function in an XML format;
and storing the XML-format action function into a tool box.
Further, the method for rendering and connecting the action function into the action icon specifically includes:
defining a template of an action icon;
adopting an MVVM mode, and generating a corresponding action icon according to the rendering of the encapsulated data of the action function in the XML format;
and connecting the action icons according to the sequence of the business process.
Specifically, the encapsulated data of the action function includes a signature of the internally encapsulated Python function and additional information in XML format, wherein,
the signature of the Python function comprises corresponding Python function information, wherein the Python function information comprises a Python function name, an input parameter and a return value;
the additional information in XML format includes the dependency package and description information of the Python function.
Preferably, the method for configuring the reference form and/or the return value form of the action function corresponding to each action icon specifically includes:
selecting action icons needing to be configured into a reference form and/or a return value form;
searching a corresponding action function according to the component ID of the action icon;
rendering the input parameters of the Python function through the input nodes of the action function to generate a visual reference form, and inputting configuration information by a user through the visual reference form;
and rendering the return value of the Python function through the output nodes of the action function to generate a visual return value form, and inputting configuration information by a user through the visual return value form.
Preferably, the method for generating the executable script of the RPA service flow by translation according to the connection sequence of the action icons specifically includes:
creating a function script in a Python format corresponding to each action function, and adding an import statement of the action function in the function script;
generating a function call statement in a Python format corresponding to each action function, wherein the function call statement is used for calling the corresponding action function;
and according to the connection sequence of the action icons, sequentially connecting the corresponding function call statements in series to form an executable script of the RPA service flow.
Specifically, the method for generating a function call statement in a Python format corresponding to each action function includes:
and generating a function call statement in a Python format corresponding to each action function according to the name of the action function, the parameter table, the return value table and the configuration information input by the user in the parameter table and/or the return value table.
A graphical construction system of RPA service process comprises a logic description module, a service implementation module, a configuration module and a translation module, wherein,
the logic description module is used for logically describing the basic action of the RPA service flow to form an action function and storing the action function into a tool box;
the service implementation module is used for selecting one or more action functions from the tool box according to service requirements, rendering the action functions into action icons at the same time, and connecting the action icons according to the sequence of a service flow;
the configuration module is used for configuring a reference form and/or a return value form of the action function corresponding to each action icon;
and the translation module is used for translating and generating the executable script of the RPA business process according to the connection sequence of the action icons.
A computer device comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor implements the steps of the graphical construction method of the RPA business process when executing the computer program.
A computer-readable storage medium, on which a computer program is stored, the computer program, when executed by a processor, performs the steps of the above-mentioned graphical construction method for an RPA business process.
Compared with the prior art, the graphical construction method and the graphical construction system for the RPA business process have the following beneficial effects that:
according to the graphical construction method of the RPA business process, firstly, the basic actions of the RPA business process are logically described to form action functions, when a user uses the graphical construction method, the action functions are selected from a tool kit and dragged into a design area, the action functions are rendered into action icons while being dragged into the design area, the action functions representing the basic actions are bound to a UI layer, the action icons are automatically rendered, the flexibility and the expandability for constructing the RPA business process are improved, a developer of the actions does not need to create different graphs for each action, and the development efficiency is greatly improved; then, the action icons are connected according to the sequence of the service flow, and a reference form and/or a return value form of the action function corresponding to each action icon are configured according to requirements, so that the method is convenient and quick, and the difficulty of constructing the RPA service flow by service personnel is reduced; and finally, the action function automatically translates and generates an executable script of the RPA service flow according to the connection sequence of the action icons so as to realize a set of complete RPA service flow capable of being automatically executed. When the design of the basic action needs to be modified or expanded, the expansion of the action function can be realized without recompilation, and the flexibility and the expandability for constructing the RPA service flow are improved.
The graphical construction system of the RPA business process provided by the invention adopts the graphical construction method of the RPA business process, and solves the problems that the construction work of the graphical control is more complicated, the flexibility is poor and the expansion is difficult when different graphical controls are created for different actions in the prior art.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic flow chart of a graphical construction method of an RPA service flow in an embodiment of the present invention;
fig. 2 is a schematic diagram of a method for logically describing and forming and storing an action function for a basic action of an RPA service flow in an embodiment of the present invention;
FIG. 3 is a diagram illustrating a method for rendering and connecting an action function into an action icon according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating a method for configuring a reference form and/or a return value form of an action function corresponding to each action icon according to an embodiment of the present invention;
fig. 5 is a schematic diagram of a method for generating an executable script of an RPA service flow by translation in an embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. 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.
Example one
Referring to fig. 1, a graphical construction method of an RPA service flow provided in this embodiment includes the steps of:
carrying out logic description on basic actions of the RPA business process to form an action function, and storing the action function into a tool box;
selecting one or more action functions from a tool box according to business requirements, rendering the action functions into action icons, and connecting the action icons according to the sequence of a business process;
configuring a reference form and/or a return value form of the action function corresponding to each action icon;
and according to the connection sequence of the action icons, generating an executable script of the RPA business process by translation.
According to the graphical construction method of the RPA business process, firstly, the basic actions of the RPA business process are logically described to form action functions, when a user uses the graphical construction method, the action functions are selected from a tool kit and dragged into a design area, the action functions are rendered into action icons while being dragged into the design area, the action functions representing the basic actions are bound to a UI layer, the action icons are automatically rendered, the flexibility and the expandability of the RPA business process construction are improved, a developer of the actions does not need to create different graphs for each action, and the development efficiency is greatly improved; then, the action icons are connected according to the sequence of the service flow, and a reference form and/or a return value form of the action function corresponding to each action icon are configured according to requirements, so that the method is convenient and quick, and the difficulty of constructing the RPA service flow by service personnel is reduced; and finally, the action function automatically translates and generates an executable script of the RPA service flow according to the connection sequence of the action icons so as to realize a set of complete RPA service flow capable of being automatically executed. When the design of the basic action needs to be modified or expanded, the expansion of the action function can be realized without recompilation, and the flexibility and the expandability for constructing the RPA service flow are improved.
In the method for graphically constructing an RPA service flow provided in this embodiment, the method for logically describing a basic action of an RPA service flow and forming an action function specifically includes: firstly, carrying out logic description on basic actions of an RPA service flow by utilizing a Python function; then, packaging the Python function by using an XML language to form an action function in an XML format; and finally, storing the XML-format action function into a tool box for later use.
The number of basic actions of the RPA business process is large, and the variety is various, for example, the basic actions of the mouse operation class include mouse single-click, mouse double-click, mouse suspension and the like; the basic actions of the Excel operation class comprise cell assignment, cell combination and the like. Each action corresponds to a Python function, for example, the name of the Python function corresponding to the action of opening the website is open _ url (), the first parameter of the function is the website which needs to be opened by the user and is input by the user through a reference form, and the second parameter is used for indicating whether to forcibly interrupt the operation of the process or not after the operation of opening the website fails, and the interruption is performed by default.
Since the python function is not a formatted function data, the pure python function lacks a Dependency package (for example, a Dependency node under a Dependency node set in XML encapsulation) and cannot be directly used for generating a graph, so that adaptation needs to be performed by XML with a more normalized format, and XML includes a function description and necessary additional information. And binding an action function in an XML format representing the action to the UI layer to realize automatic rendering of the graph, so that a developer of the action does not need to create different graphs aiming at each action, and the extensible graphical process design based on the XML is realized.
Further, the method for rendering and connecting the action function into the action icon specifically includes: defining a template of an action icon; then, adopting an MVVM mode, and rendering and generating a corresponding action icon according to the packaging data of the action function in the XML format; and finally, connecting the action icons according to the sequence of the business process.
The template of the action icon can be defined according to personal preference of developers, and specific operations such as defining uniform styles such as a trigger, a graph, a size, a text box position and a text size for the action icon; the MVVM mode originates from a WPF technology of a NET platform, is applied to the field of Web front ends, is a design mode for separating view UI (user interface) from service logic, separates the UI logic from the service logic through a data binding and command technology, and achieves the effect of driving the UI by data.
As can be seen, in the graphical construction method of an RPA business process provided in this embodiment, a process of creating a visual action icon may be divided into 3 layers from a lower layer to an upper layer, where the three layers are: a python function that essentially implements action logic, xml that encapsulates the description of the python function, and an action icon that is perceived by the user. Where xml bridges the bridge between the function icon and the python function implementation action logic. The graphic client side adopts a WPF technology based on a NET platform, and binds the action function representing the XML format to the UI layer through a WPF bidirectional binding mechanism, so that the automatic rendering of the action icon of a uniform template is realized, developers do not need to create different graphics for each action function, and the graphical construction of the extensible RPA business flow is realized based on the action function in the XML format.
The XML-formatted action function contains encapsulated data, and the encapsulated data comprises a signature of an internally encapsulated Python function and additional information in the XML format. The signature of the Python function comprises corresponding Python function information, wherein the Python function information comprises a Python function name, an input parameter and a return value; the additional information in XML format includes the dependency package and description information for the Python function.
For example, when the Python function is encapsulated in XML, an ID node, a Keyword node, a Title node, a Description node, an Inputs node, an Outputs node, a Dependencies node, and the like need to be set. The ID node is a character string in a GUID format, is a global unique identifier of an action function, and is also a global unique identifier of a certain basic action, so that the ID node is consistent with the component ID of the action icon; the Keyword node represents a Python function name corresponding to the action function; the Title node represents the display name of the action function; the Description node represents the detailed Description of the action function; the input nodes are input parameters of Python functions corresponding to the action functions; the output node is the return value of the Python function corresponding to the action function; the dependences node represents the package name of the Python function corresponding to the action function.
The reference form and/or the return value form of the action function corresponding to each action icon are configured by a user according to needs, and the configuration method specifically comprises the following steps: selecting action icons needing to be configured with the input parameter form and/or the return value form so as to trigger and display the input parameter form and/or the return value form; searching a corresponding action function according to the component ID of the action icon; rendering the input parameters of the Python function through the input nodes of the action function to generate a visual parameter entry form, and inputting configuration information by a user through the visual parameter entry form; and rendering the return value of the Python function through an output node of the action function to generate a visual return value form, and inputting configuration information by using the visual return value form by a user.
The input parameters of the Python function are usually required to be configured, for example, the Python function describing the action of reading a file is required to configure the file name of the read file at the input parameters; the Python function describing the action of opening the website needs to configure the effective website of the opened website and the like in the input parameters. It should be noted that some Python functions have no input parameters, e.g. the jump-out loop action has no input parameters, and thus do not need to be configured. Similarly, if the return value of a Python function is useful in a later Python function, configuration is required, e.g., a variable name is configured for the return value; if the return value of a Python function is not available in a later Python function, no configuration is required.
In the graphical construction method of an RPA service flow provided in this embodiment, the method for generating an executable script of an RPA service flow by translation specifically includes: creating a function script in a Python format corresponding to each action function, and adding an import statement of the action function in the function script; generating a function call statement in a Python format corresponding to each action function, wherein the function call statement is used for calling the corresponding action function; and according to the connection sequence of the action icons, sequentially connecting the corresponding function call statements in series to form a final executable script of the RPA service flow. The method for generating the function call statement in the Python format corresponding to each action function comprises the following steps: and generating a function call statement in a Python format corresponding to each action function according to the name of the action function, the parameter table, the return value table and the configuration information input by the user in the parameter table and/or the return value table.
As will be understood by those skilled in the art, an RPA service flow is composed of a series of basic actions of software operations, each basic action is implemented by a section of script code in Python format, and a complete RPA service flow is formed by splicing the script codes corresponding to the series of basic actions. In the graphical construction method of the RPA business process provided by the embodiment of the invention, a graphical programming mode is used, the basic actions represented by the action functions are assembled in the form of action icons, and an executable Python-format robot flow script is generated by translation, so that the development difficulty for constructing the RPA business process is greatly reduced.
In addition, in the graphical construction method of the RPA service flow provided in the embodiment of the present invention, a user may define a new basic action by creating a new action function, and implement a service logic of the basic action by using a Python function, thereby facilitating the number expansion of the basic action. Meanwhile, the bottom layer adopts a function of Python language to describe basic actions, the Python function is packaged into an action function by XML language, and the Python language is the form of an executable script of the RPA service flow, so that recompilation is not needed when the action function is expanded, the expansibility and flexibility of the action function are improved, and the running speed of the RPA service flow is improved.
Example two
A graphical construction system of RPA service flow comprises a logic description module, a service realization module, a configuration module and a translation module. The logic description module is used for carrying out logic description on basic actions of the RPA business process to form action functions and storing the action functions into a tool box; the service implementation module is used for selecting one or more action functions from the tool box according to service requirements, rendering the action functions into action icons and connecting the action icons according to the sequence of the service flow; the configuration module is used for configuring a reference form and/or a return value form of the action function corresponding to each action icon; and the translation module is used for translating and generating the executable script of the RPA business process according to the connection sequence of the action icons.
Compared with the prior art, the beneficial effect of the graphical construction system of the RPA business process provided by the embodiment of the invention is the same as that of the graphical construction method of the RPA business process provided by the first embodiment, and other technical characteristics in the method are the same as those disclosed by the system of the first embodiment.
The graphical construction system of the RPA business process provided by the invention adopts the graphical construction method of the RPA business process in the previous embodiment, and solves the problems that the construction work of the graphical control is more complicated, the flexibility is poor and the graphical control is not easy to expand when different graphical controls are created for different actions in the prior art.
EXAMPLE III
A computer device includes a memory, a processor and a computer program stored in the memory and executable on the processor, where the processor executes the steps of the graphical construction method of the RPA service flow in the first embodiment. The computer devices include, but are not limited to, a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing service data. The network interface of the computer device is used for communicating with an external terminal through a network connection. When being executed by a processor, the computer program realizes a graphical construction method of the RPA service flow, and improves the flexibility and the expandability of constructing the RPA service flow.
Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the graphical construction method of the RPA service flow provided by the first embodiment, and other technical features in the method are the same as those disclosed in the system of the first embodiment, which are not repeated herein.
Example four
A computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for graphically constructing an RPA service flow in the first embodiment are executed, so that flexibility and extensibility of constructing the RPA service flow are improved. It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment of the present invention are the same as the beneficial effects of the graphical construction method of the RPA service flow provided by the first embodiment, and other technical features in the method are the same as those disclosed in the system of the first embodiment, which are not repeated herein.
In the foregoing description of embodiments, the particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.