I'm using JS7 2.5.1 in a Windows Environment and use several FileOrderSources. The Files from the orders that are created are getting moved to an archive folder, as instructed by the documentation. (https://kb.sos-berlin.com/display/JS7/JS7+-+File+Watching#JS7FileWatching-MovingFilesandRemovingFilesonWorkflowCompletion)
I do this mostly with YADE Jobs and sometimes with a shell script jobs, not with JITL jobs. However, the orders don't get removed like expected, instead enter a "COMPLETED" state as if the file still exists in the watched folder. I cannot remove the order manually, if I try I get this error (from the JOC log):
2023-03-03T09:07:26,519 ERROR JControllerProxy-34 c.s.j.c.ProblemHelper - BadRequestError: CannotDeleteWatchingOrder: Cannot delete a file watching order: #2023-03-02#F75304085900-FooBar:FooBar20230302-11.xml
The Problem: If there is a file created with the same name as one of a completed old order, there will be no new order for that new file. There is also no notification about a new file. The file has to be moved out of the watched folder manually for the old Order to leave the Workflow, and back in for it to be recognized as new file that needs a new order.
Hi Martin,
thank you, your post asks the question: is it a bug or is it a feature? The answer is "it's a feature", it works as designed.
Best regards
Andreas
Hi Andreas,
thanks for your response and your help. However there is one misconception: The files get moved out of the observed directory before the workflow reaches it's end and before a new file with the same name gets placed. The directory is empty for days or hours, yet the File Order doesn't get removed or can be removed via JOC. This contradicts your statement and the Wiki that the File Order Source should leave the workflow, if the file isn't present at the end of the workflow. This, to me, is a bug, or even two:
1. File Order not leaving the workflow, if the file isn't present anymore at the end of the workflow
2. Not being able to let the File Order leave the workflow even when the specified file isn't present anymore.
There are other processes at work that prevent the file from being overwritten, overwriting a file while it's being processed by the workflow is not possible in this specific situation.
I tried letting the workflow sleep for 10 seconds via Powershell, thinking it might be Windows not updating the directory quick enough, but that didn't help either.