Camunda Team Blog

How to

Custom Queries

Written by Yana Vasileva on , under Execution category.
Why Custom Queries? The process engine offers a pretty straightforward and easy to use Java Query API. If you want to build a task list you just write something like this: @Inject private TaskService taskService; public List<Task> getAllTasks() { return taskService.createTaskQuery().taskAssignee("bernd").list(); } Easy as it is, there are basically two catches: You can only build queries that the API supports. You cannot add constraints on your domain objects.