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

I can use expressions within OR queries

    Details

    • Type: Feature Request
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.8.0, 7.8.0-alpha2
    • Component/s: engine
    • Labels:
      None

      Description

      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());
      }
      

        Activity

        There are no comments yet on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development