Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-20597

Incorrect example for historic task query API endpoint in APS API Explorer

    Details

    • Bug Priority:
      Category 2
    • ACT Numbers:

      00989107

      Description

      Summary
      The example for the historic task query endpoint in the APS API Explorer is incorrect.

      Steps to reproduce
      1. Go to the historic task query section in API explorer:

      http://server:port/activiti-app/api-explorer.html#!/tasks/listHistoricTasksUsingPOST

      2. Set the queryRequest to

      {
      "taskVariables": [{
      "value": "test",
      "name": "test",
      "variableOperation": "EQUALS"
      }]
      }
      

      using "variableOperation" and uppercase "EQUALS" as given in the example.
      3. Run the API call by pressing the "Try it out" button

      Expected behaviour
      API call runs fine without returning an error and eventually returning results matching the query.

      Current behaviour
      Teh following error is returned:

      {
        "message": "JSON parse error: Unrecognized field \"variableOperation\" (class com.activiti.model.runtime.QueryVariable), not marked as ignorable; nested exception is com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field \"variableOperation\" (class com.activiti.model.runtime.QueryVariable), not marked as ignorable (4 known properties: \"value\", \"type\", \"name\", \"operation\"])\n at [Source: (PushbackInputStream); line: 6, column: 2] (through reference chain: com.activiti.model.runtime.HistoricTaskInstanceQueryRepresentation[\"taskVariables\"]->java.util.ArrayList[0]->com.activiti.model.runtime.QueryVariable[\"variableOperation\"])",
        "messageKey": "GENERAL.ERROR.BAD-REQUEST"
      }
      

      Supporting evidence

      • Reproduced in current latest APS 1.9.0.5 release
      • Reviewing the class activiti-app-model/src/main/java/com/activiti/model/runtime/QueryVariable.java shows that the parameter should be named simply "operation" and it should use lowercase operations. The following queryRequest works as expected:
        {
        "taskVariables": [{
        "value": "test",
        "name": "test",
        "operation": "equals"
        }]
        }
        

        Attachments

          Structure

            Activity

              People

              • Assignee:
                dgruber Doug Gruber
                Reporter:
                dkoch Dennis Koch
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Structure Helper Panel