No tasks found in "Getting Started" guide

I’m about 3/4 way down the Getting Started guide:
Getting Started · Flowable Open Source Documentation

When I run the code, the task query returns empty and I see

You have 0 tasks:

printed on the console.

Following is my code so far. What could I be missing?

ProcessEngineConfiguration cfg = new StandaloneProcessEngineConfiguration()

        ProcessEngine processEngine = cfg.buildProcessEngine();

        RepositoryService repositoryService = processEngine.getRepositoryService();
        Deployment deployment = repositoryService.createDeployment()

        ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
        System.out.println("Found process definition: " + processDefinition.getName());

        Scanner scanner = new Scanner(;

        System.out.println("Who are you?");
        String employee = scanner.nextLine();

        System.out.println("How many holidays do you want to request?");
        Integer noOfHolidays = Integer.valueOf(scanner.nextLine());

        System.out.println("Why do you need them?");
        String description = scanner.nextLine();

        Map<String, Object> variables = new HashMap<String, Object>();
        variables.put("employee", employee);
        variables.put("noOfHolidays", noOfHolidays);
        variables.put("description", description);

        RuntimeService runtimeService = processEngine.getRuntimeService();
        ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("holidayRequest", variables);

        TaskService taskService = processEngine.getTaskService();
        List<Task> tasks = taskService.createTaskQuery().taskCandidateGroup("managers").list();
        System.out.println("You have " + tasks.size() + " tasks:");
        for (int i=0; i<tasks.size(); i++) {
            System.out.println((i + 1) + ") " + tasks.get(i).getName());

        System.out.println("Which tasks would you like to complete?");
        int taskIndex = Integer.valueOf(scanner.nextLine());
        Task task = tasks.get((taskIndex - 1));
        Map<String, Object> processVariables = taskService.getVariables(task.getId());
                processVariables.get("employee") +
                " wants " +
                processVariables.get("noOfHolidays") +
                " of holidays. Do you approve this?"

        boolean approved = scanner.nextLine().toLowerCase().equals("y");
        variables = new HashMap<String, Object>();
        variables.put("approved", approved);
        taskService.complete(task.getId(), variables);

Hi @sameera,

how does your BPMN process look like? Are you expected to have a task at this point?


Hi @valentin
Yes, I’m following the steps in the guide exactly. So, when I run the code, I’d be prompted for the name, no of holidays and why. So by the time the execution gets to taskService.createTaskQuery().taskCandidateGroup("managers") I’m expecting that there’s always one task (the one that I just entered in the console to be in the list. However, the list is always returning 0.

Can you share the BPMN XML? Looking at the code, I can’t immediately spot something wrong.


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns=""

    <process id="holidayRequest" name="Holiday Request" isExecutable="true">

        <startEvent id="startEvent"/>
        <sequenceFlow sourceRef="startEvent" targetRef="approveTask"/>

        <userTask id="approveTask" name="Approve or reject request"/>
        <sequenceFlow sourceRef="approveTask" targetRef="decision"/>

        <exclusiveGateway id="decision"/>
        <sequenceFlow sourceRef="decision" targetRef="externalSystemCall">
            <conditionExpression xsi:type="tFormalExpression">
        <sequenceFlow  sourceRef="decision" targetRef="sendRejectionMail">
            <conditionExpression xsi:type="tFormalExpression">

        <serviceTask id="externalSystemCall" name="Enter holidays in external system"
        <sequenceFlow sourceRef="externalSystemCall" targetRef="holidayApprovedTask"/>

        <userTask id="holidayApprovedTask" name="Holiday approved"/>
        <sequenceFlow sourceRef="holidayApprovedTask" targetRef="approveEnd"/>

        <serviceTask id="sendRejectionMail" name="Send out rejection email"
        <sequenceFlow sourceRef="sendRejectionMail" targetRef="rejectEnd"/>

        <endEvent id="approveEnd"/>

        <endEvent id="rejectEnd"/>



Hi @sameera,

you are querying for .taskCandidateGroup("managers") but your task doesn’t have a candidate group.


Thank you @valentin
I see that I missed that in the instructions :man_facepalming: