2 Replies Latest reply on Nov 11, 2008 12:28 PM by Greg ZA

    Storing XFA forms in content space

    Greg ZA Level 1
      I've recently begun playing with ContentSpace and am now finding it difficult to store an XFA form from and ES process in a ContentSpace space. I probably just missed a basic thing, but here's what I have:

      I have an XfaForm variable in my process that contains a populated form (the user completed it earlier in the process). I now use the storeContent service to store the form into the repository using my XfaForm variable as the NodeContent.

      When validating the process it seems that LC finds it difficult to assign the content type of my XfaForm variable. I get the message WBP-036 Unable to coerce blah blah.

      Any idea what I'm doing wrong?
        • 1. Re: Storing XFA forms in content space
          Jasmin Charbonneau Level 4
          The xfaForm variable is really just a pointer to and XDP in the repository and the data submitted by the user when they hit submit.

          That being said the Node Content parameter of the storeContent operation needs a variable of type 'document'. The variable of type 'document' can contain pretty much anything.

          If you want to store the data that was submitted by the user you can use a setValue to assign the data of the xfaForm variable to a document variable (ex. /process_data/@myDocVar = /process_data/xfaForm/object/datasets/data). This would store the xml data in Content Space.

          If you want to save the entire PDF you have two options. You make sure the form submits the entire PDF, in which case you need to use a different variable type (other than xfaForm) since it can only hold xml. You would use a Document Form variable type.

          The other option is to render the PDF on the server using renderPDFForm with the xml data submitted by the user. Once the pdf is created, pass that to the storeContent operation.

          • 2. Re: Storing XFA forms in content space
            Greg ZA Level 1
            Thanks Jasmin

            I'll give this a go and let you know