Sorting files based on external (non job) text- or XML-file

Post Reply
MartynNitschmann
Newbie
Posts: 3
Joined: Fri Dec 31, 2010 11:25 am

Sorting files based on external (non job) text- or XML-file

Post by MartynNitschmann »

What I would like to have (and don’t know how to get to it), is a flow in PowerSWITCH,

which is sorting files based on numbers in an external list (txt or xml).



I.e. if the filename starts with, let’s say, a three digit number found on a single line in the mentioned list,

the file will be moved to folder A, if not, it should go to folder B.



The reason for this is, that we get lots of different pdfs from a customer, where the name of the files mark a certain colour-treatment (today 123 = task A, tomorrow 456 = task B, next day 789 = task A again).

I would like to give my co-workers (non-SWITCHIES) the chance, to change the "switch" by themselves.

Without the need to ask IT to change the flow (again and again and again).

Just only maintaining a list with lines of text.

What is on the list will move to task A, what is not in the list, will move on to task B



No way to use PDFX or JDF or XML per job, no other chance to differentiate between different tasks.

No



Hope, someone can give me a clue!



Martyn
bert_vr
Newbie
Posts: 14
Joined: Mon Dec 12, 2011 3:45 pm

Sorting files based on external (non job) text- or XML-file

Post by bert_vr »

Martyn,



I see a few possibilities:



1. If you make it an xml file you could use an Inject Job element on the incoming job in other to copy the xml into the flow. After that you can use an xml pickup inorder to make sure the xml is tagged on the actual job. Once it has become a dataset, you can select and use the xml info in any connection, just open the condition with variable option. Using the inject job allows you to keep the xml external



2. If you don,t need to keep it external you can just copy both the job and xml file into the hotfolder. After this straight to the xml pick-up and routing connection.



3. If you would prefer txt or csv, then you will need a script element to parse the txt info to xml. Contact professionalservices@enfocus.com. I'm sure they can help you with that.



4. You could also choose to create a script that has it's own polling interval in order to find out something was changed to the file and that it needs to locate the actual job to bring it automatically into teh flow. That's opposite behavior to the first three.



5. If you have a datebase with the same info as in the xml/txt file, then you could decide to leave out the external info and work with PowerSwitch directly on the database (needs to be ODBC compatible) with the database module. This has the advantage that you colleagues can work with the applications they use daily in order to change database values. PowerSwitch will then dynamically change its routing behavior.



Cheer,

Bert
Post Reply