Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 a sort of custom replication service. We've already done this successfully with DBIs AVS as described here and here.  With Accela however, we are using an ESRI SDE table in an Oracle DB. While there are probably a number of ways to do this, it seems like the simplest approach is to use the ArcGIS rest API. I think we can do everything we need with query, add, and update.

...

That implementation has been used in production since February 15 2012. 

Implementation

As of November 4, we have a working Accela implementation which uses the ArcGIS rest API. We use addFeatures for inserts, and we use query and updateFeatures for updates. You can see the code here and it should be running now on our DEV instance. You can also get some sense of how this works by examining the insert and update log file output.

After some discussion, Mike and Paul have decided to try the simplest thing that could possibly work, To that end, I have written most of this code which you can see here. I do not have access to an arcgis server yet so I still have lots of testing to do . However, I have tested a fair bit of the code. You can see the log file output below.

Next Steps

Before we can continue with any serious testing we need to do the following.

  •  clean up APO data model on arcgis server
    •  fix timestamp fields
    •  fix field name widths
    •  include address_x_parcel_id
    •  remove unnecessary fields
    •  rename some fields to improve clarity
  •  reload APO data using refactored model
  •  enable arcgis feature service
  •  provide web server user credentials for EAS user
  •  limit EAS user access to specific tables
  •  decide how to handle retired versus unretired addresses

...

. 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

The issue list for this feature is here.

I'd also like to do the following before we get to much further down the road.

  •  design review
  •  code review
  •  discuss strategy for production cut-over from AVS to Accela (see this line) (currently hard coding timestamp)

Anchor

...

insert_example

...

insert_example

...

Log File Output (Insert)

Code Block
2012-1011-3104 1420:0432:3402,340494 - XMIT_ACCELA - INFO - posting JSON
2012-1011-3104 1420:0432:3402,340494 - XMIT_ACCELA - INFO - host:accelaGis.sfgov.orgpath:/ArcGIS/rest/services/EAS_Accela_Test/FeatureServer/2/addFeatures
2012-1011-3104 1420:0432:3402,340494 - XMIT_ACCELA - INFO - port connectionString :10.19.51.238:80
2012-1011-3104 1420:0432:3402,340494 - XMIT_ACCELA - INFO - json path:/easToAccelaDev/featureService/
2012-10-31 14:04:34,340 - XMIT_ACCELA - INFO - url:/addFeatures
2012-10-31 14:04:34,341 - XMIT_ACCELA - INFO - user:TODO
2012-10-31 14:04:34,341 - XMIT_ACCELA - INFO - password:TODO
2012-10-31 14:04:34,341 - XMIT_ACCELA - INFO - json:
2012-10-31 14:04:34,341 - XMIT_ACCELA - INFO - {features: [
    {
        "GEOMETRY": {
            "Y": 2106429.8391464953,
            "X": 6000111.418789571
        },
        "geometryattributes": {
            "yEAS_UNIT_ADDRESS_ID": 2110391.1163551975,725576,
            "xBASE_ADDRESS_NUM": 6005506.037626389 10000,
       },     "attributesOBJECTID": null,
   {         "YUNIT_ADDRESS": null,
            "UNIT_TYPE_DESCRIPTIONADDRESS_X_PARCEL_CREATE_TMS": null,1352061116477.258,
            "AXPSTREET_CREATENAME": null,"ROOSEVELT",
            "LOT_NUMUNIT_ADDRESS_CREATE_TMS": null,1352061116477.258,
            "ZIPCODEADDRESS_X_PARCEL_RETIRE_TMS": null,
            "DISPOSITION_DESCRIPTIONLONGITUDE": null,-122.44280195814189,
            "STREETPARCEL_BLOCK_TYPELOT": null,"2618029",
            "UNIT_ADDRESS_BASE_IDFLG": 483692true,
            "AXPACTIVATE_CHANGE_REQUEST_IDSTREET_CNN": null11145000,
            "BASE_ADDRESS_BASERETIRE_CHANGETMS": null,
            "FLOORSTREET_DESCRIPTIONTYPE": null,"WAY",
            "ADDEAS_ACTIVATEADDRESS_CHANGEX_REQUESTPARCEL_IID": null563580,
            "BLOCKBASE_ADDRESS_NUMSUFFIX": null,
            "BLK_LOT"LATITUDE": 37.763860355079515,
            "UNIT_ADDRESS_RETIRE_TMS": null,
            "EAS_ADDRESS_BASE_CREATEID": null483702,
            "BASE_ADDRESS_CREATE_SUFFIXTMS": null,1352044837254.029,
            "ZIPCODE": "AXP_RETIRE": null,"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" :   "ADD_RETIRE_CHANGE_REQUEST_ID": null,true^M
    }^M
  ]}

 

Anchor
update_example
update_example
Log File Output (Update/Retire)

Code Block
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,
            "AXP_LAST_CHANGEX": null, 6000111.418789571
        },
        "attributes": {
            "OBJECTIDEAS_UNIT_ADDRESS_ID": null725576,
            "BASE_ADDRESS_NUM": null10000,
            "CNNOBJECTID": null273623,
            "XUNIT_ADDRESS": null,
            "ADDRESS_BASE_FLG_X_PARCEL_CREATE_TMS": 1352061116477.258,
            "STREET_NAME": null,"ROOSEVELT",
            "UNIT_ADDRESS_CREATE_NUMTMS": null,1352061116477.258,
            "MAILABLE_FLGADDRESS_X_PARCEL_RETIRE_TMS": 1352064082020.226,
            "LONGITUDE": null,-122.44280195814189,
            "BASEPARCEL_STREETBLOCK_NAMELOT": null,"2618029",
            "UNIT_ADDRESS_BASE_RETIREFLG": nulltrue,
            "SUBSTREET_ADDRESS_CREATECNN": null11145000,
            "AXPBASE_ADDRESS_RETIRE_CHANGE_REQUEST_IDTMS": 1352064082020.226,
            "STREET_TYPE": null,"WAY",
            "SUBEAS_ADDRESS_X_PARCEL_ID": 725566563580,
            "ADDBASE_UPDATE_CHANGE_REQUEST_IDADDRESS_SUFFIX": null,
            "LATITUDE": 37.763860355079515,
            "SUBUNIT_ADDRESS_RETIRE_TMS": null,1352064082020.226,
            "STREETEAS_ADDRESS_SEGMENTBASE_ID": null483702,
            "COMPOSITE_ADDRESS": null
    }
}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