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.
Flowing job along a split path due to subfolder prescence
- tdeschampsBluewest
- Member
- Posts: 127
- Joined: Tue Jun 01, 2021 11:57 am
Re: Flowing job along a split path due to subfolder prescence
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.
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!
Feel free to leave a comment on the Appstore!
Re: Flowing job along a split path due to subfolder prescence
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:
During the flow Files 2 and 3 are failed, so a FAIL hierarchy 2 is added and they are moved to it:
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.
Let's say we have a submitted hierarchy that will run through the flow:
During the flow Files 2 and 3 are failed, so a FAIL hierarchy 2 is added and they are moved to it:
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.
- Soul Forge
- Member
- Posts: 61
- Joined: Wed Jul 12, 2023 5:25 pm
Re: Flowing job along a split path due to subfolder prescence
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.
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
That's what I was afraid of. Back to the drawing board, I suppose.
Thanks, everyone.
Thanks, everyone.
Re: Flowing job along a split path due to subfolder prescence
Have you tried the app Scan hierarchy?
https://www.enfocus.com/en/appstore/pro ... -hierarchy
https://www.enfocus.com/en/appstore/pro ... -hierarchy
Re: Flowing job along a split path due to subfolder prescence
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.