I am using tasklist and using Embedded Taskforms. I have a process model which has multiinstance subprocess with multiple user tasks. I am trying to fetch the variables for a task in one of the instance in the sub process. I am using the below method to query.
Using the below API i am fetching the subprocess activityinstances.
http://localhost:8081/rest/history/activity-instance?processInstanceId=8f7d8dc1-1d84-11ea-894c-005056b47730&activityId=SystemReviewSubProcess
From the result of the above query, using the execution id i am trying to query the tasks associated with each instances of the subprocess using the below API.
http://localhost:8081/rest/history/task?executionId=cddf66b3-1d84-11ea-894c-005056b47730
Using the executionId from the above API result, i am trying to query the variable instances.
http://localhost:8081/rest/history/variable-instance?processInstanceId=8f7d8dc1-1d84-11ea-894c-005056b47730&executionIdIn=cddf66b3-1d84-11ea-894c-005056b47730
What i found from the result is that the taskId value is null for all the variables that were created from the UI, whereas the taskId is present for the variables that were created using TaskListener or executionListener.
Because of this i am not able to segregate the variables associated for a given task. Please advise how to fetch the variables (including Local variables) associated with the given task.