1 Reply Latest reply on Feb 12, 2009 7:10 PM by JoshDBoyle

    xfaForm, Form, DocumentForm, Document

    Elaine Schmitz Level 1
      What is the difference between the xfaForm, Form, DocumentForm and Document variables?
        • 1. Re: xfaForm, Form, DocumentForm, Document
          JoshDBoyle Level 1

          Any form can be thought of as a combination of two elements: data and template. In this sense, "data" refers to the actual XML data used to populate the form and "template" refers to the actual, visual layout of the form (what you create in Designer). With that in mind, I can offer the following:

          xfaForm: complex variable type that holds XDP-based data along with a reference to the form template via the "templateURL" property within. xfaForms provides the advantage that if the form it's holding is backed by a schema then you can navigate the entire schema using XPath right from within the xfaForm variable in Workbench itself.

          Document Form: complex variable type that holds a reference to the form template via the "FormURL" property and a reference to the form's data via the "Document" property. Note that in order to work with the XML data behind a Document Form, you have to extract the data first using the exportXML service. Within a Document Form's variable settings and further within "Advanced Settings", there is a checkbox that reads "Call the render service only once". Document Forms are unique in that, to my knowledge (please correct me if I'm wrong here), if this box is checked then the render service will be called only once for the form and the fully-rendered form will subsequently be stored in the "Document" property of the variable (instead of it storing just the XML data there). Document Forms are often used, because of this, to capture Digital Signatures from users since after a Digital Signature is applied to a form, you typically don't want any more changes to the form at all (such as rendering the form again).

          Document: standard variable type that holds any kind of, well, "document". For example, you could stuff an XML or text file in there. Documents are like the "catch all" for any file off the filesystem that needs to be stored in a process variable.

          Form: Admittedly, I have never worked with this variable type but I do believe they are used for presentation within Flex applications. Perhaps someone else could educate me on this type!

          Let me know if you have any questions!

          Josh Boyle
          Cardinal Solutions Group