cancel
Showing results for 
Search instead for 
Did you mean: 

retrieve previous task data using REST API

josh3006
Champ in-the-making
Champ in-the-making
Hi,

I'm new to Activiti here, right now I have deployed Activiti in Servicemix and using REST-API to access it.

I would like to get my variables saved in previous task. How can I retrieve it from REST API

Any idea ?
3 REPLIES 3

frederikherema1
Star Contributor
Star Contributor
Currently, the REST-api doesn't expose the history-tables (HistoricTaskInstance and HistoricDetails) which you need for this. So you'll have to add this to the existing REST-services or think of another solution.

akshay_meher
Champ in-the-making
Champ in-the-making
currently i am using activiti5.13 ….my project is based on calling process using REST-API…But.i have big confusion using REST-API can any one tell me how to retreve task,list of task using REST-API or any example of that?????????
plz help me
Thanks in advance

frederikherema1
Star Contributor
Star Contributor
The userguide has a lot of docs related to tasks. Eg. getting task assigned to you (for other filters possible, see userguide http://www.activiti.org/userguide/#restTasksGet😞

GET http://localhost:8081/activiti-rest/service/runtime/tasks?assignee=kermit[code]

response:

[code]
{
  "data": [
    {
      "assignee" : "kermit",
      "createTime" : "2013-04-17T10:17:43.902+0000",
      "delegationState" : "pending",
      "description" : "Task description",
      "dueDate" : "2013-04-17T10:17:43.902+0000",
      "execution" : "http://localhost:8182/runtime/executions/5",
      "id" : "8",
      "name" : "My task",
      "owner" : "owner",
      "parentTask" : "http://localhost:8182/runtime/tasks/9",
      "priority" : 50,
      "processDefinition" : "http://localhost:8182/repository/process-definitions/oneTaskProcess%3A1%3A4",
      "processInstance" : "http://localhost:8182/runtime/process-instances/5",
      "suspended" : false,
      "taskDefinitionKey" : "theTask",
      "url" : "http://localhost:8182/runtime/tasks/8"
    }
  ],
  "total": 1,
  "start": 0,
  "sort": "name",
  "order": "asc",
  "size": 1
}
[code]