Dear Geoevent team,
I am having issues with variable substitution inside Geoevent. I am using Geoevent to read an Automated Vehicle Location(AVL) simulation in AGOL. Then, I am using a filter to select a vehicle whenever it enters within the buffer of another point feature, hazards. I want to send an AWS email whenever a vehicle crosses into one of these hazard areas. Whenever I try to use ${Email}, and then I put my email in the FS attribute, I don’t receive any emails. If I hardcode my email into the geoevent Email Recipients fields, then I do get an email. Also, the variables I have in the message body i.e. ${Vehicle_ID}, ${Driver}, ${Time_Stamp} or ${Speed} don't read either. Instead, they print 'white space' in the email. The email is filled with White Space wherever there was a variable substitution. I have checked the syntax for fields match those in the REST endpoint. Is there something I am missing? My goal is to have somebody change the Email field in the AVL FS to their email so that they will receive an email when that truck enters a buffer. I want the email to contain variable substitutions letting the user know their speed, id number, and time of event.
Thanks for your time,
Joseph Marsh
Joseph,
Are you using 10.5.1, 10.5, 10.4.1?
Also, do the variables here:
${Vehicle_ID}, ${Driver}, ${Time_Stamp} or ${Speed}
match your field schema in the output geoevent definition exactly?
Check your geoevent definition -- are the field names all lower case, all caps? My experience with not passing variables properly, even if the rest endpoint has fields one way, it needs to match the geoevent definition fields. I typically setup my definitions to match the rest endpoints exactly.
~Alex
Hey Alex, We are on 10.5.1. The input geoevent definition matches the variables with Proper Case. I don't have an output geoevent definition for the AWS Email out. Here is a view of my input geoevent definition.
Here are views of my Geoevent Service. The first shows the input details.
The second shows the output details
Thanks,
Joe
I also have this error log message related to it.
I have resolved the issue.
Thank you for your time and help,
Joe
Joe,
We're having the same issue with variable substitution. What was your solution?
Hey Craig,
My problem was my geoevent definitions. For my poll in, I was referencing the wrong definition. In addition to that, I recommend double checking that your geoevent definition matches your field names in your service. Then, I would check that the casing of your variables in your email template match the geoevent definition. Finally, switching the email format to http if it isn't already may help.
Good luck,
Joe