Watch Record module when Planned Start and Completion Dates Change | Adobe Higher Education
Skip to main content
Level 9
July 5, 2023
Respondido

Watch Record module when Planned Start and Completion Dates Change

  • July 5, 2023
  • 2 respostas
  • 4047 Visualizações

Hi Fusion Community,

I'm attempting to create a Fusion scenario that has a Watch Record module with filter criteria monitoring when either the Planned Start Date OR Planned Completion Date of a task are changed.

I'm struggling to find a way to do this.  Any suggestions are welcome.
Thanks!
Nick

Este tópico foi fechado para respostas.
Melhor resposta por ChrisStephens

Oh, in that case just use the watch events module.

2 Respostas

Jason_JB
Level 5
July 5, 2023

I've created custom formula fields that replicate the data for a few fields like these so that they will show up in the watch events.

 

Here's an example

 

NickVa7Autor
Level 9
July 6, 2023

Thanks for the idea, Jason.  Are you able to elaborate?  How is that calculated field not just storing the most current Start Date value?  Wouldn't a comparison to the native Start Date field not be the same?  Also, how are you comparing them?

ChrisStephens
Community Advisor
Community Advisor
July 7, 2023

WF Support had an interesting idea, but it might require me to learn a bit more along the way.  

 

"

No, you should still be able to accomplish this with one scenario, but it will require some finessing to get it right. I'll outline a few steps below on how to do this:

1. Set up a Custom Webhook module in the scenario (preferably a new scenario if possible). https://drop.workfront.com/KouEwPNO
* Make sure to copy down the address that the Webhook module gives you, it should be in this format: https://hook.app.workfrontfusion.com/
2. Create an Event Subscription for OR statement 1 (If the Planned Start Date or Planned Completion Date values on a task are modified (updated). As a note here, you cannot add in the month filtering within the Event Subscription, you'll need to add in that filtering later in the scenario.
* When setting up this Event Subscription, use the URL address that the Webhook module gave you in the "url" field: https://experienceleague.adobe.com/docs/workfront/using/adobe-workfront-api/event-subscriptions/event-subs-api.html?lang=en#:~:text=the%20%E2%80%9CURL%E2%80%9D%20field.-,Creating%20Event%20Subscription%20API%C2%A0Requests,-After%20ensuring%20the
* When setting up the filters, use the following link as a guide for those filters: https://experienceleague.adobe.com/docs/workfront/using/adobe-workfront-api/event-subscriptions/event-subs-api.html?lang=en#:~:text=Toggle%20Text%20Wrapping-,Event%20subscription%20filtering,-Event%20subscription%20filtering
3. Create an Event Subscription for OR statement 2 (If the old state Status value is not equal to CPL (Complete) and the new state Status value is equal to CPL)
* When setting up this Event Subscription, use the URL address that the Webhook module gave you in the "url" field: https://experienceleague.adobe.com/docs/workfront/using/adobe-workfront-api/event-subscriptions/event-subs-api.html?lang=en#:~:text=the%20%E2%80%9CURL%E2%80%9D%20field.-,Creating%20Event%20Subscription%20API%C2%A0Requests,-After%20ensuring%20the
* When setting up the filters, use the following link as a guide for those filters: https://experienceleague.adobe.com/docs/workfront/using/adobe-workfront-api/event-subscriptions/event-subs-api.html?lang=en#:~:text=Toggle%20Text%20Wrapping-,Event%20subscription%20filtering,-Event%20subscription%20filtering"

 

My assumption is the Event Subscription they are talking about is accomplished via a Custom API Call module.  Not sure if you know?  If so, I'm assuming I would need to input some JSON text to the Body field to do my filtering there?  This is a bit over my head, so not sure if it makes sense to you or if you have any further direction?  

 


Yes, this is an option, but it is wildly more complicated, and my recommendation would be to use a calculated field with a watch events triggering off of that custom field, similar to my other comment. There are several negatives to doing what Workfront is recommending, and I have done this before, but in my case it was because I needed to watch different object types, so I couldn't do it off of a single watch events scenario. 

When they refer to "creating the subscription", what they're telling you to do is create the two Workfront webhooks manually, and point it to your custom Webhook module, see here about half way down, "Create event subscription API requests". Important note, you can't do that with the Workfront modules, you must use the true custom API call modules. 

ChrisStephens
Community Advisor
Community Advisor
July 6, 2023

The most straight forward way to do this would be to create a calculated field that is a concatenation of those two fields, and then just watch for this calculated field to change.

Otherwise, you would have to have two seperate scenarios, as webhooks in Workfront can't do OR statements.

NickVa7Autor
Level 9
July 6, 2023

Chris, I like this idea....wish calculated fields were available as a selection in the Watch Field event:

ChrisStephens
Community Advisor
Community Advisor
July 7, 2023

Oh, in that case just use the watch events module.