title: how to set a variable in startevent in alfresco?
body: <p>I want to get the property value <code>mcwf:status</code> from the model in <code>startevent</code>.
  Then I need to pass the value of <code>mcwf:status</code> to other forms.</p>
  
  <p>Below is the code, it is not printing variable,
  it seems that the part of extensionElement has not been run?</p>
  
  <p>The snippet of the bpmn diagram:</p>
  
  <pre><code>&lt;startEvent id="startevent1" name="Start" activiti:formKey="mcwf:submitReviewTask"&gt;
      &lt;extensionElements&gt;
          &lt;activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener"&gt;
            &lt;activiti:field name="script"&gt;
              &lt;activiti:string&gt;&lt;![CDATA[
                          var newstatus = task.getVariableLocal('mcwf_status');
                          execution.setVariable('mcwf_newstatus', newstatus);
                          logger.log("AAAAAAAAA      " + newstatus);
                      ]]&gt;&lt;/activiti:string&gt;
            &lt;/activiti:field&gt;
          &lt;/activiti:taskListener&gt;
        &lt;/extensionElements&gt;
      &lt;/startEvent&gt;
  </code></pre>
  
  <p>The snippet of the model file:</p>
  
  <pre><code>&lt;aspect name="mcwf:status"&gt;
              &lt;title&gt;Status&lt;/title&gt;
              &lt;properties&gt;
                  &lt;property name="mcwf:status"&gt;
                      &lt;title&gt;Status&lt;/title&gt;
                      &lt;type&gt;d:text&lt;/type&gt;
                      &lt;default&gt;0&lt;/default&gt;
                      &lt;constraints&gt;
                          &lt;constraint type="LIST"&gt;
                            &lt;parameter name="allowedValues"&gt;
                              &lt;list&gt;
                              &lt;value&gt;100&lt;/value&gt;
                              &lt;value&gt;200&lt;/value&gt;
                              &lt;/list&gt;
                            &lt;/parameter&gt;
                          &lt;/constraint&gt;
                      &lt;/constraints&gt;
                  &lt;/property&gt;
              &lt;/properties&gt;
          &lt;/aspect&gt;
  </code></pre>
  
  <p>If I change the <code>startevent</code> to <code>usertask</code>, then I copy the code of extensionElements and paste instead of it, and don't know why it can be work properly.</p>