I am writing a flow that Deactivates a File Channel then performs some other functions. I would like to add a pause after the channel is deactivated to allow potential work units to finish before I perform the other functions. How would your recommend doing this pause -- say for 2 minutes?
Add this in an ASSIGN node as JavaScript:
function startPause(mill, tdiff) { var lastdate = new Date(); var currdate = null; var tdiff = 0;
do { currdate = new Date(); tdiff = currdate-lastdate; } while(currdate-lastdate < mill); return tdiff; }
Then after adding a double variable type call the javascript into the variable like this:
startPause(60000, 0);