Hello !
I need to use taskVariables in Usertasks to contextualize.
I created a process and assigned an input variable (example : a = b) to my userTask.
BPMN:
example.bpmn (2.6 KB)
But when I’m trying to request the engine with Rest API, I have no results.
http://localhost:8180/engine-rest/task/?processDefinitionKey=process_example&taskVariables=a_eq_b
See taskVariables in the guide:
With the debug logging i see:
…
2019-06-27 16:15:32,125 DEBUG [org.camunda.bpm.engine.cmd] (pool-10-thread-1) ENGINE-13006 Finishing command -------------------- AcquireJobsCmd ----------------------
2019-06-27 16:15:32,125 DEBUG [org.camunda.bpm.engine.jobexecutor] (pool-10-thread-1) ENGINE-14022 Acquired 0 jobs for process engine ‘default’:
2019-06-27 16:15:32,125 DEBUG [org.camunda.bpm.engine.jobexecutor] (pool-10-thread-1) ENGINE-14011 Job acquisition thread sleeping for 59996 millis
2019-06-27 16:15:36,595 DEBUG [org.camunda.bpm.engine.cmd] (default task-71) ENGINE-13005 Starting command -------------------- TaskQueryImpl ----------------------
2019-06-27 16:15:36,595 DEBUG [org.camunda.bpm.engine.cmd] (default task-71) ENGINE-13009 opening new command context
2019-06-27 16:15:36,599 FINE [org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria] (default task-71) ==> Preparing: select distinct RES.REV_, RES.ID_, RES.NAME_, RES.PARENT_TASK_ID_, RES.DESCRIPTION_, RES.PRIORITY_, RES.CREATE_TIME_, RES.OWNER_, RES.ASSIGNEE_, RES.DELEGATION_, RES.EXECUTION_ID_, RES.PROC_INST_ID_, RES.PROC_DEF_ID_, RES.CASE_EXECUTION_ID_, RES.CASE_INST_ID_, RES.CASE_DEF_ID_, RES.TASK_DEF_KEY_, RES.DUE_DATE_, RES.FOLLOW_UP_DATE_, RES.SUSPENSION_STATE_, RES.TENANT_ID_ from ACT_RU_TASK RES inner join ACT_RE_PROCDEF D on RES.PROC_DEF_ID_ = D.ID_ WHERE ( 1 = 1 and D.KEY_ = ? and EXISTS ( select ID_ from ACT_RU_VARIABLE WHERE NAME_= ? and RES.ID_ = TASK_ID_ and ( ( TYPE_ is not null and TYPE_ = ? and TEXT_ is not null and TEXT_ = ? ) ) ) ) order by RES.ID_ asc LIMIT ? OFFSET ?
2019-06-27 16:15:36,599 FINE [org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria] (default task-71) ==> Parameters: process_example(String), a(String), string(String), b(String), 2147483647(Integer), 0(Integer)
2019-06-27 16:15:36,600 FINE [org.camunda.bpm.engine.impl.persistence.entity.TaskEntity.selectTaskByQueryCriteria] (default task-71) <== Total: 0
2019-06-27 16:15:36,601 DEBUG [org.camunda.bpm.engine.cmd] (default task-71) ENGINE-13011 closing existing command context
…
The SQL tries to read from ACT_RU_VARIABLE.TASK_ID_ which is null for all my records.
Could you help me please !
Thanks