find job repository by variable

Post Reply
b.schuring
Newbie
Posts: 12
Joined: Tue Jun 07, 2016 6:51 pm

find job repository by variable

Post by b.schuring »

Dear all,

Is it possible to find a job repository with a file variable en then use this hierachy to inject a file?

for example:
I've got a folder structure like this:

Year
Customers A
Customer A1
-Projects
-- Project 1
-- Job A {rid}
-- folder 1
{rid} PDF FILE
-- folder 2
-- Job B
-- Project 2
-- SubProject
-- Job A{rid}
-- folder 1
{rid}PDF FILE
-- folder 2
-- Job B
-Projects
-- Job A
-- folder 1
PDF FILE
-- folder 2
-- Job B
Customer A2 etc etc
Customers B and so on....

As a input i've only got the {rid} of a file then I have to search on different levels where the a folder got a {rid} en pickup the file from folder 1. But t
Is this possible? Hope that there is some-one that can help me!

Greeting Bas
freddyp
Advanced member
Posts: 1008
Joined: Thu Feb 09, 2012 3:53 pm

Re: find job repository by variable

Post by freddyp »

It is always a good idea to have a look in the Enfocus Appstore. This app will probably solve your problem:
https://www.enfocus.com/en/appstore/pro ... t-wildcard
b.schuring
Newbie
Posts: 12
Joined: Tue Jun 07, 2016 6:51 pm

Re: find job repository by variable

Post by b.schuring »

Thanx Freddy. I tried the app but for good use I need to know the job repository and the problem is I don,t know the right level of the Job Repository so I need to go more levels up to find the right parent folder.

Can I use the app with a reg expression for the job repository?
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: find job repository by variable

Post by laurentd »

Inject Wildcard does not search for files recursively yet, this is something we will investigate.
Nevertheless, you can use single-line text with variables for the job repository path, if you know where to search of course.
Laurent De Wilde, Solution Architect @ Enfocus
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: find job repository by variable

Post by laurentd »

Hi Bas,
Inject Wildcard v3 is available from your favourite Appstore!
And yes it does recursive search in the job repository, also with optional parent hierarchy filtering!
And, by the way, this is the first app in the Appstore written in Node.js, supported by the new scripting engine in Switch 2020!
https://www.enfocus.com/en/appstore/pro ... t-wildcard
Laurent De Wilde, Solution Architect @ Enfocus
b.schuring
Newbie
Posts: 12
Joined: Tue Jun 07, 2016 6:51 pm

Re: find job repository by variable

Post by b.schuring »

Hi Laurent!

The new wildcard works like a charm. I've got the files that I need but is het also possible to get the Job.Hiearchy of the injected files?

Hope you van help.
Thanks in advance!
Bas
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: find job repository by variable

Post by laurentd »

Hi Bas,

Happy you like the new version, it is now very powerful indeed.

Yes you can get the job hierarchy for each injected file or folder, as explained in the app documentation:
Inject Wildcard stores the following private data in the internal job ticket for each injected job file or folder in order to easily assemble the job further in the flow:
• <key>.JobID
• <key>.JobName
• <key>.NumFiles
• <key>.FilePath
The default value of the private date key is “Ungroup”, so that if you use the Assemble job element with the Ungrouped job scheme, all injected file(s) and or folder(s) are assembled automatically, even with creation of the hierarchy if you increase the Subfolder levels property of the Assemble job element.
There is also another way to attach the hierarchy info to the injected file(s) and/or folder(s): use the Set hierarchy path element, and set the hierarchy Path segment 1 property to the “Ungroup.FilePath” job private data: [Job.PrivateData:Key="Ungroup.FilePath"]
See the example flow available on the app description’s page.
Laurent De Wilde, Solution Architect @ Enfocus
b.schuring
Newbie
Posts: 12
Joined: Tue Jun 07, 2016 6:51 pm

Re: find job repository by variable

Post by b.schuring »

Found it! Thanks!
b.schuring
Newbie
Posts: 12
Joined: Tue Jun 07, 2016 6:51 pm

Re: find job repository by variable

Post by b.schuring »

Hi Laurent,

I am running into a new problem with the wildcard app. It works fine until a few days ago. Suddenly there are appearing locked or hidden folders in my hierarchy that the app can;t scan and causes a error.

These are the error messages I' ve got so far;

EPERM: operation not permitted, scandir '\\(fullpath)\Aangeleverd\.BAH.rXE6O'

UNKNOWN: unknown error, scandir '\\(fullpath)\Aangeleverd\.BAH.AE2vl'

EPERM: operation not permitted, scandir '\\(fullpath)\Aangeleverd.sb-b85aa198-OXTFGN\Smits � Prinsessenflats Bouwbanners DEF2'

All of the above got strange unknow folder names that are not made by us. Is there a way to skip the scandir error en just continue? Now it causes a error and will send my file to the problem job folder. It will not take the error out connection in my flow stopping the file from being processed any longer...

Hope you've got any bright ideas!
Thanks in advance. Keep Safe.
Bas
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: find job repository by variable

Post by laurentd »

I made an update to Inject Wildcard, now v4.
This problem (only seen once) is now fixed (tested with Bas).
New feature: the app now checks if the job repository exists, and if it doesn't, the job is sent to the error connection (instead of the problem jobs folder).
https://www.enfocus.com/en/appstore/pro ... t-wildcard
Laurent De Wilde, Solution Architect @ Enfocus
b.schuring
Newbie
Posts: 12
Joined: Tue Jun 07, 2016 6:51 pm

Re: find job repository by variable

Post by b.schuring »

Works like a charm again. Thank you very much!
laurentd
Member
Posts: 137
Joined: Wed Mar 13, 2019 2:06 pm

Re: find job repository by variable

Post by laurentd »

Great, you are welcome Bas!
You can add a review on the Appstore if you like it.
Laurent De Wilde, Solution Architect @ Enfocus
Post Reply