A method and system for developing RPA code

By creating project subdirectories compatible with IDE development tools within the RPA designer and monitoring and updating code files in real time, the complexity of switching between the RPA designer and IDE development tools is resolved, improving the efficiency and accuracy of RPA code development.

CN115658033BActive Publication Date: 2026-02-06SHANGHAI YISAIQI SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211332375.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-28
Publication Date
2026-02-06
Estimated Expiration
2042-10-28

AI Technical Summary

Technical Problem

The complex switching between existing RPA designers and third-party IDE development tools leads to low development efficiency and limited flexibility and scalability.

Method used

Create a second programming language project subdirectory in the RPA designer that is compatible with the IDE development tool. Update the code files in real time through monitoring functions to ensure that the RPA designer and the IDE development tool can access and modify the code files synchronously and exchange data in accordance with the RPA component specifications.

Benefits of technology

It enables the hybrid use of RPA designers and IDE development tools, improving code development efficiency and accuracy, and ensuring the normal operation and consistency of the RPA process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658033B_ABST
    Figure CN115658033B_ABST
Patent Text Reader

Abstract

The application discloses an RPA code development method and system, which comprises the following steps: establishing an RPA project engineering through an RPA designer, wherein the RPA project engineering contains a second programming language code subdirectory for storing code files developed by a specified second programming language; creating a second programming language project engineering subdirectory compatible with an IDE development tool in the RPA project engineering; accessing the second programming language code subdirectory through the RPA designer or the IDE development tool to increase or modify the code files; monitoring the code files through a monitoring function, and automatically loading the modified code files through the RPA designer or the IDE tool after the code files are modified; and executing an RPA process mixed with the code files and RPA scripts through an RPA executor to determine whether the RPA process runs normally. The application can use the IDE development tool to develop the code in the RPA designer, and improves the RPA code development and debugging efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to an RPA code development method and system, and belongs to the technical field of RPA code development. BACKGROUND

[0002] RPA is an automation process technology that replaces manual execution of specific operations. It has the advantages of high efficiency and accuracy, can replace manual execution of repetitive operations, and use of the RPA process can achieve the purpose of saving manpower, improving efficiency and employee satisfaction. After determining an RPA process requirement, the developer needs to write an RPA process code according to the requirement, and then a computer program executes the process code to complete the corresponding operation process.

[0003] The RPA designer is used for RPA process design. The RPA designer can directly write RPA scripts or general programming language codes. When writing general programming language codes, compared with general and mature IDE development tools, the operation of the RPA designer is more complex and the development and debugging are not convenient, so some developers use mature third-party code writing tools to develop codes, and then use the RPA designer to call the codes copied from the third-party code writing tools. Although this can simplify the code development process, it needs to switch between the two tools, which will cause some trouble, and the encapsulated interface of the higher-level function in the RPA designer cannot be directly used in the third-party code writing tool, which will inevitably cause the problems of low efficiency, poor flexibility and poor expansibility in developing the RPA process. SUMMARY

[0004] In order to solve the problems in the prior art, the application provides an RPA code development method and system, which provides a running environment for the third-party IDE development tool. The IDE development tool can directly access the code file in the RPA designer for code development, and the RPA designer can automatically update and use the code. The RPA designer and the IDE development tool are used together, which not only utilizes the mature development function of the IDE, but also avoids the inconsistency that may be caused by switching the development tools, and takes into account the efficiency and convenience.

[0005] To solve the above technical problems, the application adopts the following technical means:

[0006] In a first aspect, the application provides an RPA code development method, which comprises the following steps:

[0007] An RPA project engineering is established by the RPA designer, and the RPA project engineering contains a first programming language RPA script subdirectory and a second programming language code subdirectory. The second programming language code subdirectory is used for storing code files developed by a specified second programming language.

[0008] creating a second programming language project engineering subdirectory compatible with the IDE development tool in the RPA project engineering;

[0009] Based on the RPA project engineering and the second programming language project engineering subdirectory, accessing the second programming language code subdirectory through the RPA designer or the IDE development tool, adding or modifying code files in the second programming language code subdirectory;

[0010] Monitoring the second programming language code subdirectory through a monitoring function, and automatically loading the modified code files when the code files in the second programming language code subdirectory are modified through the RPA designer or the IDE tool;

[0011] After the RPA code development is completed, an RPA process mixed with the first programming language RPA script and the second programming language code is obtained, and the RPA process is executed through the RPA executor to determine whether the RPA process runs normally.

[0012] In combination with the first aspect, further, the RPA designer is used to create an RPA flowchart, wherein the RPA flowchart includes a plurality of RPA components including a second programming language component, and the second programming language component is used to call the code files in the second programming language code subdirectory.

[0013] In combination with the first aspect, further, the RPA designer is used to write RPA components according to the RPA component specification and use the RPA components.

[0014] In combination with the first aspect, further, the code in the code files in the second programming language code subdirectory accesses, modifies and exchanges data with the RPA components according to the RPA component specification.

[0015] In combination with the first aspect, further, the RPA component specification includes an RPA component writing specification, and the RPA component writing specification includes:

[0016] Each RPA component has a plurality of attributes including a string representation of an RPA component name, an identification ID with uniqueness, and a path code representing a component path; each RPA component corresponds to a function, the function has a plurality of input interface parameters and a return value, the first interface parameter of the function is a specific context type object, and the return value of the function is a specific response type object.

[0017] In combination with the first aspect, further, the RPA component specification includes an RPA component usage specification, and the RPA component usage specification includes a read-write RPA component attribute specification:

[0018] According to the RPA component name, the identification ID, and the path code of the RPA component, the RPA component is searched, and the RPA component attribute is read or modified.

[0019] In combination with the first aspect, further, the RPA component specification includes RPA component data specification, and the RPA component data specification includes read-write RPA variable specification.

[0020] The RPA variable includes RPA global variable and RPA flow variable.

[0021] In combination with the first aspect, further, the second programming language project engineering subdirectory includes a project configuration file, and the project configuration file includes the project name, the entry address, the code file list, the resource file list, the library file list shared by the RPA project engineering, and the specified second programming language environment required for running the IDE development tool.

[0022] In combination with the first aspect, further, the code file in the second programming language code subdirectory is version managed, a new version number is generated after the code file in the second programming language code subdirectory is modified, and the modified code file is stored based on the new version number and the code file modification time.

[0023] The second aspect discloses an RPA code development system, which includes:

[0024] The RPA project engineering creation module is used for establishing an RPA project engineering through an RPA designer and creating a second programming language project engineering subdirectory compatible with an IDE development tool in the RPA project engineering, and the RPA project engineering includes a first programming language RPA script subdirectory and a second programming language code subdirectory, wherein the second programming language code subdirectory is used for storing code files developed by a specified second programming language.

[0025] The code monitoring module is used for monitoring the second programming language code subdirectory through a monitoring function, and sending a notification to the RPA designer or the IDE development tool after the code file in the second programming language code subdirectory is modified.

[0026] The RPA designer is used for accessing the second programming language code subdirectory, adding or modifying the code file in the second programming language code subdirectory, and automatically loading the modified code file according to the notification of the code monitoring module.

[0027] The IDE development tool is used for accessing the second programming language code subdirectory through a running environment provided by the second programming language project engineering subdirectory, adding or modifying the code file in the second programming language code subdirectory, and automatically loading the modified code file according to the notification of the code monitoring module.

[0028] The following advantages can be obtained by using the above technical means:

[0029] The present application provides an RPA code development method and system, an RPA project is created in the RPA designer, and a second programming language project subdirectory compatible with the IDE development tool is created under the project, the RPA project supports both RPA designer running and IDE development tool running, so that the RPA designer and the IDE development tool are used together, and the RPA designer and the IDE development tool can access the second programming language code subdirectory for code development, in actual use, code files can be added or modified through the IDE development tool, which simplifies the RPA code development operation, improves the RPA code development efficiency, and realizes the technical effect of using the IDE development tool for code development in the RPA designer. In the present application, the code files in the second programming language code subdirectory are monitored in real time through the monitoring function, and when the code files change, the RPA designer synchronously updates the latest code files, since the code files are stored in the project file of the RPA designer, and the RPA designer automatically calls the modified code files, so that the RPA designer calling the code will not appear inconsistent or time difference, ensuring the normal operation of the RPA process, in addition, the IDE development tool can also synchronously update the latest code files, ensuring that the latest version code is used when the code is modified by the IDE development tool, improving the accuracy of code development. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 The steps of the RPA code development method of the present application are shown in the flowchart.

[0031] Figure 2 The structure of the RPA code development system of the present application is shown in the schematic diagram. DETAILED DESCRIPTION

[0032] The technical solutions of the present application will be further described below in combination with the drawings:

[0033] Example 1:

[0034] The present application provides an RPA code development method, as shown in Figure 1 The steps are as follows (in the embodiments of the present application, steps A~E do not represent the operation sequence of the method of the present application, but are only used to distinguish different steps):

[0035] Step A, an RPA project is established by the RPA designer. The RPA project mainly includes process design files, development resource files, and integrated localization management packages of third-party development packages, which is a static project collection.

[0036] In the RPA project engineering, a plurality of directories are included, specifically including a first programming language RPA script subdirectory, a second programming language code subdirectory and other subdirectories, wherein the first programming language RPA script subdirectory is used to store the RPA script developed by the first programming language, and the second programming language code subdirectory is used to store the code file developed by the specified second programming language, and the second programming language code subdirectory allows the RPA designer and the IDE development tool to access. The second programming language refers to any general programming language, such as python,.net, and the RPA designer and the IDE development tool are also arbitrary. In the embodiment of the application, the specified second programming language is Python, the RPA designer is iS-RPA designer, and the IDE development tool is Pycharm.

[0037] After the RPA project engineering is established using the RPA designer, the developer creates an RPA flowchart using the RPA designer, wherein the RPA flowchart is composed of a plurality of RPA components connected including a second programming language component, each RPA component can be an RPA script or a code, and each RPA component includes a sub-method, and the sub-method has a corresponding action, and the sub-method is called to execute the action to achieve the expected target of the RPA component. For example, there are three steps in an RPA flow, namely, grabbing web page data, calling code to process the data, and saving the processed result. Among them, “grabbing web page data” corresponds to two RPA components, opening a browser and extracting structured data; data processing corresponds to a “code block” component; and saving the processed result corresponds to a “save file” component.

[0038] Step B, creating a second programming language project engineering subdirectory compatible with the IDE development tool in the RPA project engineering.

[0039] The second programming language project engineering subdirectory has a project configuration file, including the project name, entry address of the RPA project engineering, code file list, resource file list and library file list shared by the RPA project engineering, the format of the project configuration file conforms to the development standard format of the IDE development tool, and the specified second programming language environment (such as python environment) required for running the IDE development tool exists, and the IDE development tool can open the RPA project engineering through the second programming language project engineering subdirectory to obtain the same running environment and code as the RPA project. The code file list, resource file list and library file list are used to store the file names of the code file, resource file and library file. In this embodiment, the RPA designer creates the.idea directory, which includes the default configuration file workspace.xml, wherein the workspace.xml includes the code file list, library file list and resource file list.

[0040] Step C, based on the RPA project engineering and the second programming language project engineering subdirectory, access the second programming language code subdirectory through the RPA designer or the IDE development tool to increase or modify the code files in the second programming language code subdirectory.

[0041] In the embodiments of the present application, the second programming language component (such as a Python module) in the RPA flowchart itself supports the opening of the IDE development tool, and can execute specific code at the RPA flow runtime, so that the function of using the RPA designer and the IDE development tool to increase or modify the code files can be realized through the second programming language component.

[0042] When the RPA designer is used to increase or modify the code files, RPA components are added in the RPA flowchart, corresponding second programming language files are generated, and the second programming language code written by the developer is stored, wherein a plurality of RPA components can correspond to the same second programming language file.

[0043] When the IDE tool is used to increase or modify the code files, the code is written according to the general programming language program development method, but when the RPA component is involved, the RPA component specification needs to be followed, and the code in the code files in the second programming language code subdirectory accesses, modifies and exchanges data with the RPA component according to the RPA component specification. The RPA component specification can ensure that the code developed by the IDE development tool is consistent with the code developed by the RPA designer, and ensure that the RPA designer, RPA executor and the like can normally call the code.

[0044] The RPA component specification includes RPA component writing specification, RPA component usage specification, RPA component data specification and the like.

[0045] The RPA component writing specification includes that each RPA component has a plurality of attributes, including a string representation of the RPA component name (which can be in Chinese and English), an identification ID with uniqueness, and a path code (which can only be English and can be used as a variable) representing the component path. Each RPA component corresponds to a function, which has a plurality of input interface parameters and a return value. The first interface parameter of the function is a specific context type object, and the return value of the function is a specific response type object.

[0046] The RPA component usage specification further comprises a read-write RPA component attribute specification, and the content of the read-write RPA component attribute specification is as follows: according to the RPA component name, the identification ID and the path code of the RPA component, the RPA component is regarded as an object, a corresponding action is executed by calling a sub-method of the RPA component, and a sub-attribute of the RPA component is read or modified, wherein the sub-attribute comprises the name, color, position and size of the RPA component, and then the attribute of the RPA component is read or modified, wherein the sub-method needs to be selected according to the actual RPA component and read-write requirements.

[0047] The RPA component data specification further comprises a read-write RPA variable specification, and the content of the read-write RPA variable specification is as follows: RPA variables are read and written through a preset interface, the RPA variables comprise RPA global variables and RPA flow variables, wherein the RPA variables are data in a code file in a second programming language code subdirectory, the RPA global variables are long-term saved data, and the RPA flow variables are real-time saved data in an RPA flow execution process and are automatically destroyed after the current flow ends.

[0048] In the embodiment of the application, the read operation of the RPA global variable is to call a function: is_resource.get_global_var, wherein is_resource is a global variable of the current RPA designer, and all read-write operations of data are contained in the object. Assuming that the global variable gv_1 is to be read, it can be written as: gv_1 = is_resource.get_global_var("gv_1"); the write operation of the RPA global variable is to call a function: is_resource.set_global_var, and assuming that the value of the global variable gv_1 is to be written, it can be written as: gv_1 = is_resource.set_global_var("gv_1", "gv_1 new value"). The read operation of the RPA flow variable is to call functions: is_resource.get_flow_var and is_resource.set_flow_var, for example, the value of the RPA flow variable lv_1 is read as: lv_1 = is_resource.get_flow_var("lv_1"), and the value of the RPA flow variable lv_1 is written as: lv_1 = is_resource.set_flow_var("lv_1", "lv_1 new value").

[0049] In the above RPA process, the data extraction step saves the data to the RPA process variable lv_1; in the python code file, the original data extracted in the previous step is obtained by calling is_resource.get_flow_var(“lv_1”), and after processing, is_resource.set_flow_var(“lv_1”, the processed result) is called to store the RPA process variable. In this way, the “save file” component behind can obtain the processed result by reading the process variable lv_1, and store it into the file.

[0050] Since the code written in the IDE development tool complies with the RPA component specification, the code written in the IDE development tool and the code written in the RPA designer have the same execution result in the RPA designer. In addition, when executing the RPA process, the RPA process can directly call the code file in the second programming language code subdirectory, and since it uses a preset interface to access component properties and RPA variables, no execution exception occurs and consistent execution can be performed.

[0051] Step D, monitor the second programming language code subdirectory through the monitoring function, and when the code file in the second programming language code subdirectory is modified, automatically load the modified code file through the RPA designer.

[0052] The application manages the version of the code file in the second programming language code subdirectory, generates a new version number when the code file in the second programming language code subdirectory is modified, and stores the modified code file based on the new version number and the code file modification time.

[0053] The RPA designer monitors all files and subdirectories under the RPA project engineering through the monitoring function provided by the operating system, and focuses on monitoring the code file modification time in the second programming language code subdirectory. When detecting that the code file has been updated, the RPA designer automatically reloads the corresponding code and data. In addition, if the code file is modified through the RPA designer, the IDE tool also detects the code file content change through the monitoring function, and if there is a change, the RPA designer modified code and data are automatically reloaded to ensure that the edited code file is the latest version. In this embodiment, the RPA designer realizes file system monitoring through the python library watchdog.

[0054] Step E, after the RPA code development is completed (in the case that the existing code development has been completed and does not need to be modified temporarily), the code file developed in the second programming language is mixed with the RPA script developed in the first programming language to obtain the RPA process, and the RPA process is executed through the RPA executor to determine whether the RPA process runs normally.

[0055] Embodiment 2:

[0056] The present application provides an RPA code development system for implementing the method in embodiment 1, as shown in Figure 2 The RPA code development system includes an RPA project engineering creation module, a code monitoring module, an RPA designer, and an IDE development tool.

[0057] The RPA project engineering creation module is mainly used to establish an RPA project engineering through the RPA designer according to the RPA code development requirements, and create a second programming language project engineering subdirectory compatible with the IDE development tool in the RPA project engineering. The RPA project engineering contains a first programming language RPA script subdirectory, a second programming language code subdirectory, and other subdirectories. The first programming language RPA script subdirectory is used to store the RPA script developed by the first programming language, and the second programming language code subdirectory is used to store the code file developed by the specified second programming language. The second programming language project engineering subdirectory saves a project configuration file, including the project name, entry address of the RPA project engineering, the code file list, resource file list, and library file list shared by the RPA project engineering, and the specified second programming language environment (such as python environment) required for running the IDE development tool. The IDE development tool can open the RPA project engineering through the second programming language project engineering subdirectory to obtain the same running environment and code as the RPA project.

[0058] The code monitoring module is mainly used to monitor the second programming language code subdirectory through a monitoring function. When the code file in the second programming language code subdirectory is modified, a notification is sent to the RPA designer or the IDE development tool. In the present application, version management is performed on the code file in the second programming language code subdirectory. When the code file is modified, a new version number is generated, and the modified code file is stored based on the new version number and the code file modification time. The code monitoring module monitors the code file modification time in the second programming language code subdirectory in real time through the monitoring function provided by the operating system. When it is detected that the code file is updated, the RPA designer and the IDE development tool are notified to load the new version code.

[0059] The RPA designer is used to access the second programming language code subdirectory on one hand to add or modify the code file in the second programming language code subdirectory, and on the other hand to automatically load the modified code file according to the notification of the code monitoring module. It is also used to create an RPA flowchart, write RPA components according to the RPA component specification, and use the RPA components.

[0060] The IDE development tool is used for accessing the second programming language code subdirectory through a running environment provided by the second programming language project engineering subdirectory, adding or modifying code files in the second programming language code subdirectory, and complying with the RPA component specification when accessing, modifying and exchanging data with the RPA component.

[0061] Compared with the prior art, the RPA project engineering is created in the RPA designer, and the second programming language project engineering subdirectory compatible with the IDE development tool is created under the engineering, and the RPA project engineering supports the running of the RPA designer and the running of the IDE development tool, so that the RPA designer and the IDE development tool are mixed for use, the RPA designer and the IDE development tool can access the second programming language code subdirectory and develop the code, the code files can be added or modified through the IDE development tool in actual application, the RPA code development operation is simplified, the RPA code development efficiency is improved, and the technical effect of developing the code by using the IDE development tool in the RPA designer is achieved. In the application, the code files in the second programming language code subdirectory are monitored in real time through the monitoring function, the RPA designer synchronously updates the latest code files when the code files change, the code files are stored in the RPA designer engineering file, and the RPA designer automatically calls the modified code files, so that the RPA designer does not have inconsistency or time difference when calling the code, the normal running of the RPA process is ensured, and in addition, the IDE development tool can synchronously update the latest code files, so that the latest version code is used when the code is modified by the IDE development tool, and the code development accuracy is improved.

[0062] The above only describes the preferred embodiments of the application, and it should be noted that those skilled in the art can make some improvements and modifications without departing from the technical principles of the application, and these improvements and modifications should also be considered as the protection scope of the application.

Claims

1. A method of RPA code development, characterized by, Comprising the following steps: An RPA project engineering is established through the RPA designer, which contains a first programming language RPA script subdirectory and a second programming language code subdirectory, wherein the second programming language code subdirectory is used to store code files developed in the specified second programming language; A second programming language project engineering subdirectory compatible with the IDE development tool is created in the RPA project engineering; Based on the RPA project engineering and the second programming language project engineering subdirectory, the second programming language code subdirectory is accessed through the RPA designer or the IDE development tool, and the code files in the second programming language code subdirectory are added or modified; The second programming language code subdirectory is monitored through a monitoring function, and when the code files in the second programming language code subdirectory are modified, the modified code files are automatically loaded through the RPA designer or the IDE tool; After the RPA code development is completed, an RPA process mixed with the first programming language RPA script and the second programming language code is obtained, and the RPA process is executed through the RPA executor to determine whether the RPA process runs normally. The second programming language project engineering subdirectory includes a project configuration file, which contains the project name, entry address of the RPA project engineering, code file list, resource file list, and library file list shared with the RPA project engineering, and the specified second programming language environment required for running the IDE development tool.

2. The RPA code development method of claim 1, wherein, Further comprising: An RPA flowchart is created through the RPA designer, wherein the RPA flowchart includes multiple RPA components including a second programming language component, and the second programming language component is used to call the code files in the second programming language code subdirectory. 3.The RPA code development method of claim 2, wherein, Through the RPA designer, RPA components are written according to the RPA component specification, and the RPA components are used. 4.The RPA code development method of claim 2, wherein, The code in the code files in the second programming language code subdirectory accesses, modifies, and exchanges data with the RPA components according to the RPA component specification.

5. The RPA code development method of claim 3 or 4, wherein, The RPA component specification includes RPA component writing specification, which includes: Each RPA component has multiple attributes, including a string representation of the RPA component name, a unique identification ID, and a path code representing the component path; each RPA component corresponds to a function, which has multiple input interface parameters and a return value, the first interface parameter of the function is a specific context type object, and the return value of the function is a specific response type object.

6. The RPA code development method of claim 3 or 4, wherein, The RPA component specification includes RPA component usage specification, which includes RPA component attribute reading and writing specification: The RPA component is found according to the RPA component name, identification ID, and path code code of the RPA component, and the RPA component attribute is read or modified.

7. The RPA code development method of claim 3 or 4, wherein, The RPA component specification includes RPA component data specification, which includes RPA variable reading and writing specification: RPA variables are read and written through a preset interface, and the RPA variables include RPA global variables and RPA process variables.

8. The RPA code development method of claim 1, wherein, The code files in the second programming language code subdirectory are version managed, and when the code files in the second programming language code subdirectory are modified, a new version number is generated, and the modified code files are stored based on the new version number and the modification time of the code files.

9. An RPA code development system, characterized by, Comprise: The RPA project engineering creation module is used for establishing an RPA project engineering through an RPA designer, and creating a second programming language project engineering subdirectory compatible with an IDE development tool in the RPA project engineering, the RPA project engineering containing a first programming language RPA script subdirectory and a second programming language code subdirectory, wherein the second programming language code subdirectory is used for storing code files developed by a specified second programming language; The code monitoring module is used for monitoring the second programming language code subdirectory through a monitoring function, and sending a notification to the RPA designer or the IDE development tool when the code files in the second programming language code subdirectory are modified; The RPA designer is used for accessing the second programming language code subdirectory, adding or modifying the code files in the second programming language code subdirectory, and automatically loading the modified code files according to the notification of the code monitoring module; The IDE development tool is used for accessing the second programming language code subdirectory through a running environment provided by the second programming language project engineering subdirectory, adding or modifying the code files in the second programming language code subdirectory, and automatically loading the modified code files according to the notification of the code monitoring module; The second programming language project engineering subdirectory comprises a project configuration file, and the project configuration file contains a project name, an entry address, a code file list, a resource file list and a library file list shared by the RPA project engineering, and a specified second programming language environment required for running the IDE development tool.

Citation Information

Patent Citations

  • Triggering operation method based on RPA robot

    CN113885856A

  • Program development assisting method and device and electronic equipment

    CN114489613A