We couldn't load all Actvitity tabs. Refresh the page to try again.
If the problem persists, contact your Jira admin.
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

            Loading...
            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

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

                          Created:
                          Updated:
                          Resolved:

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

                                Created:
                                Updated:
                                Resolved: