I have a process that reads files in a directory after sending inputs earlier in the process. The return files are delivered by batch process, so I’d like the robot to delay after sending files until the next hour, say, so I’m not using inefficient delay loops.
So, send file at 9:45, so delay until 10:00. Send file at 10:07, delay until 11:00…
Any help on if this is even possible? All I can think of is using a delay loop and a time check, though I almost may as well check the directory in that case!
May I know why we have this delay
Because if that delay is meant to go for next process to start with then we can keep the process till that sends file alone and SCHEDULE that process to run at certain time interval like every one hour using orchestrator
yah thats possible
–keep the whole sequence inside the TRY block of TRY CATCH activity
–we can use PATH EXISTS Activity where mention the file path as input and the output will be of type Boolean name it as bool_FileExists
–now use a IF condition like this bool_FileExists = True
–if true it means file is created and it will go to THEN part where we can have the process to be continued if file exists or it will go to ELSE part where we can have use DELAY activity with a time stamp around 01:00:00 (one hour or whatever time we want but must be explicitly mentioned) and next to this delay activity use again PATH EXISTS activity with same file path and with same variable bool_FileExists
–again next to this path exists use a IF condition and with the same condition and same sequence of activities in THEN part and if the condition fails it goes to ELSE part where this time we will keep a THROW activity with a business exception like this New BusinessException(“file is not yet created”)
so that it will go to CATCH block of the TRY CATCH activity where we can send a mail to the user with a note
thats all buddy
hope this would help you