Odd folder behavior

Post Reply
hyang
Newbie
Posts: 5
Joined: Fri Apr 23, 2021 7:14 pm

Odd folder behavior

Post by hyang »

I have Switch installed on two different machines. Each have a rather bizarre folder behavior that does not occur on the other.

Machine 1 - The folder that serves as the hot folder that accepts XML files gets deleted after it no longer has files to process. The path is explicitly defined so it it not an auto-managed folder. I've tried tricking the folder into think that there's something is still there by putting in a dummy file that is not an XML file. That did not work. After all the work has been processed, the entire folder is deleted. I cannot reproduce this behavior on Machine 2. It there a setting that controls this behavior?

Machine 2 - There seems to be a permission issue with files being written from Switch on this machine. I have results being written out using a combination of Set Hierarchy and Archive Hierarchy. The folder is set so that 'Everyone' has all permissions enabled. When the files are written from Switch, the resulting files only have SYSTEM, local user, and Administrators with all permissions enabled. In fact, no other users have even listed. This becomes an issue downstream because the process used to move the files to a different location does not have permission to the PDF file. Like the other issue, this behavior cannot be reproduced on Machine 1. That kind of leads me to think that there is a configuration setting that I'm missing.

Any guidance is tremendously appreciated.
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: Odd folder behavior

Post by freddyp »

Machine 1: is this a simple input folder or a hierarchy? Switch removes folders from a hierarchy when a folder is considered to be a job (this is related to the level settings), but Switch will never remove a simple input folder. If that happens then it means some other process is responsible for that.

Machine 2: that must be related to the user access rights. Is the hierarchy local or on a network drive? Check the user under which Switch is running in the Task Manager or the Activity Monitor, and check the user rights for that user. Perhaps the top folder of the hierarchy is enabled for everyone, but what about the folders below? And what are the user access rights on the file before it leaves Switch? Hold the job file in an element before the archive hierarchy element, open the Explorer/Finder to check the settings there. If there are constraints applied to the file already at that point, you have to change the settings of the file in Switch before it goes to the archive hierarchy element. You can use Execute command to do that.
hyang
Newbie
Posts: 5
Joined: Fri Apr 23, 2021 7:14 pm

Re: Odd folder behavior

Post by hyang »

Freddy,

Thank you for your reply.

The flow that is causing the folder to disappear is a simple folder and not a hierarchy. See the flow below. The folder in question is 'XML Input Hot Folder'.
HotFolder.JPG
HotFolder.JPG (31.12 KiB) Viewed 2908 times
I've tried renaming the folder to a very unique name and moving it to a different folder structure to avoid the possibility of another flow using the same folder, but it still disappears when it is empty.

As for the permission issue for Machine 2, it is a local folder. The user which is running Switch is the local user. The interesting thing is that Switch creates the hierarchy, and the folder has the 'Everyone' permission set. However, the files in the folder do not.

Folder permissions:
FolderPermission.JPG
FolderPermission.JPG (57.91 KiB) Viewed 2908 times
File Permissions:
FilePermission.JPG
FilePermission.JPG (58.55 KiB) Viewed 2908 times
I will have to try putting holds in the flow to see where the file loses the permissions. Our trial license just expired, and I'm waiting on our legal dept to review the purchase order :D
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Odd folder behavior

Post by Padawan »

For Machine 2:
When you process a file thru PitStop Server, then the output file won't have the same permissions as the input file. This is because technically, the output file is not an adjusted version of the input file, it is a completely new file written from scratch. Hence it has the default permissions when new files are created on the system.

I personally fix this by having an Execute Command Element before the output element which sets the permissions correctly.
Here you can download some sample flows from Enfocus:
https://enfocus-community.force.com/cus ... uage=en_US
Post Reply