Hi, I'm having problems with watched folder endpoint.<br /><br />I have a very simple process which consists of one activity - assign task and I want to start this process by copying a PDF to specified folder. I've added a watched folder endpoint for this process and it automatically created appropriate sub folders (input, result, failure etc.).<br /><br />The problem starts when I copy a PDF file to the input folder. LiveCycle picks up the file but the process doesn't start. PDF gets moved to the failure folder and the failure.log shows the reason:<br /><br />ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: <document description here> of type: com.adobe.idp.Document to type: class com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance<br /><br />What am I doing wrong?<br /><br />Thanks<br />Bartek
When you create your watch folder endpoint, you have to map some of the input variables for your process to a file pattern.
This will take the file matching the pattern and put it in that variable. Now the variable type needs to be the right type to receive the file.
From your error, it looks like you're trying to put a PDF file in a xfaForm variable, which wouldn't work. You need to put the PDF in a document variable.
So, make sure in your process that you have an input document variable. Then in your watch folder configuration, when you map your input varibale to a file pattern, make sure you select literal and a pattern like *.pdf
processFormSubmission returns a FormsResult object that might gives you more information depending how the form was rendered.
If you render in HTML or Guide, you get information like the button clicked, you can go to a next page, run server side validations.
If you render a PDF, processFormSubmission gives you a little bit of information on the PDF like if the form contains file attachments, get the size of the documents, number of pages, things like that.
If you just want to get the data out and are not interested in anything else, then exportData should be good enough.