cancel
Showing results for 
Search instead for 
Did you mean: 

how can task get process variables?

whdwsl
Champ in-the-making
Champ in-the-making
Hi, all:
    i can use the method : startProcessInstanceByKey(String processDefinitionKey, Map<String, Object> variables) to create a processInstence, when i query someone's  task list through taskService.createTaskQuery().processVariableValueEquals("key", "value").taskAssignee("assignee"), i get a tasklist, how can i get the process's variables ( to show in sb's  task pool) except invoke a method (i think repeat invoking another mehtod is not reasonable)
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
You want to get the process-variables for the process a certain task is in?


runtimeService.getVariables(task.getProcessInstanceId());

Try reading through our javadocs (http://activiti.org/javadocs/index.html). All API's are there, just look at all exposed methods en Queries before asking this on the forum.