2 Replies Latest reply on Jan 17, 2011 10:53 PM by Abhinav Sharma

    Writing flattened PDF on disk !!

    Abhinav Sharma Level 2

      Hi,

       

      Please help me on this.

       

      I have a livecycle process which uses a template PDF Form and a process variable ( XML Form Data ). In this long lived process there are multiple steps (users, operations etc.). At the LAST Step I need to write a flattened PDF file (Template Form with final XML Data) on disk.

       

      The way I tried:

       

      Step: 1 -

      • Placed a generatePDFOutput service, Here I merge template with xml form data,
      • Output stored in another process variable 'outDoc' of document type.

       

      Step: 2 -

      • Place a Write Document service next to above step. Input document - outDoc (output doc of previous step)
      • Set others parameters, In Pathname Patterns I have just set the directory path.

       

      But when I am running this, it is giving an error.

       

      Error-

       

      com.adobe.workflow.datatype.InvalidCoercionException: Cannot coerce object: <document state="passive" senderVersion="3" persistent="true" senderPersistent="false" passivated="true" senderPassivated="true" deserialized="true" senderHostId="127.0.0.1//////////192.168.1.200///////" callbackId="0" senderCallbackId="0" callbackRef="null" isLocalizable="true" isTransactionBound="false" defaultDisposalTimeout="600" disposalTimeout="600" maxInlineSize="65536" defaultMaxInlineSize="65536" inlineSize="28332" contentType="application/pdf" length="-1"><cacheId/><localBackendId/><globalBackendId/><senderLocalBackendId/><senderGlobalBackendId/><inline>%PDF-1.7
      %����
      32 0 obj
      <</Filter/FlateDecode/First 15/Length 220/N 3/Type/ObjStm>>stream
      h޼O�
      �@...</inline><senderPullServantJndiName>adobe/idp/DocumentPullServant/adobejb_server1</senderPullServantJndiName><attributes CONTENT_TYPE="OUTPUT_DATA" RESULT_REPORT="[B@1aeb36f" basename="052263c11ee0a2f8b0a688d8926726f6" file="C:\Windows\Temp\AdobeDocumentStorage\local\docm1294992843250\052263c11ee0a2f8b0a688d8926726f6" wsfilename="C:\Windows\Temp\AdobeDocumentStorage\local\docm1294992843250\052263c11ee0a2f8b0a688d8926726f6"/></document> of type: com.adobe.idp.Document to type: java.lang.Integer
           at com.adobe.workflow.dom.VariableAttr.setBoundValue(VariableAttr.java:69)
           at com.adobe.workflow.pat.service.PATExecutionContextImpl.setProcessDataValue(PATExecutionContextImpl.java:796)
           at com.adobe.workflow.engine.PEUtil.invokeAction(PEUtil.java:926)
           at com.adobe.workflow.engine.SynchronousBranch.handleInvokeAction(SynchronousBranch.java:510)
           at com.adobe.workflow.engine.SynchronousBranch.execute(SynchronousBranch.java:888)
           at com.adobe.workflow.engine.ProcessEngineBMTBean.continueBranchAtAction(ProcessEngineBMTBean.java:2797)
           at com.adobe.workflow.engine.ProcessEngineBMTBean.asyncContinueBranchCommand(ProcessEngineBMTBean.java:2551)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
           at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
           at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
           at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
           at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
           at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:173)
           at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:77)
           at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
           at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
           at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
           at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
           at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
           at org.jboss.ejb.Container.invoke(Container.java:960)
           at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
           at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
           at $Proxy410.asyncContinueBranchCommand(Unknown Source)
           at com.adobe.idp.workflow.dsc.service.ProcessCommandExecutorService.continueBranch(ProcessCommandExecutorService.java:39)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.java:118)
           at com.adobe.idp.workflow.dsc.invoker.WorkflowDSCInvoker.invoke(WorkflowDSCInvoker.java:154)
           at com.adobe.idp.dsc.interceptor.impl.InvocationInterceptor.intercept(InvocationInterceptor.java:140)
           at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
           at com.adobe.idp.dsc.interceptor.impl.DocumentPassivationInterceptor.intercept(DocumentPassivationInterceptor.java:53)
           at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
           at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor$1.doInTransaction(TransactionInterceptor.java:74)
           at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.execute(EjbTransactionCMTAdapterBean.java:357)
           at com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionCMTAdapterBean.doSupports(EjbTransactionCMTAdapterBean.java:227)
           at sun.reflect.GeneratedMethodAccessor696.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
           at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:237)
           at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:158)
           at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:169)
           at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
           at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
           at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:378)
           at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
           at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
           at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
           at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:138)
           at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:648)
           at org.jboss.ejb.Container.invoke(Container.java:960)
           at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
           at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
           at $Proxy378.doSupports(Unknown Source)
           at com.adobe.idp.dsc.transaction.impl.ejb.EjbTransactionProvider.execute(EjbTransactionProvider.java:104)
           at com.adobe.idp.dsc.transaction.interceptor.TransactionInterceptor.intercept(TransactionInterceptor.java:72)
           at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
           at com.adobe.idp.dsc.interceptor.impl.InvocationStrategyInterceptor.intercept(InvocationStrategyInterceptor.java:55)
           at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
           at com.adobe.idp.dsc.interceptor.impl.InvalidStateInterceptor.intercept(InvalidStateInterceptor.java:37)
           at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
           at com.adobe.idp.dsc.interceptor.impl.AuthorizationInterceptor.intercept(AuthorizationInterceptor.java:165)
           at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
           at com.adobe.idp.dsc.interceptor.impl.JMXInterceptor.intercept(JMXInterceptor.java:48)
           at com.adobe.idp.dsc.interceptor.impl.RequestInterceptorChainImpl.proceed(RequestInterceptorChainImpl.java:60)
           at com.adobe.idp.dsc.engine.impl.ServiceEngineImpl.invoke(ServiceEngineImpl.java:121)
           at com.adobe.idp.dsc.routing.Router.routeRequest(Router.java:129)
           at com.adobe.idp.dsc.provider.impl.base.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:93)
           at com.adobe.idp.dsc.provider.impl.vm.VMMessageDispatcher.doSend(VMMessageDispatcher.java:225)
           at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:66)
           at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
           at com.adobe.workflow.engine.PEContinueBranchCommand.execute(PEContinueBranchCommand.java:91)
           at com.adobe.workflow.workadapter.WorkflowCommandExecutionUnit.execute(WorkflowCommandExecutionUnit.java:22)
           at com.adobe.idp.dsc.workmanager.adapter.ManagedAsynchronousWorkAdapter.run(ManagedAsynchronousWorkAdapter.java:70)
           at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
           at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
           at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
           at java.lang.Thread.run(Thread.java:619)
      
      

       

      Please help me on this.

       

      Thanks in advance.

       

      -

      Abhinav