cancel
Showing results for 
Search instead for 
Did you mean: 

task variable or process variable?

shaparak-smmira
Champ in-the-making
Champ in-the-making
hi to all
I confused about this concept:
in bpmn20 ,variables set for usertask for examle in code: 


<userTask id="initiateFlow" name="Initiate Flow" >
      <extensionElements>
        <activiti:formProperty id="request" name="request" type="string"></activiti:formProperty>
        <activiti:formProperty id="status" name="status" type="string"></activiti:formProperty>
        <activiti:formProperty id="goal" name="goal" type="string"></activiti:formProperty>
      </extensionElements>
    </userTask>

when deploy and start process in activiti-explorer and set variable in task
in database in "act_ru_variable" table  for each variable set "execution_id_" and "proc_inst_id_" but dont set "task_id_" but in defined process() variable set for usertask !!!

1.whats happen?
2.whats different  between "task variable or process variable"?
3.have runtimeservice method for save all feild?
1 REPLY 1

pkromolowski
Champ in-the-making
Champ in-the-making
Task variable is only seen within the task, process variable is processwide. It simply works like local and global variables. In order to set task variables you must use the setVariableLocal(…) methods instead of setVariable(…).

Best regards,