Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How do I integrate the process with Watched Folder?

Avatar

Former Community Member
Hi,



How do I integrate the process with Watched Folder? There are many Watched Folder in our system and there are many process in our system. There is no way in Admin UI, to invoke the process that we want to start?



We want to use the offline capabilities of PDF platform. Users of our customer will copy-paste the offline PDF files in to a FTP folder. When a PDF file uploaded then start a specific LiveCycle process to export the data of PDF and save the data to the database.



We are currently using the Watched Folder service to convert the files in any type to the PDF format.



And now we want to create a process and use the Watched Folders as an Endpoint.



How do I do? Can anyone explain about integrity?



Thanks,

Esref Atak

vukuf.com
16 Replies

Avatar

Level 10
Please take a look at the following documentation: http://help.adobe.com/en_US/livecycle/8.2/overview.pdf. There is a section called LiveCycle ES Watched Folder that can get you started.



Jasmin

Avatar

Former Community Member
Hi Jasmin,



There is no useful information about Watched Folder in the 8.2 overview doc. It contains surface information.



We need a deeply informated doc, like that: http://blogs.adobe.com/livecycle/2007/12/simple_stupid_pdf_generator_wa.html



Can you help me in step-by-step style?



Did you ever complete a project like we need about Watched Folder?



Thanks,

Esref Atak

vukuf.com

Avatar

Level 10
What you're trying to do seems to be very straightforward (unless I missed something).



1- Create you LC process.

2- Add a watch folder.

3- Configure the watch folder.

3-1 Specify a folder where the file will be picked up.

3-2 Configure the input and output parameters for your process.



Have you tried to configure it? Give it a try. You'll see it's not that bad.



If you run into problem, then we'll help.



Jasmin

Avatar

Level 2
Hi Jasmin,

I am working on same the issue. I create a simple process, then add watch folder endpoint(Home/Services/Applications and Services/Endpoint Management/Configure deneme07agu/Add WatchedFolder Endpoint)

But i cant estimate what to define for Input Parameter and Output Parameter mappings. Do you have any suggestion?



Thanks in advance..

Murat

Avatar

Level 10
Usually you want an INPUT variable of type 'document' to store the file you drop in the watch folder.



Then when you go under the configuration, under the Input Mapping Section.



Map your input document to *.* (for every file type you may drop) or *.pdf (if you only want to get PDF)



As for the output, you can also use a 'document' variable and set it to OUTPUT.

The mappging for that variable would be the name of the pdf to write to the file system (i.e. MyFile.pdf). You can use the keyword %F and %E if you want to reuse the name and/or the extension of the input file (i.e %F.pdf).



Jasmin

Avatar

Former Community Member
Hi Jasmin,



I have created a video to explain where is the problem. It is accessable at:



http://www.medyasoft.com.tr/blog/watched-folder-forum-sample/index.htm



Occur an error when we copy an offline PDF to the Watched Folder. You can see the problem in video.



I hope this video helps to our to explain the problem.



Thanks for your support,

Esref Atak

vukuf.com

Avatar

Level 10
I watched the video and I can identify two things:



1- When you create your watch folder endpoint you don't specify anything for your output variable. That might be what you want to do. I just wanted to make sure you realize that nothing will be written to the result folder when there is no more errors.



2- The error your getting is because of a coercion error. That means it's trying to cast one data type into another. From what I can see you're trying to put the content of your 'document' variable into an xfaForm and that won't work since one is binary (document contains PDF) and the other on is XML. Is this possible. Without seeing your process I can only guess.



Jasmin

Avatar

Former Community Member
Thank you for your reply.



We have prepared a new video to show the process in Workbench. The video is accessable at:



http://www.medyasoft.com.tr/blog/watched-folder-process/index.htm



Thanks,

Esref Atak

vukuf.com

Avatar

Level 10
Like I suspected your trying to put a PDF in xfaForm variable.



The xfaForm variable is a pointer to a xdp or PDF and has a render service associated with it, but the content of the variable is XML and not PDF.



If you use a watch folder, you need the input variable to be of type 'document' and not xfaForm because it contains the whole PDF and not just the xml data.



Jasmin

Avatar

Former Community Member
Hi again,



In out process we want people can submit forms via workspace or offline. So I have to use xfa form for workspace, (am I wrong?) but on the otherhand you say that; we need input variable as document. What do you recommend for us?



Thank in advance

Enjoy your weekend.



Thanks,

Esref Atak

vukuf.com

Avatar

Level 10
My recommendation is to create three processes.



The first one is what you currently have except the database operation. It'll call process #3 to update the database



The second one is another process that has a document variable as an input (so you can use the watch folder) and then call process #3 to update the data in DB.



The third process will actually do the work (saving to db etc.).



That way you decouple the different endpoints and their need to have different input variables and isolate the logic in a third process.



Does that make sense.



Jasmin

Avatar

Former Community Member
Hi Jasmin,



First, thanks for your patience,



We followed your advices. When we drop a pdf to watch folder, it creates a new record in db. But the record is empty??



Thanks,

Esref Atak

vukuf.com

Avatar

Level 10
Are you passing the content of the PDF from the watch folder process to the process that saves it to the database properly?



I'm assuming you have an IN variable on the process that saves the pdf to the DB.



Do you pass the variable that contains the pdf from the watchfolder process as an input parameter to the watchfolder process?



Use the record and playback feature to check if you get the variable populated properly in the watchfolder process first.



The check if it's being pass to the DB process properly.



How are you updating the DB. Are you using the parametrize query option. That's only way you'd get the pdf in the database.



Jasmin

Avatar

Former Community Member
I have created a new video for you. You can reach it from the link below.



http://www.medyasoft.com.tr/blog/watched-folder-playback/watched-folder-playback.htm



I have 2 variable in the process. First one is document type, other is xml. When pdf is sent to watch folder process starts. Then I convert document variable into xml variable. At the end, I try to write the values to database. I dont know why but values are empty. (You can also see empty record on the video)



Thanks for help

Esref Atak

vukuf.com

Avatar

Level 10
The problem is when you try to convert the document variable (that contains PDF) into a xml variable.



The document variable contains binary information (the pdf) and you're trying to put that into a XML variable. The SetValue doesn't know anything about PDF and won't extact the data for the PDF automatically.



At this point (and I'm not sure because I can't see the content of the xml variable from the recording), I think it put the whole PDF under process_data/form_1/form1/Johnson node.



You need an intermediate step before the setValue to extract the data from the PDF and then assign it to the xml variable. You can use the ExportData operation from the Form Data Integration service to do that.



Jasmin

Avatar

Level 2
Hi Jasmin,

Finally we solved the problem. Thanks for your help and patience.

Best regards

Murat