getting process variables through rest does not work

Description

when requesting the same process information via REST the variables are missing

the request used: GET http://localhost:8888/activiti-rest/service/processInstance/{processInstanceId}

returned:

{
"processInstanceId" : "213",
"businessKey" : "null",
"processDefinitionId" : "vacationRequest:1:21",
"startTime" : "2012-01-26T16:10:05MEZ",
"startActivityId" : "request",
"startUserId" : "kermit",
"completed" : false,
"tasks" : [ {
"taskId" : "222",
"taskName" : "Handle vacation request",
"owner" : "null",
"assignee" : "kermit",
"startTime" : "2012-01-26T16:10:05MEZ",
"completed" : false
} ],
"activities" : [ {
"activityId" : "handleRequest",
"activityName" : "Handle vacation request",
"activityType" : "userTask",
"startTime" : "2012-01-26T16:10:05MEZ",
"completed" : false
} ]
}

the difference between the two implementations is how the variables are requested.

activiti explorer: org.activiti.explorer.ui.management.process.ProcessInstanceDetailPanel.addVariables()
<code>
Map<String, Object> variables = new TreeMap<String, Object>(runtimeService.getVariables(processInstance.getId()));
<code>

activiti rest app: org.activiti.rest.api.process.ProcessInstanceResource.addVariableList(String, ObjectNode)
<code>
List<HistoricDetail> variableList = ActivitiUtil.getHistoryService()
.createHistoricDetailQuery()
.processInstanceId(processInstanceId)
.variableUpdates()
.orderByTime()
.desc()
.list();
<code>
returns an empty list.

this bug also relates to which also proposes to retrieve the variables via runtime service.

thank you

Environment

5.9 svn trunk
ant demo.start
in activiti explorer start new vacation request
look up the process variables under My Proccesses in activiti explorer (like vacationMotivation etc)

Assignee

Tijs Rademakers

Reporter

Peter Hermsdorf

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure