15 Replies Latest reply on Aug 20, 2008 7:04 AM by (Siham_Aboumadi)

    Problem "send Email with Attachment"

    Level 1
      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.
        • 1. Re: Problem "send Email with Attachment"
          Jasmin Charbonneau Level 4
          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
          • 2. Re: Problem "send Email with Attachment"
            Level 1
            Hi,
            Thanks.
            But how can it be done ?
            Can I get attributes of Document Form ?
            • 3. Re: Problem "send Email with Attachment"
              Jasmin Charbonneau Level 4
              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
              • 4. Re: Problem "send Email with Attachment"
                Level 1
                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
                • 5. Re: Problem "send Email with Attachment"
                  Level 1
                  Hi,
                  When I put /process_data/NameForm/object/@document in a String I have :

                  rO0ABXNyABZjb20uYWRvYmUuaWRwLkRvY3VtZW50yAEFUxsO+CEDACNJAAtfY2FsbGJhY2tJZFoADV9kZXNlcmlhbG l6ZWRJABBfZGlzcG9zYWxUaW1l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VEg9NDcwOTQ1JlNFUlZFUl 9OQU1FPWl0ZW0tNTU2Njd4dzcALWFkb2JlL2lkcC9Eb2N1bWVudFB1bGxTZXJ2YW50L2Fkb2JlamJfc2VydmVyMQAA AAAABy+heA==

                  I tried to put this in a xfa but it didn't work.
                  thanks.
                  • 6. Re: Problem "send Email with Attachment"
                    Level 1
                    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
                    • 7. Re: Problem "send Email with Attachment"
                      Level 1
                      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.
                      • 8. Re: Problem "send Email with Attachment"
                        Jasmin Charbonneau Level 4
                        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
                        • 9. Re: Problem "send Email with Attachment"
                          Level 1
                          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
                          • 10. Re: Problem "send Email with Attachment"
                            Jasmin Charbonneau Level 4
                            What's the exception?

                            Jasmin
                            • 11. Re: Problem "send Email with Attachment"
                              Level 1
                              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\docm1219048296 646\bb4e96fcaf58da04a338b1022370c9ad"/><globalBackendId/><senderLocalBackendId/><senderGlo balBackendId><DocumentFileID fileName="D:\Adobe\LiveCycle8.2\jboss\server\all\svcnative\DocumentStorage\docm1219048296 646\bb4e96fcaf58da04a338b1022370c9ad"/><senderGlobalBackendId/><inline/><senderPullServant JndiName>adobe/idp/DocumentPullServant/adobejb_server1</senderPullServantJndiName><attribu tes 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-556 67: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-5566 7" 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\docm1219048296 646\bb4e96fcaf58da04a338b1022370c9ad"/><globalBackendId/><senderLocalBackendId/><senderGlo balBackendId><DocumentFileID fileName="D:\Adobe\LiveCycle8.2\jboss\server\all\svcnative\DocumentStorage\docm1219048296 646\bb4e96fcaf58da04a338b1022370c9ad"/><senderGlobalBackendId/><inline/><senderPullServant JndiName>adobe/idp/DocumentPullServant/adobejb_server1</senderPullServantJndiName><attribu tes 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-556 67: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-5566 7" 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(ProcessEngineBMTBea n.java:2773)<br />     at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncContinueBranchCommand(ProcessEngineBM TBean.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(StatelessSessionConta iner.java:214)<br />     at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.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:1 58)<br />     at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)<br />     at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance Interceptor.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)<b r />     at $Proxy320.asyncContinueBranchCommand(Unknown Source)<br />     at com.adobe.workflow.engine.ProcessCommandControllerBean.doOnMessage(ProcessCommandControll erBean.java:144)<br />     at com.adobe.workflow.engine.ProcessCommandControllerBean.onMessage(ProcessCommandController Bean.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.j ava:475)<br />     at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI nterceptor.java:149)<br />     at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterc eptor.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)<b r />     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(JMSContainerI nvoker.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
                              • 12. Re: Problem "send Email with Attachment"
                                Level 1
                                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.
                                • 13. Re: Problem "send Email with Attachment"
                                  Level 1
                                  send me the process, will take a look
                                  mergeandfuse@gmail.com
                                  • 14. Re: Problem "send Email with Attachment"
                                    Jasmin Charbonneau Level 4
                                    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
                                    • 15. Re: Problem "send Email with Attachment"
                                      Level 1
                                      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.