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

CA Agile Central SaaS (Rally)

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": {
            "f5b1fb22-6c15-44b5-a592-19189fafe5f2": {
                "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/99999999999",
        "_refObjectUUID": "8b8b8b8b-6363-4e4e-afaf-bebebebebebe",
        "_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.