我使用Camunda版本7.19.0。我已经实现了一个控制器,它需要一个TaskQueryDto来根据指定的变量标准查找所有任务。
@RestController
public class RestEngineController {
@Autowired
private TaskCustomService taskCustomService;
@PostMapping(value = "/rest-engine/task-with-variables", produces = MediaType.APPLICATION_JSON_VALUE)
List<TaskWithVariables> getTasks(@RequestBody TaskQueryDto query,
@RequestParam("firstResult") Integer firstResult,
@RequestParam("maxResults") Integer maxResults) {
return taskCustomService.getTasks(query, firstResult, maxResults);
}
}
字符串
然而,我遇到了一个问题。在Camunda的ConditionQueryParameterDto中,没有“in”的运算符。
public class ConditionQueryParameterDto {
public ConditionQueryParameterDto() {
}
public static final String EQUALS_OPERATOR_NAME = "eq";
public static final String NOT_EQUALS_OPERATOR_NAME = "neq";
public static final String GREATER_THAN_OPERATOR_NAME = "gt";
public static final String GREATER_THAN_OR_EQUALS_OPERATOR_NAME = "gteq";
public static final String LESS_THAN_OPERATOR_NAME = "lt";
public static final String LESS_THAN_OR_EQUALS_OPERATOR_NAME = "lteq";
public static final String LIKE_OPERATOR_NAME = "like";
public static final String NOT_LIKE_OPERATOR_NAME = "notLike";
型
那么,如何使用“in”操作符呢?
1条答案
按热度按时间tuwxkamq1#
正如这里也回答了https://forum.camunda.io/t/camunda-task-search/48616/2,没有办法通过REST API做到这一点。所以你将不得不做多个请求和合并的结果。