AnsweredAssumed Answered

confused about local and global variable scope

Question asked by sarkar92 on Jan 15, 2014
Latest reply on Jan 15, 2014 by frederikheremans1
with reference of this following userguide link
http://activiti.org/userguide/index.html#N14509
and
http://forums.activiti.org/content/scopes-and-variables-activiti

I am quite confused about variable scope…

I am trying to get all variable from a task
In the sub process scripttask i defined two local variable like
   
   execution.setVariableLocal("TestLocalVariabl1", "Test1");
   execution.setVariableLocal("TestLocalVariable2", "Test2");


while try to get all local variables from task its return nothing…
http://#######:6080/activiti-rest/service/runtime/tasks/223837/variables?scope=local

but when try get all global variables from task those local variables are return as response body 


{
    "name": "TestLocalVariabl1",
    "type": "string",
    "value": "Test1",
    "scope": "global"
  },
{
    "name": "TestLocalVariable2",
    "type": "string",
    "value": "Test2",
    "scope": "global"
  }




thanks

Outcomes