anchor.diff:  This inserts your subform containing an array of Java objects inside the parent form.
   
   
  -[id='_attaching_documents_to_a_form']
  -=== Attaching Documents to a Form
  -
  -
  -Red Hat JBoss BPM Suite enables you to attach documents to a form by using the `Document` form field. To attach a `Document` field to a form, you need to:
  -
  -* Set the marshalling strategy.
  -* Create a document variable.
  -* Map the task inputs and outputs correctly to the variable.
  -
  -.Setting the Marshalling Strategy
  -. Set the marshalling strategy in the `_PROJECT_HOME_/META_INF/kie-deployment-descriptor.xml`. You can do so in the {CENTRAL} or by editing the file directly. In {CENTRAL}:
  -
  -.. In {CENTRAL}, go to *Menu -> Design -> Projects* and click the project name. For example, *Evaluation*.
  - .. Click *Settings*.
  - .. Click *Project Settings: Project General Settings* -> *Deployment descriptor*.
  -.. Under *Marshalling strategies*, click *Add*.
  -.. In the *Value* field, click on *Enter Value* and enter: `org.jbpm.document.marshalling.DocumentMarshallingStrategy`.
  -.. Set *Resolver type* to *reflection*.
  -.. Click *Save* and *Validate* to ensure correctness of your deployment descriptor file.
  -+
  -Alternatively, if you want to edit `kie-deployment-descriptor.xml` directly, add the `<marshalling-strategies>` tag:
  +[id='_enabling_document_attachments_in_forms']
  +=== Enabling Document Attachments in a Form or Process
  +
  +{PRODUCT} supports document attachments in forms using the `Document` form field. With the `Document` form field, you can upload documents that are required as part of a form or process. For information about adding fields to forms, see <<_adding_new_fields_to_a_form>>.
  +
  +To enable document attachments in forms and processes, follow these steps:
  +
  +* Set the document marshalling strategy.
  +* Create a document variable in the process.
  +* Map the task inputs and outputs to the variable.
  +
  +.Set the Document Marshalling Strategy
  +The document marshalling strategy for your project determines where documents are stored for use with forms and processes. The default document marshalling strategy in {PRODUCT} is `org.jbpm.document.marshalling.DocumentMarshallingStrategy`. This strategy uses a `DocumentStorageServiceImpl` class that stores documents locally in your `_PROJECT_HOME_/docs` folder. You can set this document marshalling strategy or a custom document marshalling strategy for your project in Business Central or in the `kie-wb-deployment-descriptor.xml` file directly.
  +
  +. In Business Central, click *Authoring* -> *Project Authoring* and navigate to your project.
  +. Click *Open Project Editor* and then click *Project Settings: Project General Settings* -> *Deployment descriptor*.
  +. Under *Marshalling strategies*, click *Add*.
  +. In the *Identifier* value field, click *Enter Value* and enter `org.jbpm.document.marshalling.DocumentMarshallingStrategy` to use the default document marshalling strategy or enter the identifier of a custom document marshalling strategy.
  ++
  +For more information about custom document marshalling strategies, see <<_marshalling_strategy_for_a_cms>>.
  ++
  +. Set *Resolver type* to *reflection*.
  +. Click *Save* and *Validate* to ensure correctness of your deployment descriptor file.
  ++
  +Alternatively, you can navigate to `~/META_INF/kie-wb-deployment-descriptor.xml` in your project and edit the deployment descriptor file directly with the required `<marshalling-strategies>` elements.
  ++
  +Example `kie-wb-deployment-descriptor.xml` file with default document marshalling strategy:
   +
   [source,xml]
   ----
  
positive.code: * Source: `document`
  --
  +
  . Next to Data Outputs and Assignments, click *Add* and enter the values:
  +
  ---
  +
  --
  * Name: `taskdoc_out`
  * Data Type: `Object`
  * Target: `document`
  --
  ---
  +
  Note that the `Source` and `Target` fields contain the name of the process variable you created earlier.
  +
  . Click *Save*.
  . In the Process Designer, click image:development-guide-6565.png[] and select *Generate all Forms*.
  . Click *Save* to save the process.
  
  You can now build and deploy your project. You can see the `Document` attachment in the *Documents* tab of the *Process Management* -> *Process Instances* view.
  
  image::6224.png[]
  
  [float]
  ==== Pluggable Variable Persistence
  
  
  New with this release is also the ability for you to store your document in a location of your choice.
  This is defined as _Pluggable Variable Persistence_ and this enables you to store these documents automatically in a centralized content management system (CMS) of choice, behind the scenes.
  
  To implement your custom persistence strategy, start by defining your __Marshaling Strategy__.
  This strategy is declared to the Process Engine by the use of deployment descriptors (see [ref]_{ADMIN_GUIDE}_) using the `<marshalling-strategy>` element.
  This element should name a type that provides an implementation of the `org.kie.api.marshalling`
   interface.
  
  The following methods in this interface help you create your strategy.
  
  * [method]``public boolean accept(Object object)``: Determines if the given object can be marshalled by the strategy.
  * [method]``byte[] marshal(Context context, ObjectOutputStream os, Object object)``: Marshals the given object and returns the marshalled object as byte[].
  * [method]``Object unmarshal(Context context, ObjectInputStream is, byte[] object, ClassLoader classloader)``: Reads the object received as byte[] and returns the unmarshalled object
  * [method]``void write(ObjectOutputStream os, Object object)``: same as [method]``marshal`` method, provided for backwards compatibility.
  * [method]``Object read(ObjectInputStream os)``: same as [method]``unmarshal``, provided for backwards compatibility.
  
  
  For example, if you create a custom strategy that stores your uploaded documents in Google Drive, your implementation class should not only implement the methods of the `org.kie.api.marshalling`
   package, but this implementation should also be made available to the Process Engine, by putting the classes in its classpath (and declaring the type in the deployment descriptors).
  
  There is a default marshalling strategy that simply saves the uploaded documents in the file system under a folder called `docs`.
  This default implementation is defined by the [class]``DocumentStorageService`` class and is implemented through the [class]``DocumentStorageServiceImpl`` class.
  
  [id='_sect_rendering_forms_for_external_use']
  === Rendering Forms for External Use
  
negative.code:     </marshalling-strategy>
    </marshalling-strategies>
  ----
  
  .Create a Document Variable in the Process
  After you set the document marshalling strategy, create a document variable in the related process. This variable is required for the document to be visible in the *Documents* tab of the *Process Management* -> *Process Instances* view in Business Central.
  
  . In Business Central, navigate to your business process and open it in the Business Process Designer.
  . Click on the canvas and click image:3140.png[] on the right side of the window to open the *Properties* tab.
  . Next to *Variable Definition*, click the empty space and click image:6563.png[]. The *Editor for Variable Definitions* dialog opens.
  . Click *Add Variable* and enter the following values:
  +
  * Name: `document`
  