Introduction
Accela APO records must be kept synchronized with EAS addresses in near real time. Regardless of how we build this it is convenient to think of this as replication. We've already done this successfully with DBIs AVS as described here and here. That implementation has been used in production since February 15, 2012.
Implementation
As of November 4, we have a working Accela implementation. Addresses that are created or changed on our EAS DEV should replicate in near real time to a table named EAS_ADDRESSES_FLAT on Accela GIS DEV. To accomplish this we use the ArcGIS rest API. When an address is created we call addFeatures. When an address is updated we use query to get the primary key from Accela (OBJECTID) and then use updateFeatures to update the other fields. The code is here. You can also get some sense of how this works by examining the insert and update log file output.
Learning Curve
After some discussion, Mike and Paul have decided to try the simplest thing that could possibly work. In this case, this means using a flattened representation of EAS addresses. This should allow us to better understand Accela and how addresses work in Accela. We expect that we'll make some changes as we learn.
Next Steps
Here are the remaining issues that will go into subsquent Accela related releases.
Before we get too much further down the road, I'd like to have a code review.
Log File Output (Insert)
2012-11-04 20:32:02,494 - XMIT_ACCELA - INFO - posting JSON 2012-11-04 20:32:02,494 - XMIT_ACCELA - INFO - path:/ArcGIS/rest/services/EAS_Accela_Test/FeatureServer/2/addFeatures 2012-11-04 20:32:02,494 - XMIT_ACCELA - INFO - connectionString :10.19.51.238:80 2012-11-04 20:32:02,494 - XMIT_ACCELA - INFO - json features: [ { "GEOMETRY": { "Y": 2106429.8391464953, "X": 6000111.418789571 }, "attributes": { "EAS_UNIT_ADDRESS_ID": 725576, "BASE_ADDRESS_NUM": 10000, "OBJECTID": null, "UNIT_ADDRESS": null, "ADDRESS_X_PARCEL_CREATE_TMS": 1352061116477.258, "STREET_NAME": "ROOSEVELT", "UNIT_ADDRESS_CREATE_TMS": 1352061116477.258, "ADDRESS_X_PARCEL_RETIRE_TMS": null, "LONGITUDE": -122.44280195814189, "PARCEL_BLOCK_LOT": "2618029", "UNIT_ADDRESS_BASE_FLG": true, "STREET_CNN": 11145000, "BASE_ADDRESS_RETIRE_TMS": null, "STREET_TYPE": "WAY", "EAS_ADDRESS_X_PARCEL_ID": 563580, "BASE_ADDRESS_SUFFIX": null, "LATITUDE": 37.763860355079515, "UNIT_ADDRESS_RETIRE_TMS": null, "EAS_ADDRESS_BASE_ID": 483702, "BASE_ADDRESS_CREATE_TMS": 1352044837254.029, "ZIPCODE": "94114" } } ] 2012-11-04 20:32:02,790 - XMIT_ACCELA - INFO - response meta data: status: 200 reason: OK version: 11 headers date: Mon, 05 Nov 2012 04:30:51 GMT content-length: 121 x-powered-by: ASP.NET content-type: text/plain;charset=utf-8 server: Microsoft-IIS/7.5 2012-11-04 20:32:02,790 - XMIT_ACCELA - INFO - response content: {^M "addResults" : [^M {^M "objectId" : 273623, ^M "globalId" : null, ^M "success" : true^M }^M ]}
Log File Output (Update/Retire)
2012-11-04 21:21:27,184 - XMIT_ACCELA - INFO - connectionString: 10.19.51.238:80 2012-11-04 21:21:27,184 - XMIT_ACCELA - INFO - urlString: /ArcGIS/rest/services/EAS_Accela_Test/FeatureServer/2/query?where=eas_address_x_parcel_id=563580&returnIdsOnly=true&f=pjson 2012-11-04 21:21:28,726 - XMIT_ACCELA - INFO - posting JSON 2012-11-04 21:21:28,726 - XMIT_ACCELA - INFO - path:/ArcGIS/rest/services/EAS_Accela_Test/FeatureServer/2/updateFeatures 2012-11-04 21:21:28,726 - XMIT_ACCELA - INFO - connectionString :10.19.51.238:80 2012-11-04 21:21:28,727 - XMIT_ACCELA - INFO - json features: [ { "GEOMETRY": { "Y": 2106429.8391464953, "X": 6000111.418789571 }, "attributes": { "EAS_UNIT_ADDRESS_ID": 725576, "BASE_ADDRESS_NUM": 10000, "OBJECTID": 273623, "UNIT_ADDRESS": null, "ADDRESS_X_PARCEL_CREATE_TMS": 1352061116477.258, "STREET_NAME": "ROOSEVELT", "UNIT_ADDRESS_CREATE_TMS": 1352061116477.258, "ADDRESS_X_PARCEL_RETIRE_TMS": 1352064082020.226, "LONGITUDE": -122.44280195814189, "PARCEL_BLOCK_LOT": "2618029", "UNIT_ADDRESS_BASE_FLG": true, "STREET_CNN": 11145000, "BASE_ADDRESS_RETIRE_TMS": 1352064082020.226, "STREET_TYPE": "WAY", "EAS_ADDRESS_X_PARCEL_ID": 563580, "BASE_ADDRESS_SUFFIX": null, "LATITUDE": 37.763860355079515, "UNIT_ADDRESS_RETIRE_TMS": 1352064082020.226, "EAS_ADDRESS_BASE_ID": 483702, "BASE_ADDRESS_CREATE_TMS": 1352044837254.029, "ZIPCODE": "94114" } } ] 2012-11-04 21:21:28,922 - XMIT_ACCELA - INFO - response meta data: status: 200 reason: OK version: 11 headers date: Mon, 05 Nov 2012 05:20:17 GMT content-length: 124 x-powered-by: ASP.NET content-type: text/plain;charset=utf-8 server: Microsoft-IIS/7.5 2012-11-04 21:21:28,922 - XMIT_ACCELA - INFO - response content: {^M "updateResults" : [^M {^M "objectId" : 273623, ^M "globalId" : null, ^M "success" : true^M }^M
Add Comment