Rally Software

  • 1.  What webhook expression will catch object creation?

    Posted 10-09-2018 12:32 PM

    I'm trying to create a CA Agile Central webhook to fire on creation of a new Hierarchical Requirement. I've tried expressions that look for changes to attributes that should only occur on creation, but they seem to all be explicitly invalid. Any tips or a working example?



  • 2.  Re: What webhook expression will catch object creation?
    Best Answer

    Broadcom Employee
    Posted 10-09-2018 04:14 PM

    Hi.

     

    It seems we have a problem with triggering Webhooks on creation of artifacts. I have just given it a long try. Specifically I tried using the CreationDate with operators such as: "changed" or "changed-from" (both of which are documented in the webhook API page), but none of that worked. I discussed with Engineering and they confirmed it is an issue.

     

    What you probably can still do is something like: CreationDate > some-date . This will trigger also on updates, but then you can inspect your payload and filter it on 'Action = Created' . 

     

    We may want to open up a support case for this and report it, please let me know if you'd like to.

    Also, let us know if inspecting the payload the filtering on the 'Action = Created' is helping.

     

    Thanks,

    Sagi



  • 3.  Re: What webhook expression will catch object creation?

    Broadcom Employee
    Posted 10-09-2018 05:10 PM

    I tried as well with similar criteria and couldn't get a webhook to fire based on CreationDate changed.  I also tried CreatedBy changed but that didn't fire either.



  • 4.  Re: What webhook expression will catch object creation?

    Posted 10-09-2018 05:59 PM

    Thanks for the reply and the tip on filtering by action. That should help a lot with a workaround. Is it possible to create an expression that's evaluated dynamically? Something like "CreationDate > DateTime.now() - someNumberOfMilliseconds"? Alternatively, do you have any suggestions for a set of expressions that would catch every newly created HierarchicalRequirement with as few false positives as possible? The "create with details" option for creating a new artifact allows pretty much any starting point for attributes like ScheduleState, so I'm not sure how this would be done.

     

    Opening a support case seems like a good idea. I would like to do so.

     

    I feel the need to point out that "Creating a User Story" is the first example of something that can cause a webhook to fire in the overview section of your docs. You may want to update that.



  • 5.  Re: What webhook expression will catch object creation?

    Broadcom Employee
    Posted 10-11-2018 11:33 AM

    Hi,

     

    So, I did communicate with Engineering over this. It appears this use-case was not intended to work and indeed (as we realized) not working. You are correct that this is the first use-case mentioned in the documentation and they're going to work to take it out of the documentation. 

     

    To answer your question about the dynamic expression using DateTime.now() :

    There isn't a way for that either. The Webhook definition is static (meaning constant) and has no option to make dynamic computations.

     

    I hope the suggestion/workaround to filter on the receiving end based on the Action field (Created vs. Updated) will help. Let us know if you tried that and if that helped.

     

    Sagi