Expand my Community achievements bar.

Adding attachments to a task within process

Avatar

Level 4
Hi,

I am trying to add a PDF document (type : document) from process variables to an attachment list (type : list) of a task; and I see in Workspace the document is attached with the name attach0. The problem is, I can not open it because of its file extension is not set to pdf; to open the attached document I need to rename it after I save. Can I specify the file properties like file extension within a list of document?

Or is there a proper way to append a process form data (xfaForm or Document Form) to the attachments?
10 Replies

Avatar

Former Community Member
You can use the Set Value service to assign a name to your document variable. For example, before adding the document to my list, I perform the following Mapping:



Location | Expresssion

/process_data/@pdfAttachment | setDocAttribute(/process_data/@pdfAttachment, 'wsfilename', 'myfile.pdf')



The key is to set the wsfilename attribute of your document variable.

Avatar

Level 4
Hi again,

Thanks for fast reply. I have one other question about the attachments.

I have both xfaForm and Document Form typed form variables in my process. And what I would like to do is putting them in the attachment list. So, what is the conversion or the operation needed in or to see these documents as PDF in the Attachments.

Thanks.

Avatar

Level 10
If you have an xfaForm variable, you'll need to use RenderPDFForm (from Forms) to convert the xfaForm content into a PDF.



For the Document Form, it depends what it contains. If it contains an xdp, then you'll need to call RenderPDFForm. If it already contains a PDF then you can just get it with the following xPath myDocForm\object\document.



Jasmin

Avatar

Former Community Member
Hi, Jasmin



How to add a external file(.doc or .xls)as a attachement to a xfa form variable in process?



I've tried using the DDX and Assembler service.

When I set the input and output variable as document, the process works.

But when I set them as xfa form or document form, the process will fail by exception.

The Assembler service seems to accept the document type variable only.



the exception is :

Failure to invoke the job Assembler

Failure to invoke the job Assembler

Cannot coerce object: <document state="passive" senderVersion="0" persistent="false" senderPersistent="false" passivated="true" senderPassivated="false" deserialized="false" senderHostId="null" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="0" contentType="application/pdf" length="-1"><cacheId/><localBackendId><DocumentFileID fileName="C:\Documents and Settings\Administrator\Local Settings\Temp\AdobeDocumentStorage\local\docm1205306662328\b152e2c400d064ec2e16c01b547d25d1"/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGlobalBackendId/><inline/><senderPullServantJndiName/><attributes file="C:\Adobe watch folder\Assembler\stage\Wxb7cbc144aa8e397ee4b4725a\testform3.pdf"/></document> of type: com.adobe.idp.Document to type: class com.adobe.idp.taskmanager.form.impl.xfa.XFARepositoryFormInstance

ALC-DSC-600-000:

....

....



Will I need to transfer the xfa form or document form to document type? How to do that?

Or is there another way to achieve this goal?



Bking

Avatar

Former Community Member
yes Assembler accepts document object to assemble pdfs

mergeandfuse@gmail.com

Avatar

Level 10
The important thing with Assembler is that it only works on PDFs. The xfaForm variable is only really XML.



You can't just convert an xfaForm into a document variable.



What you need to do is use a RenderPDFForm operation and to convert your xdp into a PDF and then pass it to assembler.



Jasmin

Avatar

Former Community Member
Hi, Jasmin



I used the RenderPDFForm operation in Forms cataogory, and set the input parameter:

"Form to Render" = process variable (xfaForm type)

"Form data" = empty

and output parameter:

"Rendered Form" = another process variable(document type)

and others parameter set as default.



And I still got a exception when I try to run the process.

ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.

at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:210)

at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:134)

at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:44)

at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)

at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute

....



Do I need to config more parameter in RenderPDFForm operation node?

BTW, if once the xfaForm transfer to a document, can it transfer back?

Avatar

Level 10
the form to render parameter need to point to a valid path in the repository and not to an xfaForm variable. For example /MyFolder/MyForm.xdp.



Jasmin

Avatar

Former Community Member
Hi Jasmin



I set the form to render parameter to a xpd file in repository ,and

set the rendered form parameter to a process variable(document type).

It still got the ALC-DSC-003-000 exception.



Is the Form data parameter required?

I tried to set it empty or read an XML data form repository(as document type), and both got the same ALC-DSC-003-000 exception.

Avatar

Level 10
The data parameter is optional. Leave it blank for now so we can debug properly.



Can you check in the server.log for any errors? This might be more useful.



Jasmin