WSAPI does not reflect change shown in webhook change object
search cancel

WSAPI does not reflect change shown in webhook change object

book

Article ID: 204613

calendar_today

Updated On:

Products

Rally SaaS

Issue/Introduction

When receiving a webhook notification that a work item has changed, the data in the webhook message shows the updated data however after issuing a WSAPI GET on the changed object, the old data is shown instead of the new data.

Environment

Release : SAAS

Component : API FOR AGILE CENTRAL

Cause

This should be considered a race condition as this can be caused when querying WSAPI too quickly after a change has been made to a work item.  Some time is required to ensure that all copies of our databases are fully synchronized.

Resolution

The ideal solution for this is take the version information in the value attribute from the webhook:

        "changes": {
          "<OBJECT_OID>": {
                "value": 10,
                "old_value": 9,

and compare it to the _objectVersion from the WSAPI GET statement:

{
    "Feature": {
        "_rallyAPIMajor": "2",
        "_rallyAPIMinor": "0",
      "_ref": "https://rally1.rallydev.com/slm/webservice/v2.0/portfolioitem/feature/<FEATURE_OID>",
      "_refObjectUUID": "<OBJECT_UUID>",
        "_objectVersion": "9",

If the _objectVersion is greater than or equal to the version information gathered in the webhook then assume the record is up to date.  Otherwise, queue the request for retry after a short delay.