Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


jshoebrook
2015-08-18T16:52:24Z
We have several jobs that are file triggered based on the creation of files in a folder. The first task in those jobs is a Wait task to allow for multiple files to be received before they are processed. The length of the Wait task is usually set high enough so that the next task doesn't start until all of the files have been received in the folder. However, it in some cases, we receive 1,000+ files in a folder and the task to import the files starts before all of the files have been received in the folder. This doesn't happen often, so we really don't want to increase the number of minutes in the Wait task. Is it possible to create a Wait Loop that would check the last time a folder was updated that would result in the Wait task to loop if it has been less than a minute since the folder was updated?
Sponsor
Forum information
ErikC
2015-08-19T08:37:15Z
Hi,

There are a few methods here you can do:
  1. ask the file uploader to end his upload set with a file named: upload.done. Have a trigger on this file to start your progress.
  2. this solution is using two user defined variables (UDV) : Have two set variable tasks setting UDV1 to -1 and UDV2 to -2.
    Then a file list on the dir, next task is setting UDV1 to the Result.NoFiles of the file list.
    Add a wait task for 60 seconds, do the file list again and add a set variable task UDV2=Result.NoFiles of the 2nd file list task.
    Have a loop on the list/set UDV/wait/list/set UDF2 tasks having a while meganism that UDF1!=UDF2 with a wait of a second. The next task are you progress tasks.


Support: In the loop (option 2 from above) the setting variable isn't working (7.7.5). I looks like the set variable task is using the 1st Result.NoFiles in the loop. It never gets changed. When the file list has a different result, the variable Result.NoFiles stays the same of the file list. The output of the file list is changed though....

Regards,
Erik

Uses Visualcron since 2006.
jshoebrook
2015-08-20T14:34:20Z
How do I access the number of files from the previous task? I've tried {TASK(PrevTask,Result.NoFiles)} and that is not working.
jshoebrook
2015-08-20T21:42:08Z
Actually, I'm able to get the number of files from Result.NoFiles. As you previously mentioned, the issue is that I'm not able to set a variable to the value of {TASK(PrevTask,Result.NoFiles)} . When I check the value of the job variable after setting it to {TASK(PrevTask,Result.NoFiles)} , the value is blank. Is there a bug with that functionality?
jshoebrook
2015-08-20T21:52:27Z
The syntax of how I'm checking the value of the job variable is {JOB(Active|Variable|UDV1)}. The set variable task output shows that the variable was updated in the following text: "Variable 'UDV1' was updated to: 30". However, when I access the job variable in a subsequent task using {JOB(Active|Variable|UDV1)}, the value is blank.
Support
2015-08-25T09:12:15Z
Originally Posted by: jshoebrook 

The syntax of how I'm checking the value of the job variable is {JOB(Active|Variable|UDV1)}. The set variable task output shows that the variable was updated in the following text: "Variable 'UDV1' was updated to: 30". However, when I access the job variable in a subsequent task using {JOB(Active|Variable|UDV1)}, the value is blank.



Job Variables cannot be updated with Set Variable Task (yet) - only User Variables.

About the loop Variable issue - do you have an example Erik that you could export? Perhaps that write the Variable to file?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
ErikC
2015-08-25T09:52:30Z
Originally Posted by: Support 

About the loop Variable issue - do you have an example Erik that you could export? Perhaps that write the Variable to file?

I just send you an e-mail.

Regards
Erik


Uses Visualcron since 2006.
Support
2015-08-26T14:30:02Z
jshoebrook
2015-08-26T14:33:12Z
I'm assuming the issue with not being able to update job variables with the Set Variable task is still being worked. Do you plan on having a fix for that included in 7.7.5?
Support
2015-08-26T15:17:34Z
Originally Posted by: jshoebrook 

I'm assuming the issue with not being able to update job variables with the Set Variable task is still being worked. Do you plan on having a fix for that included in 7.7.5?



We will add support for this but not in 7.7.5 - it requires a lot of changes.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Scroll to Top