Flowing job along a split path due to subfolder prescence

Post Reply
Steve_G
Newbie
Posts: 6
Joined: Thu Jul 11, 2024 4:41 pm

Flowing job along a split path due to subfolder prescence

Post 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.
User avatar
tdeschampsBluewest
Member
Posts: 127
Joined: Tue Jun 01, 2021 11:57 am

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

Post 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.
Do you like the Enfocus Apps developed by Bluewest?
Feel free to leave a comment on the Appstore!
Steve_G
Newbie
Posts: 6
Joined: Thu Jul 11, 2024 4:41 pm

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

Post 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 10241 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 10241 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.
User avatar
Soul Forge
Member
Posts: 61
Joined: Wed Jul 12, 2023 5:25 pm

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

Post 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.
Steve_G
Newbie
Posts: 6
Joined: Thu Jul 11, 2024 4:41 pm

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

Post by Steve_G »

That's what I was afraid of. Back to the drawing board, I suppose.

Thanks, everyone.
jan_suhr
Advanced member
Posts: 687
Joined: Fri Nov 04, 2011 1:12 pm
Location: Nyköping, Sweden

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

Post by jan_suhr »

Have you tried the app Scan hierarchy?
https://www.enfocus.com/en/appstore/pro ... -hierarchy
Jan Suhr
Color Consult AB
Sweden
=============
Check out my apps
Steve_G
Newbie
Posts: 6
Joined: Thu Jul 11, 2024 4:41 pm

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

Post 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.
Post Reply