AnsweredAssumed Answered

I can't add variables to a task throw rest-api

Question asked by darkwind on Mar 20, 2018
Latest reply on Mar 23, 2018 by darkwind

Hi everyone,

  I can't add variables to a task throw rest-api. May be i understand the document with mistakes

 

my activiti version:

activiti-6.0.0 from Download Now | Activiti.org 

 

1. why do this?

I want to add a variables to a task, then i can query it by this variables value.

 

2. replay

I) create a task 

 

II) find it with query/task

Here is info

all json:

```

 

{ "data": [ { "id": "7501", "url": "http://localhost:8080/dumii-activiti/service/runtime/tasks/7501", "owner": "shadow", "assignee": "shadow", "delegationState": null, "name": "测试任务", "description": "任务描述", "createTime": "2018-03-20T17:02:09.498+08:00", "dueDate": null, "priority": 50, "suspended": false, "taskDefinitionKey": null, "tenantId": "", "category": null, "formKey": null, "parentTaskId": null, "parentTaskUrl": null, "executionId": null, "executionUrl": null, "processInstanceId": null, "processInstanceUrl": null, "processDefinitionId": null, "processDefinitionUrl": null, "variables": [] } ], "total": 1, "start": 0, "sort": "id", "order": "asc", "size": 1 }

 

```

III) add variables to this task

 

 

find this variables with "Get all variables on a task"

I'm sure that variables created successful

 

IV)But this variables is not under task

 

i read Activiti User Guide  but still don't know why

 

Thanks,
dark-wind

Outcomes