Select to view content in your preferred language

GeoEvent Server Update Feature - what am I doing wrong?

998
2
Jump to solution
07-15-2022 10:33 AM
JonSwoveland
Frequent Contributor

Hi all, I'm new to GeoEvent Server, so please be gentle 🙂

I'm trying to set up a simple prototype GeoEvent Service that uses a "Receive JSON on a WebSocket" input connector hooked up to a "Update a Feature" output connector.

The websocket input connector (json-websocket-in) seems to be working ok.  I'm using Postman to test it and I can see the traffic in the activity graph.  The GeoEvent Definition is very simple, with two fields: UXO_STATUS (String), and OBECTID (Double).  The OBJECTID field is tagged with the TRACK_ID field.

The Update a Feature output connector is hooked up to a Feature Server, and the "Unique Feature Identifier Field" is set to OBJECTID.  

In Postman, my message to the websocket is:

[{
"OBJECTID": 1,
"UXO_STATUS": "NRM"
}]

However, when I send this, the feature with OBJECTID does not have its "UXO_STATUS" field updated.

The logs show: This output is configured to support update only. Event for 1.0 will not be inserted.

So, I'm sure something is not configured properly, but I've no idea what.

Thanks!

 

0 Kudos
1 Solution

Accepted Solutions
JonSwoveland
Frequent Contributor

Found the problem!

I put the com.esri.ges.transport.featureService.FeatureServiceOutboundTransport log into TRACE mode, and re-sent the message from PostMan.

Here's what I saw in the logs:

Posting to URL: https://------/server/rest/services/OrdnanceByDate/FeatureServer/0/query with parameters: f=json&token=-------.&outFields=OBJECTID,OBJECTID&returnGeometry=false&where=OBJECTID IN (1.0).

OBJECTID IN (1.0)  - The GeoEvent Definition that was automatically generated from my message set the OBJECTID datatype to double.  Changing this to an integer fixed it.

I tried again with the [] brackets, and it worked as well.

View solution in original post

0 Kudos
2 Replies
JeffSilberberg
Frequent Contributor

Take the square Brackets off your test data and try it -- 

You are telling it you are passing an array of object, not just an object - There is other processing to do if you want to handle an array of object. 

{
"OBJECTID": 1,
"UXO_STATUS": "NRM"
}

JonSwoveland
Frequent Contributor

Found the problem!

I put the com.esri.ges.transport.featureService.FeatureServiceOutboundTransport log into TRACE mode, and re-sent the message from PostMan.

Here's what I saw in the logs:

Posting to URL: https://------/server/rest/services/OrdnanceByDate/FeatureServer/0/query with parameters: f=json&token=-------.&outFields=OBJECTID,OBJECTID&returnGeometry=false&where=OBJECTID IN (1.0).

OBJECTID IN (1.0)  - The GeoEvent Definition that was automatically generated from my message set the OBJECTID datatype to double.  Changing this to an integer fixed it.

I tried again with the [] brackets, and it worked as well.

0 Kudos