[Turn] UiPath practice lessons learned (ii)

This switched: https://www.cnblogs.com/ybyebo/p/10086473.html

1.       UI operations vulnerable to all kinds of unexpected interference, and should shorten the overall time UI operation phase. In order to shorten the overall time UI operating phases, should UI operate together as far as possible, the various operations in the background as much as possible before and after the UI operations. For example, there is now a Assign and two Click need to be performed, then the design is more recommended Assign-> Click-> Click or Click-> Click-> Assign, rather than Click-> Assign-> Click. Centralized UI operations will be giving a "robot very efficient" perception, leaving a more favorable impression.

2. In order to ensure that the "doubling of investment must be a corresponding doubling of efficiency," the overall design process to try to be transformed into the transactional ( mode processing Transactional). What does it mean? Suppose now have a Excel spreadsheet recorded the guest list, the robot to read this list, each guest generate a Word invitations, then sent by mail. There is a process design idea is that the robot reads the guest list after ABC, for the A generates invitation -> to B generates invitation -> to C generate invitations -> to send the message A -> to send the message B -> to a C mail. This process design pattern although there is no wrong on logic, but split the workload multi-robot work together is relatively difficult, it is difficult to ensure that "increased N times the number of robots can be a corresponding increase in N times the processing power." Thus, it should be possible for the process design, the robot reads the guest list after ABC, for the A generates invitation -> to send the message A -> is B generates invitation -> to send the message B -> to C generate invitations -> toC send the message. Can be seen in this example, a transaction with "invitation to generate a" and "Send a message corresponding" two operations. Only operations in the transaction was successful in all, it can be determined that the transaction is successful. Otherwise, any operations in the transaction fails, that finds the transaction fails. May suspend the transaction fails to run, you can skip the failed transaction, continues to run the next transaction. When the number of robots, just by simply allocating the transaction, to achieve full use of robot performance.

3. Those who link the need for manual input, it must be wrong, it is absolutely manually entered data can not be trusted. So the problem for manual input, there are several ways to improve the stability.

a. strict constraints on the manual input and verification, reject data does not meet the requirements. (Not recommended, but sometimes had to do it)

b. adding some flexibility to design the ability to achieve fault tolerance.

C. to reduce manual input links, reduce the amount of manual data entry.

D. tried to assist possible manual input, such as pop-up tips, etc. Examples of the format are given.

4. When you need to deal with file relationships, there are several ways to reflect the association between files:

a. with some naming rules to ensure that the file association. For example, there is an Excel file is called the Little Ming _ total score .xlsx, while another Excel file as Xiao Ming _ language scores .xlsx, naming this file is "Student Name _ subjects at Grade .xlsx", you can think Xiao Ming _ total score .xlsx and Xiao Ming _ language achievement .xlsx is related files.

b. Establish a relationship table for storing files. Such files can find through this table, you do not need to specify the particular naming convention. such as

student name

Total score of file

Language performance file

Hsiao Ming

AAA.xlsx

BBB.xlsx

Red

CCC.xlsx

DDD.xlsx

5.       UiPath Studio project files in each directory to publish will accordingly when the new UiPath Robot, requiring persistent data (such as configuration files) should not be stored in the memory of UiPath Studio project directory. Recommended Get Environment Folder (UiPath.Core.Activities.GetEnvironmentFolder) stored in the system comes with a folder (recommended to save MyDocuments).

6. robots often need to be able to automatically log a variety of systems, and a variety of systems often requires credentials (username + password) to log in. Login credentials can be saved in the Windows built-in Credential Manager, and then use the Get Secure Credential (UiPath.Credentials.Activities.GetSecureCredential) to read. Do not use when you need to enter a password Type Into, must use the Text Type Secure. Using a combination Get Secure Credential + Type Secure Text, the robot can be done without contacting the whole plaintext password, relatively safe.

7. Get Text or original content Get Attribute taken from the pages should be saved to a log in order to facilitate troubleshooting Log Message.

8. Fill in Excel URL will be automatically converted into a hyperlink, but if UiPath need to read this URL, you will need to remove the hyperlink, otherwise it will error.

9. Note that the production environment and development, differences in test environment, easily lead to an unexpected exception. As a result, in general, the time required for development processes ≈ adjust the desired stability time ≈ time required to migrate to the new environment testing and adjusting. Any changes in environmental factors need to re-tested to ensure stability.

10. When added to source control, UiPath Studio in the project directory contents of .screenshots must all join the source code management.

11. Each run needs to save a copy of a configuration file for future reference wrong.

12. If you need to create a custom log, the initial step in the process of running the existing "C: \ Users \ your user name \ AppData \ Local \ UiPath \ Logs \ Date _Execution.log" get rid of the file name, and then run by log Message journaling. UiPath will automatically create a new log file, then the last copy of the log file in the run up to. Custom log work can be simplified in this way, the log level and may be changed as necessary to get more information for troubleshooting.

13. long process, may be divided into a plurality of development stages, each stage of the process with a .xaml file handle. The principle of division generally, a document given the robot A, the robot through the stage UI or background processing, will be able to generate a file B. Then only need to complete this path A as an input parameter .xaml file and the full path B as an output parameter, you can easily develop and debug the process. When people come together with a collaborative development process, so long as the process is divided into a plurality of small, detailed and agreed to the contents of a good intermediate file, can be carried out simultaneously. This approach is also referred to as "programming to an interface."

14. When the RPA project team has developed more than when, in charge of a process of organizational model person may result in each process are endless long situation. Not as good as a single process is divided into smaller processes, co-developed with a process so that the team can complete the process as much as possible within the expected time, rather than making a lot of uneven degree of completion of the process. In particular, the team members do not need to understand the whole picture of the process, only a partial understanding of the process can achieve streamlined development and management. The process for members to master the most comprehensive, less can undertake some development work, but need to be responsible for continuous integration testing by the person responsible for the delivery of a complete UiPath Project.

15. Editing When Selector, to take advantage of the relative Selector portion and Selector, e.g. Records Base, the Element the Scope, the Find the Element Relative, the Get the Ancestor.

16. It should be added initially developed any Try Catch, tests found to produce Exception location, and type of Exception, and processed accordingly. Even really need to add logic to realize Try Catch, also avoid direct Catch System.Exception, to prevent outside expectations Exception type can not correctly handle the Catch. But in the end must be one of the outermost jacket Try Catch, to deal with outside expectations Exception.

17. A   the Get the Text data is acquired UiPath.Core.GenericValue type, the time required for a particular output format string, try using the Format the Value ( UiPath.Core.Activities.FormatValue).

18. Most RPA using only the data processing arts scene variant ETL work, it can be as much as possible reference ETL design ideas and useful experience.

19.   Each Activity must be named, must be added if necessary Annotation be an explanation. Parameters and variables as well.

1.       UI operations vulnerable to all kinds of unexpected interference, and should shorten the overall time UI operation phase. In order to shorten the overall time UI operating phases, should UI operate together as far as possible, the various operations in the background as much as possible before and after the UI operations. For example, there is now a Assign and two Click need to be performed, then the design is more recommended Assign-> Click-> Click or Click-> Click-> Assign, rather than Click-> Assign-> Click. Centralized UI operations will be giving a "robot very efficient" perception, leaving a more favorable impression.

2. In order to ensure that the "doubling of investment must be a corresponding doubling of efficiency," the overall design process to try to be transformed into the transactional ( mode processing Transactional). What does it mean? Suppose now have a Excel spreadsheet recorded the guest list, the robot to read this list, each guest generate a Word invitations, then sent by mail. There is a process design idea is that the robot reads the guest list after ABC, for the A generates invitation -> to B generates invitation -> to C generate invitations -> to send the message A -> to send the message B -> to a C mail. This process design pattern although there is no wrong on logic, but split the workload multi-robot work together is relatively difficult, it is difficult to ensure that "increased N times the number of robots can be a corresponding increase in N times the processing power." Thus, it should be possible for the process design, the robot reads the guest list after ABC, for the A generates invitation -> to send the message A -> is B generates invitation -> to send the message B -> to C generate invitations -> toC send the message. Can be seen in this example, a transaction with "invitation to generate a" and "Send a message corresponding" two operations. Only operations in the transaction was successful in all, it can be determined that the transaction is successful. Otherwise, any operations in the transaction fails, that finds the transaction fails. May suspend the transaction fails to run, you can skip the failed transaction, continues to run the next transaction. When the number of robots, just by simply allocating the transaction, to achieve full use of robot performance.

3. Those who link the need for manual input, it must be wrong, it is absolutely manually entered data can not be trusted. So the problem for manual input, there are several ways to improve the stability.

a. strict constraints on the manual input and verification, reject data does not meet the requirements. (Not recommended, but sometimes had to do it)

b. adding some flexibility to design the ability to achieve fault tolerance.

C. to reduce manual input links, reduce the amount of manual data entry.

D. tried to assist possible manual input, such as pop-up tips, etc. Examples of the format are given.

4. When you need to deal with file relationships, there are several ways to reflect the association between files:

a. with some naming rules to ensure that the file association. For example, there is an Excel file is called the Little Ming _ total score .xlsx, while another Excel file as Xiao Ming _ language scores .xlsx, naming this file is "Student Name _ subjects at Grade .xlsx", you can think Xiao Ming _ total score .xlsx and Xiao Ming _ language achievement .xlsx is related files.

b. Establish a relationship table for storing files. Such files can find through this table, you do not need to specify the particular naming convention. such as

student name

Total score of file

Language performance file

Hsiao Ming

AAA.xlsx

BBB.xlsx

Red

CCC.xlsx

DDD.xlsx

5.       UiPath Studio project files in each directory to publish will accordingly when the new UiPath Robot, requiring persistent data (such as configuration files) should not be stored in the memory of UiPath Studio project directory. Recommended Get Environment Folder (UiPath.Core.Activities.GetEnvironmentFolder) stored in the system comes with a folder (recommended to save MyDocuments).

6. robots often need to be able to automatically log a variety of systems, and a variety of systems often requires credentials (username + password) to log in. Login credentials can be saved in the Windows built-in Credential Manager, and then use the Get Secure Credential (UiPath.Credentials.Activities.GetSecureCredential) to read. Do not use when you need to enter a password Type Into, must use the Text Type Secure. Using a combination Get Secure Credential + Type Secure Text, the robot can be done without contacting the whole plaintext password, relatively safe.

7. Get Text or original content Get Attribute taken from the pages should be saved to a log in order to facilitate troubleshooting Log Message.

8. Fill in Excel URL will be automatically converted into a hyperlink, but if UiPath need to read this URL, you will need to remove the hyperlink, otherwise it will error.

9. Note that the production environment and development, differences in test environment, easily lead to an unexpected exception. As a result, in general, the time required for development processes ≈ adjust the desired stability time ≈ time required to migrate to the new environment testing and adjusting. Any changes in environmental factors need to re-tested to ensure stability.

10. When added to source control, UiPath Studio in the project directory contents of .screenshots must all join the source code management.

11. Each run needs to save a copy of a configuration file for future reference wrong.

12. If you need to create a custom log, the initial step in the process of running the existing "C: \ Users \ your user name \ AppData \ Local \ UiPath \ Logs \ Date _Execution.log" get rid of the file name, and then run by log Message journaling. UiPath will automatically create a new log file, then the last copy of the log file in the run up to. Custom log work can be simplified in this way, the log level and may be changed as necessary to get more information for troubleshooting.

13. long process, may be divided into a plurality of development stages, each stage of the process with a .xaml file handle. The principle of division generally, a document given the robot A, the robot through the stage UI or background processing, will be able to generate a file B. Then only need to complete this path A as an input parameter .xaml file and the full path B as an output parameter, you can easily develop and debug the process. When people come together with a collaborative development process, so long as the process is divided into a plurality of small, detailed and agreed to the contents of a good intermediate file, can be carried out simultaneously. This approach is also referred to as "programming to an interface."

14. When the RPA project team has developed more than when, in charge of a process of organizational model person may result in each process are endless long situation. Not as good as a single process is divided into smaller processes, co-developed with a process so that the team can complete the process as much as possible within the expected time, rather than making a lot of uneven degree of completion of the process. In particular, the team members do not need to understand the whole picture of the process, only a partial understanding of the process can achieve streamlined development and management. The process for members to master the most comprehensive, less can undertake some development work, but need to be responsible for continuous integration testing by the person responsible for the delivery of a complete UiPath Project.

15. Editing When Selector, to take advantage of the relative Selector portion and Selector, e.g. Records Base, the Element the Scope, the Find the Element Relative, the Get the Ancestor.

16. It should be added initially developed any Try Catch, tests found to produce Exception location, and type of Exception, and processed accordingly. Even really need to add logic to realize Try Catch, also avoid direct Catch System.Exception, to prevent outside expectations Exception type can not correctly handle the Catch. But in the end must be one of the outermost jacket Try Catch, to deal with outside expectations Exception.

17. A   the Get the Text data is acquired UiPath.Core.GenericValue type, the time required for a particular output format string, try using the Format the Value ( UiPath.Core.Activities.FormatValue).

18. Most RPA using only the data processing arts scene variant ETL work, it can be as much as possible reference ETL design ideas and useful experience.

19.   Each Activity must be named, must be added if necessary Annotation be an explanation. Parameters and variables as well.

Guess you like

Origin www.cnblogs.com/freeliver54/p/11408380.html