Page 1 of 1

find job repository by variable

Posted: Thu Jul 30, 2020 3:20 pm
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

Re: find job repository by variable

Posted: Fri Jul 31, 2020 9:15 am
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

Re: find job repository by variable

Posted: Tue Aug 04, 2020 12:21 pm
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?

Re: find job repository by variable

Posted: Tue Aug 04, 2020 6:12 pm
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.

Re: find job repository by variable

Posted: Thu Aug 13, 2020 3:06 pm
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

Re: find job repository by variable

Posted: Fri Oct 02, 2020 12:26 pm
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

Re: find job repository by variable

Posted: Fri Oct 02, 2020 12:37 pm
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.

Re: find job repository by variable

Posted: Fri Oct 02, 2020 4:05 pm
by b.schuring
Found it! Thanks!

Re: find job repository by variable

Posted: Tue Dec 08, 2020 9:31 am
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

Re: find job repository by variable

Posted: Mon Dec 21, 2020 4:28 pm
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

Re: find job repository by variable

Posted: Tue Dec 22, 2020 7:52 am
by b.schuring
Works like a charm again. Thank you very much!

Re: find job repository by variable

Posted: Tue Dec 22, 2020 11:09 am
by laurentd
Great, you are welcome Bas!
You can add a review on the Appstore if you like it.