title: How to get bpm_outcome by Activiti workflow javascript in Alfresco
body: <p>I'm struggling to get "bpm:outcome" variable in my task through a simple "complete" ScriptTaskListner. I add i'm using Activi WorkFlow Engine.</p>
  
  <p>This is my attempt:</p>
  
  <pre><code>var import = task.getVariable('bpm_outcome');
  </code></pre>
  
  <p>It is strange...the value returned is "Next" (!!?!?)</p>
  
  <p>Anyways...i've read that maybe this could do the job:</p>
  
  <blockquote>
    <p>TaskInstance ti = ... 
    ti.getVariableLocally("bpm_outcome");</p>
  </blockquote>
  
  <p>or </p>
  
  <blockquote>
    <p>ti.getVariable("bpm_outcome");</p>
  </blockquote>
  
  <p>but i can't get the taskinstance...any suggestion?
  The other "wf:..." variables are perfectly captured with a simple task.getvariable attempt.</p>
  
  <p>thanks in advance!</p>