AnsweredAssumed Answered

Display variables control in a Form

Question asked by fstnboy on Jun 2, 2016
Latest reply on Jun 3, 2016 by fstnboy

I'm using the Activiti6Beta2 community version.

I'm trying to display the value of some variables in a form. For this, I'm the display value control and setting the variable name as "${myVar}".

It seems like it works for a variable that's been set in the start form. But for variables created within the process it doesn't work.

I've got the following ScriptTask to set process variables, and I've printed the values at a later stage and they are set properly:

<scriptTask id="retrieveInformation" name="Get Info" scriptFormat="groovy" activiti:autoStoreVariables="false">
execution.setVariable('account','My Account');
execution.setVariable('performer','Michael Jackson');]]></script>

But the form displaying the values shows '(empty)'. I've even tried creating task variables at a task listener script on the user task with no luck

<activiti:taskListener event="create" class="org.activiti.engine.impl.bpmn.listener.ScriptTaskListener">
          <activiti:field name="script">
task.setVariable('account',"My Activiti account");
          <activiti:field name="language">

Any ideas? I know this is a Beta version, just wondering if this should be working.