Page 1 of 1

Flowing job along a split path due to subfolder prescence

Posted: Tue Jul 16, 2024 12:27 am
by Steve_G
Hi all,

I have a submitted hierarchy flow that goes through 4 possible paths, 2 of which will add a subfolder to the hierarchy called "FAIL" and place the file triggering it inside it. When the hierarchy is archived, I'm trying to have any archived job that contains a "FAIL" subfolder inside it travel along one pathway and any that doesn't along another.

I've set up a condition along the connection after the Archive with defined conditions of "[Job.PrivateData:Key='JobKey'] <EQUAL TO> [Job.Hierarchy:Index='1']" AND "[Job.Hierarchy] <CONTAINS> FAIL" which seems like it should work, but it's only passing the files that ended up in that subfolder and not the entire order.

I don't have the Scripting Module, so I'm limited to what I can access within the application and Metadata Module, plus any free apps if those will help.

Any help would be very appreciated.

Re: Flowing job along a split path due to subfolder prescence

Posted: Tue Jul 16, 2024 12:09 pm
by tdeschampsBluewest
Hi there,
If i understand well, IF there is a file with a hierarchy "fail", you want to grab the whole folder and do "something" with it?

If so, you should archive the "failed" file and output the result using success outgoing connection.
Test like you did the if the hierarchy contain or not the keyword "fail", then use "Inject" or "Inject wildCard" to grab the folder as a job.
After that you'll be able to do whatever you want with the folder.

Re: Flowing job along a split path due to subfolder prescence

Posted: Tue Jul 16, 2024 4:56 pm
by Steve_G
Hmm, I'm not sure I explained it right. Let me add some visuals to try and clarify.

Let's say we have a submitted hierarchy that will run through the flow:
Hierarchy1.png
Hierarchy1.png (55.22 KiB) Viewed 10342 times
During the flow Files 2 and 3 are failed, so a FAIL hierarchy 2 is added and they are moved to it:
HierarchyFail.png
HierarchyFail.png (58.37 KiB) Viewed 10342 times
My goal once the flow is finished and it hits the Archive Hierarchy is to send the entire Hierarchy 1 (folders and contents) along one path if there is a FAIL subfolder and along a different one if there is not. I downloaded the Inject Wildcard app and will give it a shot, but my first attempts are still splitting everything up.

Re: Flowing job along a split path due to subfolder prescence

Posted: Thu Jul 18, 2024 12:14 pm
by Soul Forge
Well, the only way the I'm aware that would solve your problems would be using scripts and readdir from fs node package.
I also wanted to read the hierarchy from inside a job folder using only Switch's variables, but found no way of doing so, as the hierarchy variable only gets the hierarchy from outside the job folder.

If you're in no position of acquiring the scripting module anytime soon, maybe renaming the "Hierarchy 1" folder to "Hierarchy 1_F" would do the trick. You only needed to grab folders with "_F" in the name and process them accordinly.

Re: Flowing job along a split path due to subfolder prescence

Posted: Fri Jul 19, 2024 4:37 pm
by Steve_G
That's what I was afraid of. Back to the drawing board, I suppose.

Thanks, everyone.

Re: Flowing job along a split path due to subfolder prescence

Posted: Fri Jul 19, 2024 4:48 pm
by jan_suhr
Have you tried the app Scan hierarchy?
https://www.enfocus.com/en/appstore/pro ... -hierarchy

Re: Flowing job along a split path due to subfolder prescence

Posted: Fri Jul 19, 2024 4:56 pm
by Steve_G
I did, it kept sending everything along both pathways even with the traffic lights separated appropriately. I am still playing with it to see if it's a PEBKAC error, but I'm also going to keep thinking about a different flow structure to get the results I need.