Skip to main content
Question

I'm struggling getting filters to work in a simple automation. I'm using a webhook as a trigger, logging the message response from it then trying to pass a filter based on containing a certain value.


chadprop
Participant
Forum|alt.badge.img

The webhook is coming from a hosted FS on AGOL set to respond to updates and creates. There are 10 'pieces' (layerids) to the feature service and I'm only interested in triggering a workbench when the layerID=0. I've imported the JSON keys and made them available to the filter action.

I've tried many different formatting methods in the 'Contains' setting but no matter what I put in there the filter always fails and logs another message that it has failed. I've got a fairly simple workbench I'm trying to trigger with the automation but since the filter fails the workbench does not run.

3 replies

chadprop
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • June 8, 2023

Sorry, should have mentioned I'm using 'Form' version 2022.0 and Server 2022.0 (running on Linux).


redgeographics
Celebrity
Forum|alt.badge.img+49

Can you use a Log A Message action to log the "Event as JSON" so you can see what exactly is in the messages?

 

The way you have it set up right now the webhook.layerId should contain that entire text in order to pass, whereas I suspect it will simply contain the id value, so 0 should work too.


chadprop
Participant
Forum|alt.badge.img
  • Author
  • Participant
  • June 20, 2023
redgeographics wrote:

Can you use a Log A Message action to log the "Event as JSON" so you can see what exactly is in the messages?

 

The way you have it set up right now the webhook.layerId should contain that entire text in order to pass, whereas I suspect it will simply contain the id value, so 0 should work too.

turns out the JSON being passed from the AGOL webhook started off with a ' Payload[ ' string of text that FME wasn't recognizing as JSON at all.

I had to manipulate the string and clean up the extra characters so that workbench could parse the message correctly.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings