Intelligent Automation & Macro Software  

Go Back   Tethys Solutions Forums > Products Zone > Automation Anywhere Server
Register FAQ Search Today's Posts Mark Forums Read

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


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-28-2009, 01:04 PM
kylepyro kylepyro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 26
Cool Simple rename not functioning

We recently switched over to server version and I'm getting intermitent results from tasks now.

I've uploaded the task for reference. Statement 85 is a simple rename on a file. Statement 94 is a copy for that renamed file to a new location. The task records errors in a log and it shows an error at statement 94, being unable to copy the file. The reason is its expecting the file to be named according to the rename in stmt 84, but this statement doesn't appear to execute and it doesn't record an error.

You'll see a message box at stmt 83 and another at 92. I get both of these messages. The rename isn't conditional, so it should just run, but I don't get a renamed file.

I had this problem with this script last week and wound up "fixing it" by deleting and re-adding the line. That hasn't helped this time. I've reboot, stopped my anti-virus and shut down unnecessary applications.

any ideas would be appreciated.
Attached Files
File Type: txt delivery_note_index.txt (10.5 KB, 17 views)
File Type: txt Delivery_Note_Index_Log.txt (95 Bytes, 6 views)
Reply With Quote
  #2 (permalink)  
Old 09-29-2009, 04:24 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,337
Default

Hello,

To get the path of the folder where the file is stored (inside 'Loop for each file in a folder') use the system variable $CurrentDirectory$. The text format of task would appear something like this,


Start Loop " Each File in $LocalPath$"

Rename Files "$CurrentDirectory$\$FileName$.$Extension$" to "$FileName$_DEL_NOTE.$Extension$"

Copy Files "$CurrentDirectory$\$FileName$_DEL_NOTE.$Extension $" to "$NetworkPath$\$SellingYear$\$SellingSeason$\"

End Loop

Hence, in 'Rename Files' and 'Copy Files' you need to replace variable, $LocalPath$ with $CurrentDirectory$.

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 09-30-2009, 09:41 AM
kylepyro kylepyro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 26
Default Simple Rename

ok - well I guess I have several thoughts about that.

1) I re-downloaded the task from the server with the exact same code and it performs properly now.

2) If the variable $LocalPath$ didn't contain the correct value then the file wouldn't be found and the task should encounter an error, post a log entry in its error log and terminate. It doesn't do that. It just ignores the statement. I know it hits this statment because of the various things I've done to debug it. I see it hitting the statements just prior to and subsequent to the rename.

3) I use this method, rename and then copy with this $LocalPath$ variable in other tasks, so I know this is a valid technique, unless your stating that there is something special about the rename function itself or something unreliable about the engine interpreting this code. This is the only task I have that encounters this problem and even its fixed now by visually identical code.

I can do the rename manually, so I know its not a windows rights problem. Any other ideas?
Reply With Quote
  #4 (permalink)  
Old 10-01-2009, 11:42 PM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,337
Default

Hello,

This is very strange as we have never heard or seen such type of behaviour before. However, let us investigate.

Is it possible due to some reason the Rename Files command taking little long to rename the file and meanwhile the task executed Copy Files command and hence the error.

To check this you can insert 'Loop while File does not exists' command after Rename Files command and inside loop block you can log the status say 'File not renamed' in a text file. Once, the file would be renamed the task will come out of the loop to execute the next statements in task after 'End Loop'.
You can then log the status as 'File renamed' then put 'Copy Files' command.

The text format of task would appear something like this,

Rename Files "$LocalPath$\$FileName$.$Extension$" to "$FileName$_DEL_NOTE.$Extension$"

Loop While File Does Not Exist("$LocalPath$\$FileName$_DEL_NOTE.$Extension$ "")

Log to File: File isn't renamed. in "C:\temp.txt"

End Loop

Log to File: File is now renamed. in "C:\temp.txt"

Copy Files "$LocalPath$\$FileName$_DEL_NOTE.$Extension$" to "$NetworkPath$\$SellingYear$\$SellingSeason$\"

Also, if you could give us the path you have specified in variable, $LocalPath$ then we can reproduce the similar scenario at our end and could suggest the viable solution.

Hope that helps.
Reply With Quote
  #5 (permalink)  
Old 10-02-2009, 07:51 AM
kylepyro kylepyro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 26
Default Simple Rename

Yes - it is strange as the tool has been generally reliable.

The path in $LocalPath$ is \\imagewh\media\Delivery_Note\Unprocessed. You'll see its the path used in the major loop.

I'd thought about the timing an bit, which is why I'd inserted the 50ms delay. Also, in my "debug" mode I stop for messages which involves a stop of several seconds - more than enough time to complete the command.

I've created an exe for this and used it the last several days. It has worked fine, so I will leave this alone for now. Should the issue re-occur I'll try the looping strategy, but I think we'll both agree that it shouldn't be necessary.
Reply With Quote
  #6 (permalink)  
Old 10-15-2009, 07:35 AM
kylepyro kylepyro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 26
Angry App still breaking

ok - so there is something decidedly broken about the engine running the new server version of AA. I've changed this task to loop while the rename executes. I've uploaded the new task and the error log. When this fails now I get a windows error.

Error: Access violation at 0x7C92ABD5 (tried to write to 0x00030F64), program terminated.

I use these methods in numerous other Automations, so something here is broken.

Task and Error Log attached for your reference.

I ran this exact same exe a few days ago and it ran fine.

What's next.
Attached Images
File Type: jpg Access Error.jpg (9.8 KB, 2 views)
Attached Files
File Type: txt Delivery_Note_Index_Log.txt (450 Bytes, 6 views)
File Type: txt delivery_note_index.txt (11.7 KB, 5 views)
Reply With Quote
  #7 (permalink)  
Old 10-15-2009, 08:05 AM
kylepyro kylepyro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 26
Default Just for grins

I tried breaking this down to the smallest part. Here is a test script that has 3 statements, begin debug, rename a file with explicit names and end debug. This simple rename doesn't work and doesn't write an error into the error log.
Attached Images
File Type: jpg files.jpg (60.4 KB, 3 views)
File Type: jpg script.jpg (31.5 KB, 3 views)
Reply With Quote
  #8 (permalink)  
Old 10-16-2009, 05:06 AM
forumsupport forumsupport is offline
Senior Member
 
Join Date: Apr 2007
Posts: 1,337
Default

Hello,

We tried to reproduce the scenario at our end but it did not reproduce. We need to look into your machine so that we can resolve the issue quickly.

Can you please send your contact number and the convenient time to reach you at Automation Anywhere - Open A Support Case
Reply With Quote
  #9 (permalink)  
Old 11-16-2009, 02:02 PM
kylepyro kylepyro is offline
Junior Member
 
Join Date: Nov 2008
Posts: 26
Default

ok - so for those of you following this thread there is a problem with renaming files on a network location and its being worked on.
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 02:09 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.0.0 ©2007, Crawlability, Inc.
Copyright © 2003-2008 Tethys Solutions, LLC. All rights reserved