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

HistoricTasKInstanceQuery with processVariableValue filter fails on history level "AUDIT"

      The processVariableValue filter only woks with history level FULL as it joins on the ACT_HI_DETAIL table (but it should join on the ACT_HI_VARINST table),

      YOu can easily check that by adding a process variable to the existing test cases (or add a new one of course ):

      public class HistoricTaskInstanceTest extends PluggableProcessEngineTestCase {

      @Deployment
      public void testHistoricTaskInstance() throws Exception {
      Map<String, Object> variables = new HashMap<String, Object>();
      >> variables.put("hallo", "steffen");
      String processInstanceId = runtimeService.startProcessInstanceByKey("HistoricTaskInstanceTest", variables).getId();

      SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");

      // Set priority to non-default value
      Task runtimeTask = taskService.createTaskQuery().processInstanceId(processInstanceId).singleResult();
      runtimeTask.setPriority(1234);

      // Set due-date
      Date dueDate = sdf.parse("01/02/2003 04:05:06");
      runtimeTask.setDueDate(dueDate);
      taskService.saveTask(runtimeTask);

      String taskId = runtimeTask.getId();
      String taskDefinitionKey = runtimeTask.getTaskDefinitionKey();

      HistoricTaskInstance historicTaskInstance = historyService.createHistoricTaskInstanceQuery()
      >> .processVariableValueEquals("test", "steffen")
      .singleResult();

      >> now historicTaskInstance is null

      Problem in HistoricTaskInstance.xml:

      <foreach collection="variables" index="index" item="var">
      and exists (
      select HD.ID_
      >> from ${prefix}ACT_HI_DETAIL HD

        This is the controller panel for Smart Panels app

            [CAM-1502] HistoricTasKInstanceQuery with processVariableValue filter fails on history level "AUDIT"

            Bernd Ruecker created issue -
            Daniel Meyer made changes -
            Labels New: AD
            Thorben Lindhauer made changes -
            Fix Version/s New: 7.4.0 [ 13505 ]
            Fix Version/s New: 7.3.3 [ 13990 ]
            Thorben Lindhauer made changes -
            Fix Version/s New: 7.2.6 [ 13790 ]
            Resolution New: Fixed [ 1 ]
            Status Original: Open [ 1 ] New: Resolved [ 5 ]
            Remaining Estimate New: 0 minutes [ 0 ]
            Original Estimate New: 0 minutes [ 0 ]
            user-a6477 (Inactive) made changes -
            Assignee New: Thorben Lindhauer [ thorben.lindhauer ]
            Thorben Lindhauer made changes -
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Daniel Meyer made changes -
            Fix Version/s New: 7.4.0-alpha1 [ 14191 ]
            Thorben Lindhauer made changes -
            Workflow Original: camunda BPM [ 25391 ] New: Backup_camunda BPM [ 58068 ]

              thorben.lindhauer Thorben Lindhauer
              ruecker Bernd Ruecker
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: