Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Losing attachments to form

yodadobe
Level 6
Level 6
My workflow is launched with the submission of a PDF rendered from an XDP. Files attached to the form are gone at the next step. I have tried selecting "Copy All Notes and Attachments From Previous Task" as listed here: http://livedocs.adobe.com/livecycle/8.2/wb_help/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Workbe... , but it did not work. That seems to relate to attachments to the workflow.
13 Replies
pguerett
Level 10
Level 10
Are you attaching the files to the envelope in the task or the PDF in the form? That setting is to copy attachments from the tasks. My guess is that you are adding the attachments to the PDF and then re-rendering at the next step.
yodadobe
Level 6
Level 6
I am attaching them to the PDF. I am using the same template at every step and want the attachments in the form after the workflow ends. So I want the attachments on the form at all steps so as not to be confusing to the users.



Here is the direction I am heading, not sure if correct: I copied the Default Render then edited. I added a input/output variable called attachments of type map, subtype document. I set Attachments in the input section of the Render Form step to that variable.
pguerett
Level 10
Level 10
You are mixing the two methods. Are you using an XFA form variable or a document form var to render the PDF?
yodadobe
Level 6
Level 6
I am not sure what two methods you are referring to. I am just fumbling around trying to get something to work.



I am using an XFA Form variable.
pguerett
Level 10
Level 10
There are two methods to deal with an attachment. The 1st one is to embed it in the PDF using the form to transform the attcahment around. The 2nd way is to use the attachments on the Task (shows up in the Webspace UI. The adding of the map of objects on the User step is using the 2nd way. The way you described how you added the attachments is using the 1st way. Because you are using an XFAForm var that means that at each step the PDF is getting regenerated (combining the template and data together). When you submit the completed form you are only sending in the data (that does not inclide the attachments). Hence when the form is recreated at the next step there are no attachments.



NOw to fix your problem. I suggest that you use the 2nd technique (it is easier). On the TaskManager endpoint for your process there are two checkboxes that need to be set on. The "Show Attachment Window" and the "Allow Attachment adding". Once this is done when you click on the start task, there will be a new tab called attachments (next to the form tab) that will allow you to deal with attachments. Now the settinngs that you have been playing with on the User task will be in effect.



Make sense?
yodadobe
Level 6
Level 6
Unfortunately, what is easier for the developer rarely has much impact on how the customer wants it to work. With option 2, there would still the issue of getting the attachments into an archive version of the form for after the workflow is over. Also, the PDF still has an attachment tab which allows attachments that will disappear. That is quite confusing for the user. Can that tab be disabled on a per form basis?



How can I do option 1? I looked at the submit tab of my submit button. Submit As is currently XDP. Under include, PDF is not checked. I am assuming I either need to submit as PDF, or check the box to include PDF with the XDP. How to get them into a variable from there, I have no idea at this point.
pguerett
Level 10
Level 10
For the option to appear in the PDF (assuming Reader is beingn used) the form must be Reader Extended. If it is not Reader Extended then that tab will not appear. You can always add the attachments from the task to the PDF as the last step before archiving (LC Assembler can do that for you).



If you want to stick with the PDF route then you must change your renderer to the Default one and use a document Form instead of an XFAForm. This will allow you to submit a full PDF and route it from step to step. Note that you will have to modify the submit button on the form to submit PDF and not XDP. Look at the _FSSubmit button (it is hidden) if you used the process fields.
yodadobe
Level 6
Level 6
Many of the app's users have Acrobat or Acrobat Professional so they would see the tab. We have Reader Extensions so it can be added for Reader users.



If I route as a PDF, will I still be able to change data in the Form?
yodadobe
Level 6
Level 6
I created a new process with one step, assign to user. It assigns to the originator so I pull it up right away and see if the attachments stayed.



I created a variable of type Document Form as you suggested. There is no provision for a schema. I did not get it working with the original file being an XDP, but did as a PDF. It does carry the attachments through to the next step. However, I don't see how to alter values in the form. It appears I have to use FormAugmenterService to get values out. I tried using an XPath expression to set a value and it failed.
pguerett
Level 10
Level 10
If you are using a Document Form then you are dealing with a complete PDF, not an XML data file. The XPath expressions only work on XML. Although dealing with attachments is easier this way, dealing with data is not. You will have to extract the data from the PDF (using the ExportData service under the Common/Form Data Integration category. This will allow you to extract the data from the PDF into a document variable. then you can use a SetValue to cast the document into an XML var. Now that it is XML you can use XPath to interogate what it was you were looking for.



Make sense?
yodadobe
Level 6
Level 6
What about changing values in the form?
pguerett
Level 10
Level 10
Then you will have to remerge the data back onto the form in your process before sending it back out. The importData service (in the same location as the other one) will do the trick.