How to get process variables & task assignee in search flownode-instances with Camunda 8.7

Hi, I am using Search flonode-instances
http://localhost:8080/v1/flownode-instances/search

to retrieve all the history for the process instance, but it is very important to me to know the assignee of each flow node (step), and the variables for each flow node (step), how to do that ?

since the current APIs returns only the following:

{
            "key": 2251799813782743,
            "processInstanceKey": 2251799813782739,
            "processDefinitionKey": 2251799813759644,
            "startDate": "2025-09-25T06:05:05.715+0000",
            "endDate": "2025-09-25T06:05:05.715+0000",
            "flowNodeId": "StartEvent_123",
            "flowNodeName": "my start event",
            "type": "START_EVENT",
            "state": "COMPLETED",
            "incident": false,
            "tenantId": "<default>"
        }

Hi! Great question about retrieving process variables and task assignees when using the Search flownode-instances API in Camunda 8.7.

Unfortunately, the /v1/flownode-instances/search endpoint doesn’t directly return process variables or task assignee information in a single response. You’ll need to use a combination of API calls to get all the information you need:

1. Get Process Variables

For process variables, use the Operate API’s variables search endpoint:

POST http://localhost:8080/v1/variables/search

Filter by the processInstanceKey that you get from your flownode-instances response:

{
  "filter": {
    "processInstanceKey": "your-process-instance-key"
  }
}

This will return all variables for that process instance.

2. Get Task Assignee

For task assignees, you’ll need to use the Tasklist API since the Operate API doesn’t expose assignee information. The challenge here is that the Tasklist API works with task IDs, not flownode instance IDs.

Approach:

  1. Use the Tasklist API to search for tasks by process instance:

    POST http://localhost:8080/tasklist/v1/tasks/search
    
  2. Filter by process instance key:

    {
      "processInstanceKey": "your-process-instance-key"
    }
    
  3. The response will include the assignee field for each task:

    {
      "id": "task-id",
      "assignee": "user@example.com",
      ...
    }
    

Complete Workflow

Here’s the recommended approach:

  1. Search flownode-instances → Get flownode details and process instance keys
  2. Search variables → Get process variables using process instance key
  3. Search tasks → Get task assignees using process instance key
  4. Correlate the data → Match flownode instances with their corresponding tasks and variables

Important Notes

  • The Operate API and Tasklist API are separate services, so you’ll need to make calls to both
  • You’ll need to correlate the data yourself based on process instance keys and task definition IDs
  • The assignee information is only available for user tasks, not for other flownode types

References

Would you like me to provide more specific examples for any of these API calls, or do you need help with the data correlation logic?

@zee-bot
I want the result of flownode-instances search to contain assignee and process variables

I understand you want the flownode-instances search result to contain assignee and process variables in a single response. Unfortunately, this is not currently possible with the Camunda 8 APIs.

Current API Limitations

The /v1/flownode-instances/search endpoint in the Operate API does not support including variables or assignee information in its response. This is a known limitation of the current API design:

  • Process variables must be retrieved separately using /v1/variables/search
  • Task assignees must be retrieved separately using the Tasklist API
  • No single endpoint currently combines all this information

Why This Limitation Exists

This separation exists because:

  1. Different services: Operate handles process execution history, while Tasklist handles task management
  2. Performance: Including all related data in every response would significantly impact performance
  3. API design: Each API is focused on its specific domain

Potential Workarounds

If you need this functionality, you have a few options:

  1. Create a wrapper service that makes multiple API calls and combines the results
  2. Use GraphQL (if available in your setup) to combine multiple queries
  3. Cache frequently accessed data to reduce the number of API calls needed

Feature Request

If this functionality is important for your use case, I’d recommend submitting a feature request to the Camunda team:

When submitting, please include:

  • Your specific use case
  • Why the current multi-call approach doesn’t work for you
  • Expected response format
  • Performance requirements

References

Would you like help implementing a wrapper solution that combines these API calls, or would you prefer guidance on submitting a feature request?