Historical Variable Query to get task's local variables when task completes

How to use historicalVariableInstanceQuery to access task local variables after task completed?

Hi Suhas,

from where are you trying to query this information? Does this help?
https://docs.camunda.org/manual/latest/reference/rest/history/variable-instance/get-variable-instance/

https://docs.camunda.org/manual/latest/reference/rest/history/variable-instance/post-variable-instance-query/

You POST
{{rest_url}}/history/variable-instance/?deserializeValue=false
with filter criteria in the JSON body. For instance:
{
“processInstanceId”:“da0e220e-0ae1-11ea-a5c4-00155d00d800”
}

Here is a postman collection with a working usage example:

For Java, please also see:

Best

Rob