Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-10829

PUT modifications to workflow/taskInstance/[_id] return 'Task updated' even when no changes occur


    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: OpenIDM 4.5.0, OpenIDM 5.0.0, OpenIDM 5.5.0, OpenIDM 6.0.0
    • Fix Version/s: 6.5.0
    • Component/s: Module - Workflow
    • Target Version/s:
    • Verified Version/s:
    • Story Points:
    • Sprint:
      OpenIDM Sprint 6.5-10.1
    • Support Ticket IDs:


      When performing a change to taskInstance via PUT with an If-Match header set, all non-exception responses return the same text whether a change was made or not:

          "_id": "36",
          "Task updated": "36"

      This is caused due to the updateInstance behaviour within TaskInstanceResource.java which checks for whether the update payload contains any of the following and applies their updates only:

      ACTIVITI_ASSIGNEE (assignee​)
      ACTIVITI_DESCRIPTION (​description​)
      ACTIVITI_NAME (name​)
      ACTIVITI_OWNER (owner​)

      If any other attribute is attempted to be modified, that modify data is discarded and the existing taskInstance object is re-written to the database, incrementing the _rev value, with no error/advisory message returned to explain what has occurred.

      Instead, we should be checking whether the payload provided within the inbound REST request contains any non-supported attributes and throwing an appropriate error response to the user. A full list of attributes which >could< be supported is available from the Activiti JavaDoc (n.b. confirm the version of Activiti) - https://www.activiti.org/javadocs/org/activiti/engine/task/Task.html


      • Start OpenIDM with samples/workflow
      • Follow the steps to reconcile the roles, user and manager
      • Log in as user1
      • Start a workflow
      • Perform a GET against the taskInstance to confirm the original values for all fields
      • Perform a PUT modification against the generated taskInstance to modify an attribute not listed above
      • Perform a GET against the taskInstance to confirm the new values for all fields


          Issue Links



              • Assignee:
                alin Alin Brici
                tom.wood Tom Wood
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: