New to Switch - Question about orphan files

Post Reply
mlongo
Newbie
Posts: 11
Joined: Thu Nov 18, 2021 2:39 pm

New to Switch - Question about orphan files

Post by mlongo »

Hello,
I'm practically brand new to Switch so I apologize if this question is very basic. I have a flow where I am grabbing PDF files and an XML file that goes with said PDF. There are a lot of extra XML files from the source that are not related to the PDF. My XML Pickup is setup to orphan after 5 minutes. When my flow has finished processing the PDF and related XML file, I am left with many orphan files in my "Filter" folder. Right now, these orphans end up going to my Problem Jobs folder. But I would rather have them go to a Recycle Bin. According to the manuals/reference guides that I've seen, Orphans will travel down the "Outgoing Data Error Connection" but if this doesn't exist, they go to Problem Jobs. However, there is no documentation anywhere that I can find on how to build an "Outgoing Data Error Connection". Can I get some guidance on how to handle this? As mentioned, I would rather have my orphan files end up in a recycle bin once they are considered orphaned.
Thanks!
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: New to Switch - Question about orphan files

Post by jan_suhr »

Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
mlongo
Newbie
Posts: 11
Joined: Thu Nov 18, 2021 2:39 pm

Re: New to Switch - Question about orphan files

Post by mlongo »

jan_sur,
I understand the connection tool used to connect the flow element. But how would I make an "outgoing data error" connection? The provided link speaks nothing of that. I don't understand how that works. When I look at the properties of my connection, the Carry this type of job, Dataset Name, Success out, Warning out, and Error out choices (for example) do not exist as options to choose on my connector.

Edit: To further clarify, the document says to use some search words: move, filter and traffic light. These words call up absolutely nothing when I put them in the search field.
Last edited by mlongo on Thu Nov 18, 2021 6:20 pm, edited 1 time in total.
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: New to Switch - Question about orphan files

Post by freddyp »

You do that by adding another folder after "XML pickup" and connecting from ""XML pickup" to that folder, so you have two outputs. When you look at the properties of the connections you will see that you can define which one is Succes and which one is Error. Note that a connection can have both.
jan_suhr
Advanced member
Posts: 586
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

Re: New to Switch - Question about orphan files

Post by jan_suhr »

When you have made a connection you should have a stoplight symbol on it, this is only available if the connection have that property.
Right click on the connection and then select "Output level" from the menu. Then you can select Success, Warning (in some cases) or Error. Now the error jobs will go out through the Error connection.
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
mlongo
Newbie
Posts: 11
Joined: Thu Nov 18, 2021 2:39 pm

Re: New to Switch - Question about orphan files

Post by mlongo »

I've added a screenshot of my flow. First of all, the tool absolutely will not allow me to add a second connection. I was trying to make one from the Pickup to the Junk folder seen in the screenshot. The existing connection from the Pickup to the Sort for PDF folder has no option anywhere on it that I can see to create a success or error choice. Finally none of these have a stoplight symbol and nowhere do I see a stoplight symbol when I try to make new connections. So I'm feeling quite dumb at this point.

The second XML Pickup (not in the red box) can be ignored as that branch is working fine and is used for another bit of testing.


TestFlow.png
TestFlow.png (11.22 KiB) Viewed 4284 times
User avatar
billy.olvestad
Member
Posts: 51
Joined: Mon Nov 19, 2018 10:08 pm
Location: Sweden
Contact:

Re: New to Switch - Question about orphan files

Post by billy.olvestad »

The "XML pickup" flow element doesn't support an error connection as far as I know.

I have solved similar issues before by letting the job go to problem jobs, and then adding a folder after problem jobs, and a recycle bin after that.

Skärmavbild 2021-11-19 kl. 09.24.32.png
Skärmavbild 2021-11-19 kl. 09.24.32.png (14.16 KiB) Viewed 4256 times

On the connection between problem jobs and the extra folder you can then choose "Define condition with variables", and then you filter based on "Job.FailElement" and "Job.FailMessage" (you can find what to look for in the error mail that you got from the problem job).

That way you don't send every problem job to the recycle bin, only these specific instances.
User avatar
magnussandstrom
Advanced member
Posts: 345
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: New to Switch - Question about orphan files

Post by magnussandstrom »

Is it possible to use the filenames of the XML's to route the 'unwanted' files to the trashbin? If there's a pattern to distinguish between the XML-files you want and those you want to delete it's quite easy to setup rules for this in the outgoing connections.

Lets say the 'keepers' always starts with ABC or always starts with 8 digits and so on..
Or if the unwanted files always contains X..
mlongo
Newbie
Posts: 11
Joined: Thu Nov 18, 2021 2:39 pm

Re: New to Switch - Question about orphan files

Post by mlongo »

billy.olvestad wrote: Fri Nov 19, 2021 9:33 am I have solved similar issues before by letting the job go to problem jobs, and then adding a folder after problem jobs, and a recycle bin after that.
billy.olvestad, This is probably a good route for me to pursue. I will explore this today.
magnussandstrom wrote: Fri Nov 19, 2021 1:12 pm Is it possible to use the filenames of the XML's to route the 'unwanted' files to the trashbin? If there's a pattern to distinguish between the XML-files you want and those you want to delete it's quite easy to setup rules for this in the outgoing connections.
magnussandstrom, not really. Every PDF and XML file follows this naming pattern: JobTicket_999999999999999.xxx. Where the numbers are a pattern that includes a date and a unique job code. xxx = the extension such as pdf or xml. A single job will include both a PDF and XML file with the same name (such as JobTicket_1119202112345.xlm and JobTicket_1119202112345.pd). I only receive a PDF file when the customer orders a print on demand or manufacture on demand item. I end up with a lot of "orphaned" xml files when people order static (non-POD/MOD) items whereby no pdf is generated/included. The purpose of the flow is to get the MOD/POD pdf files into the digital print department and rename them to names that make sense to the digital print folks. I have this working well at the moment. I also have to include some job ticket details but that is an entirely different flow process that I'm slowly learning about now.

After thinking this over last night, I believe that sending these orphans "automatically" to the problem folder is not that big of a deal. I might be making more of an issue out of it than it is worth. This is because I am somewhat already handling the true problem files at the end of the flow via sending any PDF and related job ticket to a folder called "Other" rather than a customer folder. I appreciate all of the help so far.
User avatar
magnussandstrom
Advanced member
Posts: 345
Joined: Thu Jul 30, 2020 6:34 pm
Location: Sweden
Contact:

Re: New to Switch - Question about orphan files

Post by magnussandstrom »

Another solution might be to turn off Orphan files and use the free app 'Folder Apps' and the sub-app 'File-pool cleanup'. This app gives you the option to "Remove files older then..".

Unfortunately it only works for local folders not network-path's. But Freddie Pieters implied that there might be an update coming that allows 'File-pole cleanup' on network-URL's.
Post Reply