title: In a Camunda embedded form, how do you specify the bound variable scope?
body: <p>Within a user task, a segment of the embedded form markup is</p>
  
  <pre><code>...
    &lt;div class="form-group"&gt;
      &lt;label for="reference"&gt;Reference&lt;/label&gt;
      &lt;input class="form-control"
             cam-variable-name="reference"
             cam-variable-type="String"
             name="reference" /&gt;
    &lt;/div&gt;
    ...
  </code></pre>
  
  <p>On form entry, the <code>reference</code> field should be empty. On form submission, the associated Camunda process variable is populated with the reference text as a single <code>String</code> as expected.</p>
  
  <p>Reading the Camunda manual, forums etc, there is no setting to specify the bound variable scope,</p>
  
  <p>For this form field, I wish to use local variables (task scoped), not process instance scoped variables.</p>
  
  <p>If process variables are used, if there is a following user task with a form using the same variable-name, that form field is populated with the previously entered value.</p>
  
  <p>I understand that variables can be programmically reset and that I can use a different variable name but use of a local variable would avoid this.</p>
  
  <p>Also, use of process variables results in an excessive number of variables as seen in </p>
  
  <pre><code>cockpit &gt; running process instances &gt; [process-name] &gt; [instance GUID] &gt; variables
  </code></pre>
  
  <p>Generally, unless the value is to be used later, form based variables have only relevance during form set-up and action processing.</p>