Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Problem "send Email with Attachment"

Avatar

Former Community Member
Hi,

I want send an Email with Attachment but I can't attach "xfa","Document Form" type to my mail.

I have :



Cannot coerce object: com.adobe.idp.taskmanager.form.impl.binarycontent.BinaryContentFormInstance@49dda9 of type: com.adobe.idp.taskmanager.form.impl.binarycontent.BinaryContentFormInstance to type: interface java.util.List: ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: com.adobe.idp.taskmanager.form.impl.binarycontent.BinaryContentFormInstance@49dda9 of type: com.adobe.idp.taskmanager.form.impl.binarycontent.BinaryContentFormInstance to type: interface java.util.List

at com.adobe.idp.dsc.util.CoercionUtil.toMap(CoercionUtil.java:1201)

at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:981)



and more.



Any ideas?

Thanks.
15 Replies

Avatar

Level 10
The Email with Attachment expects the content of attachment to be in a 'document' variable.



If you want to attach the a Document Form, you would have to extract the content of that variable and put it in a 'document' variable.



Jasmin

Avatar

Former Community Member
Hi,

Thanks.

But how can it be done ?

Can I get attributes of Document Form ?

Avatar

Level 10
Sure you can.



You can use a xPath expression in a setValue. Something like /process_data/MyDocumentForm/object/document.



This will give you data for the Document Form variable.



Jasmin

Avatar

Former Community Member
Workbench ES Help documents the attributes for all variable types.



For Document Form, click Data Items in this topic:



http://livedocs.adobe.com/livecycle/es/wb_help/00000752.html



scott

Avatar

Former Community Member
Hi,

When I put /process_data/NameForm/object/@document in a String I have :



rO0ABXNyABZjb20uYWRvYmUuaWRwLkRvY3VtZW50yAEFUxsO+CEDACNJAAtfY2FsbGJhY2tJZFoADV9kZXNlcmlhbGl6ZWRJABBfZGlzcG9zYWxUaW1lb3V0WgAJX2Rpc3Bvc2VkWgAZX2lzRGlzcG9zYWxUaW1lb3V0RGVmYXVsdFoAE19pc1RyYW5zYWN0aW9uQm91bmRKAAdfbGVuZ3RoSQAOX21heElubGluZVNpemVaAAhfb3duRmlsZ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ks.

Avatar

Former Community Member
in the email component for the attachment variable,drill down into the documentForm object and select the document node.This will send the document as email attachment

girish

mergeandfuse@gmail.com

Avatar

Former Community Member
Hi,

I tried to put in Attachments field :

/process_data/NameForm/object/@document



I have an exception to "Send Email with Attachments":

Cannot coerce object ...



And I tried to put /process_data/NameForm/object/@document in a document variable but I have the same exception type.

Avatar

Level 10
Try to put it in an document variable instead of accessing the property of the Document Form. The way you do it should be fine, but for some reason LC might not like it.



Just use a setValue before and extract the document in a document variable and see if that works.



Jasmin

Avatar

Former Community Member
Hi,

I tried to put /process_data/NameForm in a document variable (with a setValue) and send it, but exception.

I tried to put /process_data/NameForm/object/@document in a document variable, with a setValue, and, after, export this document variable(with exportData) in an other document variable and send it, but exception.

Thanks

Avatar

Former Community Member
Cannot coerce object: <document state="passive" senderVersion="3" persistent="false" senderPersistent="true" passivated="true" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1/172.31.196.171" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="0" contentType="application/pdf" length="478293"><cacheId/><localBackendId/><globalBackendId><DocumentFileID fileName="D:\Adobe\LiveCycle8.2\jboss\server\all\svcnative\DocumentStorage\docm1219048296646\bb4e96fcaf58da04a338b1022370c9ad"/><globalBackendId/><senderLocalBackendId/><senderGlobalBackendId><DocumentFileID fileName="D:\Adobe\LiveCycle8.2\jboss\server\all\svcnative\DocumentStorage\docm1219048296646\bb4e96fcaf58da04a338b1022370c9ad"/><senderGlobalBackendId/><inline/><senderPullServantJndiName>adobe/idp/DocumentPullServant/adobejb_server1</senderPullServantJndiName><attributes ADOBE_SHAREDPDFDOCUMENT_NEEDS_COPY="true" templatePath="/POCs/FT SI RH/FormulaireAbsence V2.pdf" userAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16" environment="&HTTP_ACCEPT_LANGUAGE=fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3&HTTP_HOST=item-55667:8080&HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16&CONTENT_TYPE=application/pdf&CONTENT_LENGTH=478293&SERVER_NAME=item-55667" ADOBE_SAVE_MODE_ATTRIBUTE="NO_CHANGE" ADOBE_SAVE_MODE_FORCE_COMPRESSED_OBJECTS_ATTRIBUTE="false" ADOBE_SAVE_MODE_REQUIRED_ATTRIBUTE="false"/></document> of type: com.adobe.idp.Document to type: interface java.util.List: ALC-DSC-119-000: com.adobe.idp.dsc.util.InvalidCoercionException: Cannot coerce object: <document state="passive" senderVersion="3" persistent="false" senderPersistent="true" passivated="true" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1/172.31.196.171" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="0" contentType="application/pdf" length="478293"><cacheId/><localBackendId/><globalBackendId><DocumentFileID fileName="D:\Adobe\LiveCycle8.2\jboss\server\all\svcnative\DocumentStorage\docm1219048296646\bb4e96fcaf58da04a338b1022370c9ad"/><globalBackendId/><senderLocalBackendId/><senderGlobalBackendId><DocumentFileID fileName="D:\Adobe\LiveCycle8.2\jboss\server\all\svcnative\DocumentStorage\docm1219048296646\bb4e96fcaf58da04a338b1022370c9ad"/><senderGlobalBackendId/><inline/><senderPullServantJndiName>adobe/idp/DocumentPullServant/adobejb_server1</senderPullServantJndiName><attributes ADOBE_SHAREDPDFDOCUMENT_NEEDS_COPY="true" templatePath="/POCs/FT SI RH/FormulaireAbsence V2.pdf" userAgent="Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16" environment="&HTTP_ACCEPT_LANGUAGE=fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3&HTTP_HOST=item-55667:8080&HTTP_USER_AGENT=Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16&CONTENT_TYPE=application/pdf&CONTENT_LENGTH=478293&SERVER_NAME=item-55667" ADOBE_SAVE_MODE_ATTRIBUTE="NO_CHANGE" ADOBE_SAVE_MODE_FORCE_COMPRESSED_OBJECTS_ATTRIBUTE="false" ADOBE_SAVE_MODE_REQUIRED_ATTRIBUTE="false"/></document> of type: com.adobe.idp.Document to type: interface java.util.List<br /> at com.adobe.idp.dsc.util.CoercionUtil.toMap(CoercionUtil.java:1201)<br /> at com.adobe.idp.dsc.util.CoercionUtil.toType(CoercionUtil.java:981)<br /> at com.adobe.workflow.datatype.CoercionUtil.toType(CoercionUtil.java:168)<br /> at com.adobe.workflow.engine.PEUtil.processMapping(PEUtil.java:952)<br /> at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:658)<br /> at com.adobe.workflow.engine.SynchronousBranch.handleInvokeAction(SynchronousBranch.java:465)<br /> at com.adobe.workflow.engine.SynchronousBranch.execute(SynchronousBranch.java:862)<br /> at com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBean.java:2773)<br /> at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncContinueBranchCommand(ProcessEngineBMTBean.java:2528)<br /> at sun.reflect.GeneratedMethodAccessor1208.invoke(Unknown Source)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> at java.lang.reflect.Method.invoke(Method.java:585)<br /> at org.jboss.invocation.Invocation.performCall(Invocation.java:345)<br /> at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)<br /> at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)<br /> at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)<br /> at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)<br /> at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)<br /> at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:158)<br /> at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)<br /> at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)<br /> at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)<br /> at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)<br /> at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)<br /> at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)<br /> at org.jboss.ejb.Container.invoke(Container.java:873)<br /> at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)<br /> at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)<br /> at $Proxy320.asyncContinueBranchCommand(Unknown Source)<br /> at com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControllerBean.java:144)<br /> at com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandControllerBean.java:99)<br /> at sun.reflect.GeneratedMethodAccessor962.invoke(Unknown Source)<br /> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br /> at java.lang.reflect.Method.invoke(Method.java:585)<br /> at org.jboss.invocation.Invocation.performCall(Invocation.java:345)<br /> at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:475)<br /> at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)<br /> at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:101)<br /> at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)<br /> at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)<br /> at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)<br /> at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:94)<br /> at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)<br /> at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:389)<br /> at org.jboss.ejb.Container.invoke(Container.java:873)<br /> at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:1077)<br /> at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1379)<br /> at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256)<br /> at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:904)<br /> at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:160)<br /> at org.jboss.mq.SpySession.run(SpySession.java:333)<br /> at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180)<br /> at EDU.oswego.cs.dl.util.concurrent.Pool

Avatar

Former Community Member
Siham,



It looks like you are calling sendWithMapOfAttachments and passing a single document as the attachment? If you are only passing a single document, you should call SendWithDocument instead.

Avatar

Former Community Member
send me the process, will take a look

mergeandfuse@gmail.com

Avatar

Level 10
The error essentially says that it cannot convert a content of type "document" into a list.



Does that make sense with something you're doing?



Jasmin

Avatar

Former Community Member
Thanks everybody !!

So, I used an activity from LC 8.0 on my Workbench 8.2.

Now, I use "SendWithDocument" and it works!!!

Thanks a lot.