Multiple Filter with Operate Search Query With AND condition

Hello,

I want to apply multiple filter with operate searchVariables() query.
My current code to get Variable list based on VariableFilter but it’s returning the Process variable which are already completed or Canceled with ACTIVE one and returning just 10 records and I want to fetch all records apart from this it is also returning other process variable where I have this same variable.

I just want fetch from particular process and only ACTIVE processes.

VariableFilter depositSummaryIdFilter = new VariableFilter();
      depositSummaryIdFilter.setName(ProcessConstants.DEPOPSIT_SUMMARY_ID);
      String depositSummaryId = String.valueOf(depositConfirmationVO.getDepositSummaryId());
      depositSummaryIdFilter.setValue(depositSummaryId);
SearchQuery searchQuery = new SearchQuery();
      searchQuery.setFilter(depositSummaryIdFilter);
      List<Variable> variableList = camundaOperateClient.searchVariables(searchQuery);

I’m using camunda 8.5.2 and below is my maven dependency for same.

  <dependency>
            <groupId>io.camunda.spring</groupId>
            <artifactId>spring-boot-starter-camunda</artifactId>
            <version>8.5.2</version>
        </dependency>

Thank you for the help.

Hi ,
Would you be able to help me with this if you have any idea.

@nathan.loding @dmerchang

Hi @dandotiya9722 - please do not tag users who have not already participated in your topic. This is a community forum, not an official priority support channel.

The Operate API supports a size parameter that should adjust the number of records returned in the query; however, the request is paginated, so depending on the total number of results you may need to use the searchAfter parameter to fetch additional pages of results.

I’m not sure I understand the question regarding the state of the process instances. This endpoint is searching variables across all PIs. If you want to filter that to just active PIs, that isn’t supported by this endpoint currently. You would need to additionally fetch the status the PIs from the ProcessInstances endpoint.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.