Hi guys;
I am fighting a bit of a battle with NestedName, which does not want to cooperate the way I hoped it would.
Basically I am trying to create a Connection based on whether an incoming JobFolder contains a file which NameProper matches any of the three defined RegEx conditions.
So if the file which name is matching one of these:
(.*)[T|t]able(.*)[O|o]f(.*)[C|c]ontent(.*)
OR
(.*)[I|i]ndex(.*)
OR
(.*)(\s)(TOC|ToC|toc|Toc)(.*)
is in the incoming job folder - then go on connection A, if there is no file matching any of the above RegEx, then send the whole JobFolder on Connection B.
I have tried to set a variable for [Job.NestedName] to match the RegEx (as per line 1);
I have tried to set a particular result of ie.: [Job.NestedName:Search="(.*)[I|i]ndex(.*)"] to match or to not match the RegEx...
And while all of those return properly True / False in the config window, are properly validated when flow is activated, when the job comes - it goes to Problem Jobs, as there is no outgoing connection that would accept the job.
I shall add, that when there is no RegEx involved, but a strictly defined filename that is to be looked for inside the JobFolder, then it works fine.
How shall I then properly engage the RegEx Criteria for the filename contained in the JobFolder, so that it worked properly?
Anyone? Any Hints?
NestedName with 3 RegEx rules -> Connection Issue
Re: NestedName with 3 RegEx rules -> Connection Issue
Have you tried to create a sample job and then check if the "Define condition with variables: exclude these jobs works correctly?"
Also, I assume you have a complex rule setup on Connection A and also the opposite rule to Connection B? If you do it like this and you make mistakes, then you can indeed get to a situation where no outgoing connection accepts the job.
Personally, I always setup one connection with the complex rules. I setup the other connection to "Include these jobs": "All other jobs". This way all the jobs which are not sent to Connection A are sent to Connection B.
Is it possible to share your flow and a sample jobfolder which should go on Connection A and a sample jobfolder which should go on Connection B? That will make it easier to find out the cause of the issue.
Also, I assume you have a complex rule setup on Connection A and also the opposite rule to Connection B? If you do it like this and you make mistakes, then you can indeed get to a situation where no outgoing connection accepts the job.
Personally, I always setup one connection with the complex rules. I setup the other connection to "Include these jobs": "All other jobs". This way all the jobs which are not sent to Connection A are sent to Connection B.
Is it possible to share your flow and a sample jobfolder which should go on Connection A and a sample jobfolder which should go on Connection B? That will make it easier to find out the cause of the issue.
Re: NestedName with 3 RegEx rules -> Connection Issue
Hi Padawan;
Thank you very much for your reply. Indeed - this may come across as complicated.
I think as the RegEx is completely different and unique in each case (so that I cannot have 1 Expression for them all, at least I cannot put it in one ) - having all 3 conditions set-up on one connection, on the basis that either one can exist but not all of them, and to ask Switch to check the condition 1 or Condition 2 or Condition 3 - is way to much for just 1 connection. At least with RegEx which sometimes can overcomplicate things. Probably Scripting would be much more efficient here, but we haven't got Scripting module.
I sorted it the following way:
connection A - accept jobs that match RegEx 1
Connection B - all others
connection BA - accept jobs that match RegEx 2
Connection BB - all others
connection BBA - accept jobs that match RegEx 3
Connection BBB - all others
And it seems to work fine so far.
Thank you very much for your reply. Indeed - this may come across as complicated.
I think as the RegEx is completely different and unique in each case (so that I cannot have 1 Expression for them all, at least I cannot put it in one ) - having all 3 conditions set-up on one connection, on the basis that either one can exist but not all of them, and to ask Switch to check the condition 1 or Condition 2 or Condition 3 - is way to much for just 1 connection. At least with RegEx which sometimes can overcomplicate things. Probably Scripting would be much more efficient here, but we haven't got Scripting module.
I sorted it the following way:
connection A - accept jobs that match RegEx 1
Connection B - all others
connection BA - accept jobs that match RegEx 2
Connection BB - all others
connection BBA - accept jobs that match RegEx 3
Connection BBB - all others
And it seems to work fine so far.
Re: NestedName with 3 RegEx rules -> Connection Issue
As it seems you have the scripting module, why not dealing this with a script, you would avoid multiple FS I/O operations especially on heavy files.
Re: NestedName with 3 RegEx rules -> Connection Issue
Unfortunately not, we do not have a Scripting module. The far end right element is a Execute Command Friend, where I create a BAT file, which basically is a text file, so gets then renamed to a TXT and passed further to the final folder as an Error Message regarding the whole Injected JOBloicaigon wrote:As it seems you have the scripting module, why not dealing this with a script, you would avoid multiple FS I/O operations especially on heavy files.
Neither we have a Switch portal to output custom error messages for the users there, so I had to go with a simpler yet still working solution to just get a Text file with Error description.
There is not a lot of errors possible - basically just 2 possibilities, so although it is not very elegant - I can live with it as it just works.
Re: NestedName with 3 RegEx rules -> Connection Issue
I'm glad you got it to work. I also like the creative usage of the Execute Command Friend