Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.
SOLVED

trigger preference when multiple filter elements needed

Avatar

Level 8

Hi All,

A unit on my team is wanting to create a survey in WF, and I've been tasked with helping to automate it via Fusion.  I have a demo scenario that works well: a Watch Events module is triggered when projects created from a specific template are marked complete; an issue (with a custom form containing the survey questions) is created in a project that stores all the survey issues; a tagged note is created, and a notification with the survey/issue link is sent to the project owner.

I've been thinking about how best to implement the actual scenario as the survey creators provide more info.  They've indicated that they want to survey projects created from multiple templates--perhaps as many as 50-70.  This obviously rules out using the simple trigger I've created (as I've read the multiple forum posts lamenting the inability to use OR in Watch Events filters).  I'm considering 3 options, and I'd like to know if anyone has thoughts/advice/alternatives, etc.

Option 1 (Watch Events)
--Record type: Project / Filter: status EQUAL CPL
--create subsequent filters for the templateID values
***creates more scenario runs/total operations (the projects reside in multiple portfolios and programs, so I can't filter further in Watch Events)

Option 2 (Watch Events)
--Record type: Project / Filter: status EQUAL CPL and DE:SurveyTemplateCheckCalc EQUAL true
--DE:SurveyTemplateCheckCalc is a custom calculated Boolean field that looks for the projects's templateID in an array of templateID values
***would need to include the calculated field on existing custom form(s) (I'm unsure if the projects all share a custom form or have different ones) or include it on a new custom form (and attach the form to all the templates and existing projects)

Option 3 (Watch Record)
--filter on updated records and use the optional filter to include projects with a status of CPL and one of the relevant templateID values
***would need to add an iterator to account for multiple project bundles outputted in any given schedule interval

For all 3 options, I'm assuming I can build a filter containing a lengthy list of templateID values--I've done this in reports (hoping I can do the same in calculated fields and/or Fusion modules--haha).

Does anyone have a recommendation?  Are there any other considerations I should be thinking of?

Thanks!

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @KristenS_WF 

 

Couple thoughts on approaches

  • One scenario with a broad event handler + filtering within
    • Often the typical approach, where you manage routing based on the various filter conditions.
    • Depending on your use case this may get a bit unwieldy (ie having a ton of branches due to the filtering needs)
  • Split event listening and event processing into 2 steps
    • One scenario with just the specific event listener + HTTP module that refers the call to the processing scenario
    • "worker" scenario that operates based on the input it receives
    • This option gets around the missing OR filters 
    • Downside is the proliferation of "listener scenarios" - on the other hand it's all self explanatory though. 
  • Make use of custom event subscriptions
    • You can create a regular webhook and use the Event subscription UI to point a number of events to the same hook URL. 
    • So you'd have a subscription for each of the templates you're tracking - all of them going to the same scenario

I would not use a cal'd field for the template check. Instead use an array of templates that are included, as well as a list of the programs or portfolios.
Use a setMultipleVariables module where you use the add() function to create the array (single operation for setting several arrays). That setMulti module would be the second one. Next you have the filter that checks whether the programID and templateID are contained in those arrays. So you get filtering by just adding a single operation.

 

View solution in original post

2 Replies

Avatar

Level 8

Looks like Watch Record might be the most effective in my limited testing; and I apparently got stuck down the rabbit hole--it's outputting bundles, so I don't need an iterator (though I may have to do some further processing with certain elements are data that are outputted as collections).

Avatar

Correct answer by
Community Advisor

Hi @KristenS_WF 

 

Couple thoughts on approaches

  • One scenario with a broad event handler + filtering within
    • Often the typical approach, where you manage routing based on the various filter conditions.
    • Depending on your use case this may get a bit unwieldy (ie having a ton of branches due to the filtering needs)
  • Split event listening and event processing into 2 steps
    • One scenario with just the specific event listener + HTTP module that refers the call to the processing scenario
    • "worker" scenario that operates based on the input it receives
    • This option gets around the missing OR filters 
    • Downside is the proliferation of "listener scenarios" - on the other hand it's all self explanatory though. 
  • Make use of custom event subscriptions
    • You can create a regular webhook and use the Event subscription UI to point a number of events to the same hook URL. 
    • So you'd have a subscription for each of the templates you're tracking - all of them going to the same scenario

I would not use a cal'd field for the template check. Instead use an array of templates that are included, as well as a list of the programs or portfolios.
Use a setMultipleVariables module where you use the add() function to create the array (single operation for setting several arrays). That setMulti module would be the second one. Next you have the filter that checks whether the programID and templateID are contained in those arrays. So you get filtering by just adding a single operation.