- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
Hey Raj,
With some JS you can run checks if servers are running:
Init code:
instance.vars.i = 0;
Advanced Javascript code (containing 2 transitions: "continue" and "end":
var array = [
'https://www.google.com/',
'https://blog.floriancourgey.com',
'https://yahoo.com', // returns an HTTP 302 code
];
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'));
Download config:
Note: in the Adavanced parameters, you may allow 302 HTTP codes not to trigger an error.
The above results in the following log:
Starting workflow (operator 'Florian Courgey ()')
httpTransfer Starting transfer of 'https://www.google.com/' to 'www_20200121162521a.google.com.html'
httpTransfer Starting transfer of 'https://blog.floriancourgey.com/' to 'blog_20200121162522a.floriancourgey.com.html'
httpTransfer Starting transfer of 'https://yahoo.com/' to 'yahoo_20200121162522a.com.html'
Workflow finished
Best regards
Florian