This content has been marked as final. Show 4 replies
the Read Resource Content component loads only "static" templates from the repository. If you want to populate the form with data you can use the renderPDFForm service of the Forms component. This serivce merges xml data with the form. But there are also other options to achieve that.
You find also more information in other threads, e.g. here:
Jasmin Charbonneau, "Output form as PDF" #5, 20 Nov 2007 10:26 am
Thanks for your reply, I will try out your suggestion and read the post you have linked to.
I have now tried out some of what is suggested in the post you refer to. However I have not been succesful in achieving the wanted scenario.
I need to send an xfaform with data to and end user and I have created a simple process that tries to do this. In my process I have the following:
- Two xdp-forms with embedded xml schema (added in the repository)
- inVar (Xfa form)
- middleVar (document)
- outVar (document)
- Read Resource Content service (start activity)
- Resource URI: \test.xdp
- result: middleVar
- importData (next activity)
- PDF document: middleVar
- input data: /process_data/inVar/object/data/xdp/datasets/data/*
- Data merged PDF: outVar
- sendWithDocument (last activity)
- attachment outVar
This fails when I invoke the process with an error that the PDF or data is malformed. Although the form and schema only contains one element (a textfield) - and I believe that it is setup correctly.
When I log the XML variable from /process_data/inVar/object/data/xdp/datasets/data/* i get:
and this seems correct to me, however the importData service will not accept it as stated above.
When I try to insert this xml as preview data in the Designer it shows up fine with "Test" inside the textfield.
How can I start my hunt for the solution to this problem?
Hope that you have not died during your reading of this post ;)
Have a nice weekend
You can't use importData on an XDP. This operation will only import data in a PDF.
You can use the renderPDFForm form the Forms service to convert your XDP into a PDF before calling importData, but the renderPDFForm can also merge the data for you.