![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
Many of the automations I create involve the use of EXE's and get distributed to other desktops. I'm creating log files to catch errors but the end user doesn't get any feedback when a task fails. You can specify a task to run on the begin error handling command but that task isn't packaged up with the EXE. Other than a second task monitoring for log files is there a way to get a message out to the end user when error handling ends a task? |
| |||
|
Hello, When an error occurs, you can log the Error Line No. and Description using 'Log data in a file' option of Begin Error Handling command. Automation Anywhere will create a new log file if it does not already exist. You can also specify custom text to be included in the log file. You can optionally add a timestamp to the log file. After End Error Handling command you can open this log file to see the error message. To get around the issue, task isn't packaged up with the EXE. You will have to use a log file as a variable. You can assign the error line number to a variable that reads the data from a text file say $GlobalVar$. After End Error Handling command, you can check if $GlobalVar$ is less than the line number at which End Error Handling command is present then run that specific task using 'Run Task' command. Task specified in 'Run Task' command can be packaged with EXE. We have attached a sample task for your reference. Please follow below mentioned steps carefully to run the task and exe of task. . Please copy attached tasks under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder. . Create a variable, $GlobalVar$, which reads value from a text file. To create a variable that read from text file, please follow below mentioned steps: 1. Go to Tools->Variable Manager in Automation Anywhere. 2. Click on 'Add New Variable'. 3. In 'Name' field, enter variable name i.e. GlobalVar. 4. Select 'Read from text file' radio button or option. 5. In 'Value' field, specify the path of text file i.e. c:\Abc.txt. 6. Press 'Save' button. 7. Press 'Ok' button. . Create Exe of task, IfFail_Rundtask.atmn. Run the exe. This exe would run the task, IfFail_Rundtask.atmn. It will not find ‘Sample Tasks’ window so an error would be produced. Error handler will log the error line number and error description in C:\Abc.txt then it would run the task, subtask.atmn and eventually will open Abc.txt to show the logged error. Now, run the same exe on different machine or rename subtask.atmn and run the exe again. The same behaviour would be exhibited. The exe would still run the task, subtask.atmn. Hope that helps. |
![]() |
| Thread Tools | |
| Display Modes | |
| |