Loop issue with FTP uploaded files - VisualCron - Forum

Community forum

hepworthd
2013-07-29T16:37:19Z
I have recently upgraded from 6.1.0 to 6.1.8, yes it's a bit behind already but the paperwork takes a while to upgrade our production environments.

I have FTP job's that upload files with a .tmp filename, after the upload is completed, I have a rename loop, incase of multiple files uploaded. That loops based on the results successful upload list, for the most part it works in the newer version, but am getting rename failures due to filename not found on the destination. I have found that for some odd reason, it is looping based on previous run results, and not current upload results. This never happened in the previous 6.1.0 version. Is this a known bug? If not, am I maybe doing something wrong?

Need resolution as soon as possible, causing a headache in our production environment currently and do not want to back out the upgrade, and cannot easily upgrade to a newer version.

thanks.
hepworthd
2013-07-29T18:35:58Z
After playing around some, I have noticed the following:

My job currently has two triggers, one is the existance of a new file to start the process flow, basically then lists all files in directory and works against all the files, thus the job will only run once. And I have a secondary trigger set to run every 5 minutes as a backup.

If i run only the 5 minute interval trigger, I am seeing the issue with the looping not using the actual values during the upload.

If i run the job based on the new file trigger, I am not seeing this issue....
hepworthd
2013-07-30T13:39:16Z
Update, I have verified that indeed the issue lies with either timed or interval triggers, when the job rains because of either of the triggers, the upload file list is taking the previous list for some reason, and not the current list. This is an issue and not sure if a newer version of VisualCron has addressed this or not.

If I keep my job as file trigger, I have no issue's with this, however I do need/want the backup timed trigger for my process, so if I can get an update that would be appreciated, mainly if I do indeed need to get the ball rolling on updating in our environments.

thanks.
Support
2013-07-30T14:19:07Z
Sounds like there are some problems with Variables. Which Variables do you use?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hepworthd
2013-07-30T14:34:13Z
It is currently setup to loop off the successful send variable from a previous FTP upload task, within the same Job. I even attempted to write out the Uploaded files results to a variable and then write the variable to a text file, and noticed the same issue. However like I said, only when I set it up as a customer or interval trigger.

It's almost like the task variable does not update until the job completed for the current run, unless it is a file trigger. Very strange, and this worked perfectly file in the 6.1.0 version.

I have ran some tests on a local install, only against a list file task, and looping was fine, so I am not sure if it's an FTP glitch, I do plan on setting up a similar job on my local PC to see if I can replicate it.

One thing to note, this has happened before on our test environment, but since we get very little data through it, I did not think much of it, thought just a hiccup, which it does not seem to be.

thanks.
hepworthd
2013-07-30T15:47:18Z
I have been able to reproduce the issue on my local PC running the exactly same version/install of VisualCron.
hepworthd
2013-07-30T15:51:44Z
One thing else noted, it seems to be only updating the FTP Upload successful send variable when the job runs based on the file trigger, so if I run one file trigger successfully, disable the file trigger, then run multiple interval triggers, each fail because the file trigger variable is still being used and the file no longer exists, which is correct.
hepworthd
2013-08-02T15:04:48Z
Any idea if this will get looked at?

I have band-aided my solution by creating a new identical job, with only a timed trigger in, and this is currently working, found that as soon as I put a file trigger in, and after the first trigger for new file, the timed trigger no longer works.
Support
2013-08-06T06:54:46Z
Hi,

we need some way to reproduce this. You say that you have problems with Task Variables and it is not clear which. But if you try to use Trigger Variables it will not work when the time triggers kicks in. Please create a Job which can reproduce your problem. Make it as simple as possible and attach it with description.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hepworthd
2013-08-12T15:01:42Z
Attached are three scenario's.

1 - Setup only as a timed trigger, which successfully worked, looping to rename the file.

2 - Setup with both timed and fail trigger, job ran on the file trigger and renamed successfully.

3 - Setup to only run against timed trigger, file trigger was disabled. Failed to rename in loop.

File Attachment(s):
1-Works_TimedTriggerOnly.zip (6kb) downloaded 38 time(s).
2-Works_TimedTriggerAndFileTrigger.zip (6kb) downloaded 37 time(s).
Support
2013-08-13T11:08:13Z
Originally Posted by: hepworthd 

Attached are three scenario's.

1 - Setup only as a timed trigger, which successfully worked, looping to rename the file.

2 - Setup with both timed and fail trigger, job ran on the file trigger and renamed successfully.

3 - Setup to only run against timed trigger, file trigger was disabled. Failed to rename in loop.



It sounds like you should point to PrevTask instead of current one:

{TASK(PrevTask,Result.UploadedFilesNames)}

Otherwise you are pointing to the uploadedfilenames in Task 4 instead of 3.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hepworthd
2013-08-13T11:55:33Z
Well in my production job, I have a write to file task that writes the FTP session information to a log file, right after the FTP session that uses previous task. Thus I cannot do that. This just shows the flaw that used to work back in 6.1.0.
Support
2013-08-13T12:22:46Z
Originally Posted by: hepworthd 

Well in my production job, I have a write to file task that writes the FTP session information to a log file, right after the FTP session that uses previous task. Thus I cannot do that. This just shows the flaw that used to work back in 6.1.0.



I am not sure I understand the problem. I am looking at the sample Job 3 that does not work for you.

You have 4 Tasks.

1. rename files
2. get list of files
3. upload list of files
4. rename file on server - looped file listing from 3.

Why cannot you just use the PrevTask Variable in the Loop. Don't you want to rename the files that were just uploaded or am I misunderstanding you?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hepworthd
2013-08-13T12:38:53Z
Because in my production job I have a write to file task between the FTP upload and FTP rename, thus I cannot use previous task.
Support
2013-08-13T12:40:37Z
Ok, but why cannot you use the Task Id to refer to instead of Active or PrevTask? Alternatively - store in a Variable.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hepworthd
2013-08-13T12:44:04Z
That is how I do it, in the loop I specify the actual task id I want to loop with, this works when I setup a new task for timed trigger fine, but when I introduce file trigger and it runs against file trigger, the next time a timed trigger runs, it fails as it uses the last file trigger variable information.
hepworthd
2013-08-13T12:45:08Z
Have you been able to reproduce the issue?
Support
2013-08-13T12:50:15Z
In the sample I see no File Trigger Variable. And File Trigger Variables do not work when it is triggered by Time - this explain why you might get the wrong value. You need to use the FTP Upload Variable.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top