AnsweredAssumed Answered

Passing variabl to a shell task

Question asked by dmill on Nov 14, 2014
Latest reply on Nov 26, 2014 by dmill
Hello guy,

I'm using Activiti-rest and having a hard time figuring out how to use variables in a shell task.

I create a process instance using POST runtime/process-instances:
{
   'processDefinitionId':'xxxxx',
   'variables' : [
     {'name' : 'myVar', 'value' : 'something'}
   ]
}

And my process definition contains:


<serviceTask id="console" activiti:type="shell" >
   <extensionElements>
      <activiti:field name="command" stringValue="echo" />
      <activiti:field name="arg1" stringValue="${scriptVar}" /> 
   </extensionElements>
</serviceTask>

But this doesn't work. The process runs properly otherwise.

Any help would be appreciated.

Outcomes