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 02-02-2009, 12:32 PM
rahul rahul is offline
Junior Member
 
Join Date: Dec 2008
Posts: 11
Default On Error - Exit only the loop not task.

How can the control be still in the same task even if there is an error caught by the error handler. I need to just need to exit a loop in case of an error. Is there any option to achive this.

please sugest.

Thanks
Reply With Quote
  #2 (permalink)  
Old 02-03-2009, 04:10 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,342
Default

Hello,

It can be done using Automation Anywhere. What you have to do is,

. Create a variable that would read value from a text file.
. Using Log to File command initialize that variable with any value say 'False'.
. In Error Handling command, select option to log to a file in case of error and change the value of that variable to say 'True'.
. Inside loop, using 'If Variable' command check if the variable value is 'True' then exit the loop using Exit Loop command.

We have attached a sample task for your reference. Please copy it under location, 'C:\...\My Documents\Automation Anywhere\Automation Anywhere\My Tasks' folder.

Before running this task create variable, $ErrStatus$ that reads value from a text file.
Note: variables are case-sensitive.

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. ErrStatus.
4. Select 'Read from text file' radio button or option.
5. In 'Value' field, specify the path of text file i.e c:\Temp.txt.
6. Press 'Save' button.
7. Press 'Ok' button.

Now run the task. This task would enter data into a notepad file in a loop. You need to close the notepad file after few iterations of loop in order to create an error. As soon as the error would be generated the task would come out of the loop.

Hope that helps.
Attached Files
File Type: zip Sample4Rahul.zip (648 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 10:05 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