Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-8019

I can use expressions within OR queries

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.8.0, 7.8.0-alpha2
    • None
    • engine
    • None

      The following test case returns three tasks instead of two, due to the reason that expressions in OR queries are currently neither evaluated nor applied to the query:

      @Test
      public void shouldReturnTwoTasks() {
        // given
        Date date = DateTimeUtil.now().plusDays(2).toDate();
      
        Task task1 = taskService.newTask();
        task1.setFollowUpDate(date);
        taskService.saveTask(task1);
      
        Task task2 = taskService.newTask();
        task2.setDueDate(date);
        taskService.saveTask(task2);
      
        Task task3 = taskService.newTask();
        taskService.saveTask(task3);
      
        // when
        List<Task> tasks = taskService.createTaskQuery()
          .or()
            .followUpAfterExpression("${ now() }")
            .dueAfterExpression("${ now() }")
          .endOr()
          .list();
      
        // then
        assertEquals(2, tasks.size());
      }
      

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              tassilo.weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: