Intelligent Automation & Macro Software  

Go Back   Automation Anywhere, Inc. Forums > Products Zone > Automation Anywhere
Register FAQ Search Today's Posts Mark Forums Read

Automation Anywhere Post messages and questions related to Automation Software here.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-26-2008, 02:33 PM
kylepyro kylepyro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 28
Cool Error Handling in EXE's

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?
Reply With Quote
  #2 (permalink)  
Old 12-26-2008, 11:38 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

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.
Attached Files
File Type: zip Tasks.zip (863 Bytes, 6 views)
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -7. The time now is 09:35 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2011 Automation Anywhere, Inc. All rights reserved