You are viewing limited content. For full access, please sign in.

Question

Question

PDF Overwrite (new version) using Workflow

asked on August 16, 2018

I'm hoping that someone can help me with a situation that seems simple but is not working for me. I have a PDF that is being generated by workflow (script) and saved in a temp location in Laserfiche. I need to replace the old PDF with this new one, keeping the "OLD" PDF's Entry ID. I've tried a few different ways but cannot seem to get it to work. What step am I missing? As you see below, I find the old one (only 1 file exists) and then I download it (not sure I need to), then find the new PDF that was just entered into LF (only 1 file exists), download it, and then attach to the old one found. I've tried 'for each entry' as well just in case that made a difference but it does not. 

I've also tried the WF activity 'move pages' but that only works for TIFF images. 

 

Any thoughts on this? Your help is appreciated!!

 

0 0

Replies

replied on August 17, 2018 Show version history

Would this work?

After your search, add the "Assign Token Values" and point it to your search of the OLD doc, then choose FirstResult_ID. So now you have the Entry ID, then you can try the steps with the new Document.

As for the Attach Electronic Document Activity, Source would be "Activity" then you will choose the Search Repository > Output Entries, Attach File to would be to the Other Entry > Find New PDF.

 

Does that help or do you need more help with the document replacement itself?

0 0
replied on August 20, 2018

Hi Lidija, 

The problem comes when it's doing the document replacement, not finding the source document. The way I've got it set up finds 1 entry doing the search and the attach electronic document is set to activity to use the search result. 

Sorry, I should have been more clear on what 'isn't working'. The workflow shows as though it worked successfully, looking at all of the steps highlighted in green. The details show that it finds the old pdf and the new pdf just fine. 

In earlier testing I was actually getting a change, not the correct one but what it was doing was converting the old pdf to XML. Again not sure why this was happening but that was on my customers dev environment. On my system it's just not replacing the pdf at all. 

 

0 0
replied on August 20, 2018

You can test out if it is not finding a document or see if it is but isn't doing what it is supposed to be doing - either add Track Token activity and track them all (you want to see that the Search result is not 0), or you can add a Conditional Sequence and have it email you if the Search result is 0. This will tell you if it isn't finding the document. With the search activity, it will be green even if it doesn't find anything because it ran properly. Let's start there!

0 0
replied on August 20, 2018

Hi Lidija, 

As I mentioned above the workflow is finding the document, both old and new. Here's a snipit: 

 

0 0
replied on August 20, 2018 Show version history

I just noticed my searches were finding the same document, I had forgot the subfolder name in the search. Once I made this change it worked! So it was a user error lol. The only thing I notice though is there is no version change, it just replaced the old pages with the new pages. After clicking this on the old document it tracks the version:

 

Thanks for your help! 

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.