Expand my Community achievements bar.

Problem exporting PDF document

Avatar

Former Community Member
I have a form implemented as a PDF form and would like to add a workflow step to my process so that the PDF form can be sent as an email attachment. Based on a previous posting, it seems that I need to use the RepositoryServices Read Resource Content operation to get the PDF form from the repository and add it to a process variable of type document. When I do this I get an type coercian error that states: "Cannot coerce object: com.adobe.idp.taskmanager.form.impl.xfa.XFARRepositoryFormInstance@15bb014 of type com.adobe.idp.taskmanager.form.impl.xfa.XFARRepositoryFormInstance to type class.lang.Boolean



I'm setting the Input Resource Uri to the literal value "/BDI_DEV/forms_BDI REP Form.pdf" and the Output variable to a varaible of type document - which as far as I can tell from the documentation should be correct. For some reason, however, the error message seems to indicate that the system is attempting to store the repository object in a boolean - I do have a process variable of type boolean, but the output variable I've selected is of type document.
5 Replies

Avatar

Former Community Member
looks like the variable mapping in the output of the read resource content is not of the correct type,can you please make sure it is of type document?

Avatar

Former Community Member
The output parameter is definately of type document. Here's the error as reported in the log file:



2007-12-25 15:44:01,734 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterLocal.doRequiresNew(com.adobe.idp.dsc.transaction.TransactionDefinition,com.adobe.idp.dsc.transaction.TransactionCallback) throws com.adobe.idp.dsc.DSCException:

ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance@1f8ca10 of type: com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance to type: class java.lang.Boolean

at com.adobe.idp.dsc.util.CoercionUtil.toBoolean(CoercionUtil.java:117)

Avatar

Former Community Member
can you send me the process xml to mergeandfuse@gmail.com

I will take a look and let you know asap

thanks

Avatar

Former Community Member
"WorkflowUser" was finally able to help me resolve the problem with creating a PDF document that can be saved to file or mailed to somebody - here's how he told be to configure things to get this working:



1. I created a process variable called XMLData of type xml.

2. I created a process variable called XMLDataDoc of type document.

3. I created a process variable called RenderedForm of type document.

4. I added a SetValue service step in which the following mappings were created:

- /process_data/XMLData is set to /process_data/REPForm/object/data/xdp

- /process_data/@XMLDataDoc is set to /process_data/XMLData

5. I added a renderPDFForm step using the FormsService. In this the following input and output parameters were configured:

- "Form to Render" was set to a literal value referencing the form template - i.e. BDI_DEV/forms/BDI REP Form.pdf

- "Form Data" was set to the XMLDataDoc variable.

- The "Content Root URI" field under "URL Options" was set to "repository:/

- The "Rendered Form" output section was set to reference the variable "RenderedForm".



This then allowed me to email the document using the RenderedForm variable.

Avatar

Level 3
Hi,



I really do the same. But always get "ContentRootURI not specified" error. Could you help?



Sedat,