AnsweredAssumed Answered

How to access variable from scripttask

Question asked by agiledevpro on Oct 13, 2014
Latest reply on Oct 14, 2014 by martin.grofcik
Hi,

I'm having problem accessing a value from my scripttask in my java code.
This is my scripttask:

   <scriptTask id="parseFile" name="Execute script" scriptFormat="groovy" >
         <script><![CDATA[
                                execution.setVariable("json", "result);
            ]]></script>
      </scriptTask>


And this is how I try to access the variable from my java code:

Map <String, Object> var = processInstance.getProcessVariables();
String res = var.get("json");


But "res" is null, what am I doing wrong?


Thanks in advance!

Outcomes