Avatar

Community Advisor

Hi,

You can use some JS and a Web Download activity in a loop:

20200121-172548-screenshot-31.jpg

 The init contains:

 

instance.vars.i = 0;

 

The Advanced JS contains:

 

var array = [
  'https://www.google.com/',
  'https://yahoo.com',
  'https://blog.floriancourgey.com',
];
if(instance.vars.i >= array.length){
  task.postEvent(task.transitionByName('end'));
  return;
}
instance.vars.website = array[instance.vars.i];
instance.vars.i++;
task.postEvent(task.transitionByName('continue'));

 

with 2 transitions "continue" and "end".

 

Web download activity details:

20200121-172829-screenshot-32.jpg

This results in the following log:

 

Starting workflow (operator 'Florian Courgey (fcourgey)')
httpTransfer	Starting transfer of 'https://www.google.com/' to 'www_20200121162521a.google.com.html'
httpTransfer	Starting transfer of 'https://yahoo.com/' to 'yahoo_20200121162522a.com.html'
httpTransfer	Starting transfer of 'https://blog.floriancourgey.com/' to 'blog_20200121162522a.floriancourgey.com.html'
Workflow finished

 

Any error (HTTP code different from "200") will trigger the Alert.

 

Replace the Start with a Scheduler and you're all set.

 

Please let me know if it works for you

Best

Sources:

- loop in a workflow

- advanced js transitions explanation

- original topic in a comment by Raj Shekar