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

Querying by variableValueNotEquals will not match typed null values

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.3.0, 7.3.0-alpha2
    • None
    • engine
    • None

    Description

      Example:
      ProcessInstance pi = runtimeService.startProcessInstanceByKey("testProcess",
      Collections.<String, Object>singletonMap("var", Variables.longValue(null)));

      assertNotNull(runtimeService.createProcessInstanceQuery().variableValueNotEquals("var", (long) 123).singleResult());

      The assertion fails although the process instance should match, as it contains a variable called "var".

      In addition, test and specify the following cases:

      • variable is untyped null => query for untyped null (not equals and equals)
      • variable is typed null => query for untyped null (not equals and equals)
      • variable is untyped null => query for typed null (not equals and equals)
      • variable is typed null => query for typed null (not equals and equals)
      • variable is typed null => query for typed value (not equals and equals)
      • variable is untyped null => query for typed value (not equals and equals)
      • variable is typed value => query for untyped null (not equals and equals)
      • variable is typed value => query for typed null (not equals and equals)

      Roman and I agreed on the following scheme:

      • with untyped null, i.e. variableValueEquals("var", null), both typed and untyped null are matched
      • with typed null, i.e. variableValueEquals("var", Variables.longValue(null)), only typed null of type long is matched
      • with typed value != null, i.e. i.e. variableValueEquals("var", 123L), only typed values with that value are matched
      • for all these queries holds that variableValueNotEquals returns the complementary set

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              smirnov Roman Smirnov
              thorben.lindhauer Thorben Lindhauer
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Salesforce