5 Replies Latest reply on Oct 31, 2008 3:04 PM by (WorkflowUser)

    Using ddx to create pdf package

    kc@dafolo.dk Level 1
      Hi all,<br /><br />I have a process which handles a number of forms (3 or 4 depending on the routes chosen).<br /><br />Along the process i store the forms as documents and add them to a list variable. In the end of the process I call a subprocess with this list as input and this process uses a ddx-file for assembling a pdf-package that can be presented as an overview/result of a specific invocation. The ddx-file looks like this:<br /><br /><?xml version="1.0" encoding="UTF-8"?><br />   <DDX xmlns="http://ns.adobe.com/DDX/1.0/"><br />      <PDF result="GeneratedDocument.pdf"> <br />         <PackageFiles> <br />            <PDF source="attachments"/><br />            </PackageFiles> <br />      </PDF><br />   </DDX><br /><br />The map that I use as input for the invokeDDX service is created like this:<br /><br />/process_data/ddxMap[@id="attachments"] = /process_data/ddxList<br /><br />After this step the ddxList variable has the size 3 and the ddxMap variable has a size of 1. Is this not the correct approach?<br /><br />Post is continued below:
        • 1. Re: Using ddx to create pdf package
          kc@dafolo.dk Level 1
          The AssemblerResult looks like this, and I can not see where it is wrong:


           
             
                GeneratedDocument.pdf
               
                 
                    3
                    false
                    false
                   
                    127.0.0.1/172.16.10.125
                   
                   
                   
                    IOR:000000000000002849444C3A636F6D2F61646F62652F6964702F49446F63756D656E7443616C6C6261636B 3A312E30000000000200000000000000D4000102000000000E3137322E31362E31302E313235000DC800000010 4A426F73732F001540361F00072E242E000000050000000000000008000000004A414300000000010000001C00 000000000100010000000105010001000101090000000105010001000000210000005000000000000000010000 000000000024000000200000007E00000000000000010000000E3137322E31362E31302E313235000DC9000000 000000000000000000000000000000000000000000000000000000002000000004000000000000001F00000004 00000003000000010000002000000000000000020000002000000004000000000000001F0000000400000003
                    42
                    application/pdf
                   
                   
                     
                        wsfilename
                        C:\LiveCycle_Data\Temp\adobejb_server1\asm\GeneratedDocument.pdf28133.tmp
                     

                     
                        basename
                        GeneratedDocument.pdf28133.tmp
                     

                     
                        file
                        C:\LiveCycle_Data\Temp\adobejb_server1\asm\GeneratedDocument.pdf28133.tmp
                     

                   

                    adobe/idp/DocumentPullServant/adobejb_server1
                    -1
                 

               

             

           

           
           
             
                3
                true
                false
               
                127.0.0.1/172.16.10.125
                PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48bG9nPjx0b3RhbEVsYXBzZWRU
          aW1lIHdhbGxDbG9ja1RpbWU9IjAuNDUzIiBjcHVUaW1lPSIwLjI5Njg3NSIvPjwvbG9nPg==

               
               
               
                0
                text/xml
               
               
                 
                    wsfilename
                    C:\LiveCycle_Data\Temp\adobejb_server1\asm\asmJobLog28132.tmp
                 

                 
                    basename
                    asmJobLog28132.tmp
                 

                 
                    file
                    C:\LiveCycle_Data\Temp\adobejb_server1\asm\asmJobLog28132.tmp
                 

               

                adobe/idp/DocumentPullServant/adobejb_server1
                -1
             

           

            1
           
              GeneratedDocument.pdf
           

           
           
              GeneratedDocument.pdf
           

           
            -1


          I try to get the result document in the following manner:

          /process_data/outDoc = /process_data/AssResult/object/documents[@id="result"]

          However this gives me the following output in the server.log:

          2008-10-26 19:35:03,583 INFO  [com.adobe.livecycle.assembler.AssemblerServiceImpl] ALC-ASM-N00-001: Execute: invokeDDX() begin on thread JMS SessionPool Worker-34 32009
          2008-10-26 19:35:03,598 INFO  [com.adobe.internal.ddxm.Executive] DDXM_N00000: Started processing result named GeneratedDocument.pdf
          2008-10-26 19:35:04,020 INFO  [com.adobe.internal.ddxm.Executive] DDXM_N00001: Successful assembly of result named GeneratedDocument.pdf
          2008-10-26 19:35:04,067 INFO  [com.adobe.livecycle.assembler.AssemblerServiceImpl] ALC-ASM-N00-001: Execute: invokeDDX() end on thread JMS SessionPool Worker-34 32009
          2008-10-26 19:35:04,192 INFO  [com.adobe.livecycle.fileutils.FileUtilsService] Null document. 'writeDocument' operation not completed

          The writeDocument fails because the document that I try to save in a doc varioble seems to be null.

          Can anyone help me understand why this is the case? I must have over looked something...

          Sincerely
          Kim
          • 2. Re: Using ddx to create pdf package
            kc@dafolo.dk Level 1
            Hi again,

            I think I solved this one myself, I had made an error when fetching the result document of the AssemblerResult.

            So you need:

            /process_data/AssResult/object/documents[@id="GeneratedDocument.pdf"] and not like I initially did (I saw this mistake in the documentation):

            /process_data/outDoc = /process_data/AssResult/object/documents[@id="result"]

            Hope you can use this info

            Sincerely
            Kim
            • 3. Re: Using ddx to create pdf package
              hi,

              I'd like to better understand the error that you found in the documentation so that I can correct it.

              http://livedocs.adobe.com/livecycle/8.2/wb_help/001031.html says that if the assembled document is a single document, the logical name of the document is the value of the result attribute that is specified in the DDX.

              This seems to correctly predict the XPath expression that you used. But I can't find where the docs say to use 'relult' as the logical name of the document.

              thanks
              scott
              • 4. Re: Using ddx to create pdf package
                kc@dafolo.dk Level 1
                Hi again Scott,

                Thank you for responding, I might have been too quick on my judgement of the documentation there. I was struggling with this problem and was trying to find inspiration from where ever I could ;o).

                There fore I have found the line

                /process_data/outDoc = /process_data/AssResult/object/documents[@id="result"]

                NOT in the documentation but in a Sample called LetterWithAttachment. Here it is in the next to last step called "Extract Output from Assembler Result - Set Value".

                So I apologize for the mistake, the documentation does not state the above mentioned assignment. However I would haver liked the example in the documentation to be more illustrative.

                Sincerely
                Kim
                • 5. Re: Using ddx to create pdf package
                  Level 1
                  If you need to create DDX from list of file name, check my blog
                  http://eslifeline.files.wordpress.com/2008/10/some-useful-utilities.pdf