Replace a new job in a folder

Post Reply
tsellem
Newbie
Posts: 8
Joined: Thu Feb 02, 2012 6:11 pm

Replace a new job in a folder

Post by tsellem »

Hello,
I've a problem to delete or replace a new version of a job in a flow due to the unique ID.
I've a flow where Inject must match proper name of a XML and a PDF to continue the flow, and I can easely check if an file have been already processed, but I want the new file to cancel or replace the previous file that already exist in the folder of injection.
As it can be seen on attachment, I want to delete or replace a job already there in the folder "Wait Match XML-PDF" but the new file comes with a new unique ID so, the new file just add the list of job in destination folder.

Many thanks for your help or any suggestion.

Thierry.
Test-Replace.png
Test-Replace.png (28.64 KiB) Viewed 5147 times
tsellem
Newbie
Posts: 8
Joined: Thu Feb 02, 2012 6:11 pm

Re: Replace a new job in a folder

Post by tsellem »

Hello,
Any idea how replace the new name file in the folder "Wait Match xml-pdf name" ? (As an new existing file arrives by "Dossier 4")
Many thanks everybody.
Padawan
Advanced member
Posts: 358
Joined: Mon Jun 12, 2017 8:48 pm
Location: Belgium
Contact:

Re: Replace a new job in a folder

Post by Padawan »

The only way to have new jobs overwrite old jobs that I'm aware of is to store them in an output folder of a Switch flow. That way they don't have the Switch unique prefix anymore, but they also won't have any of the Switch metadata anymore.

Once they are in an output folder without prefix, then an inject job could pick the file up on the moment it is needed.
loicaigon
Advanced member
Posts: 372
Joined: Wed Jul 10, 2013 10:22 am

Re: Replace a new job in a folder

Post by loicaigon »

I would say that one "easy solution" would be not to have to replace the job. That could be achieved by looping the incoming job to the inject lite element for as long as the "true" job isn't found. The hiccup is that it will consume resource and risk is that the job is never found without exit scenario.

The other solution is to use a switch script to mimick inject lite behaviour but by adding a timeout property so you can fail the job at some point if the file cannot be found after some time.

FWIW

Loic
Post Reply