Sends messages even when the server is turned off

There is a process that transfers from ftp to a local disk file. It happens once a day. A send email is also inserted in the process - a message is sent about the successful transfer. But now the message is sent even if the server shuts down altogether. How can this be prevented? Why could this happen?

Hi, maybe you were just logged off the Windows session. So the Workflow services continue to be active.
But if Windows is stopped, none of its service would work. So Workflow processes won’t work.

Thanks for the reply, we are still looking for a solution. A 0 kb file had entered the system. The system administrator reports that the file has been repeated several times and a large number of messages have been generated, which are now being sent. We are still testing this assumption.

to avoid issues with 0 Kb files, you can add a “File Size Condition” plugin (from Process Logic Tasks).
For example if the file size is less than 1 Kb, exit the process with a Delete

I introduced this condition. I haven’t checked yet, but I’ll check to see if reports are generated during the day. The file enters the system around 03:00 (at night), by the morning around 60,000 messages have been generated (system administrator information). But how is this possible if the ftp input operation interval is 5 min?

That’s the way all Input tasks work:

  • They check for files at a set interval (5 minutes in your case).
  • They create an internal list of all files that need to be processed (1 in your case).
  • They process those files and mark them as processed. In your case, the file has 0 bytes so it cannot be processed and therefore, it cannot be marked as processed
  • Once the Input task has gone through its internal list, it goes back to check if any new files have been added while it was processing the list. If no new file is found, then the task goes to rest until its schedule fires it up again. But in your case, it constantly finds the 0 byte file that could never be processed. So it keeps going back to it in an infinite loop.

Hope that clarifies things a bit.

Thank you very much,Phil, now perfectly clear.
But how to prevent such a case - 0 kb? The condition of the file size can prevent such cycling.

Yep, the file size condition is the way to go to prevent the messages from being sent, but it still won’t prevent the process from endlessly looping over that file that it can’t handle.

So inside your condition, you should add a task that deletes the 0-byte file from the FTP server. Workflow doesn’t have a task to do that, so you’ll have to call an external FTP client.

Of course, the proper solution would be to simply prevent the 0-byte file from being published on the FTP server to start with…

Thanks, Phil, for the very good explanation. Thanks