Building Real-Time Dashboards using Accela, Connect and Runscope

Dashboards are an incredible medium to distill raw data into useful and visual tools. They can be used to support myriad of activities, from decision making to the enablement of improved transparency of organizations.  Many of our customers are representing their Accela data in dashboards to support mission critical operations.

Working with our customers to publish open data on CivicData we are often exploring new ways to visualize data.  Recently I stumbled upon a new service called Connect, a scalable real-time analytics platform, and was instantly intrigued.

Connect basically works like this:

Once I read through how to get started I instantly began thinking about how an approach like this might work for our customers using the Accela Civic Platform.  I decided to embark on a proof of concept with the ultimate goal of developing a dashboard example driven by real-time data.

The goals for me were simple, this solution it had to be:

  • Minimally invasive for our customers, it cannot impact their configuration of Accela or impact any performance of the system
  • Easy to deploy if a customer wishes to try it out
  • Workable for both our customers hosted in the Accela Cloud and those where Accela is installed on-premise within their own data centers

I’m happy to say that the proof of concept we built meets all of those goals!  Here is a short video discussing what went into the solution and below is an outline of the approach.

Pushing Events

To push events from Accela to Connect we utilized Accela’s event driven scripting engine. Every operation within Accela triggers a corresponding system event such as submitting a permit application, updating workflow tasks or resulting inspections.  Each of these system events can then trigger a script that contains logic to complete any sort of business rule.

Using this scripting engine allowed us to develop a centralized utility written in JavaScript which gathers the details about an event and pushes them to Connect. For the proof of concept we pushed all system events and kept the event details sent rather generic.

An alternative approach could be to model the events more strategically.  Aligning them with milestones that occur within a process rather than every individual event could begin to tell a powerful analytics store.

For example, we could model an event called “Permit Issuance” which is sent when a permit application is approved and issued.  This event could contain data such as the number of days between application submittal and approval or the number of cycles of review and revisions that were required prior to approval.  If every permit had these values available in Connect we could then start distilling some interesting insights on performance and expected times to issuance.

To ensure the goal of “minimally invasive” for our customers the scripts that push events to Connect are triggered asynchronously ensuring that application performance is not impacted and no Accela configuration changes are needed.

Simulating Activity in Accela

Since this solution was developed in an Accela developer sandbox and not a live environment we needed a way to simulate the activity of a typical city or county within Accela.  For this we turned to a very useful and flexible API monitoring and testing tool Runscope.

Using Runscope’s testing features I developed an API test that would complete the following operations using Accela’s Construct API:

  • Submit permit applications of various types
  • Back office staff updating workflow tasks
  • Scheduling and resulting of inspections completed in the field

API tests in Runscope can then be scheduled to run on one more more intervals which populates the sandbox with activities with different surges of activity throughout the day giving us some very interesting data to build out the dashboard.  Check out the API test we are using here to simulate activity in our sandbox.

If you are a developer that has worked with Accela you have likely received shared Runscope requests or tests as we use this tool daily to share Construct API examples easily and clearly.

Querying and Visualizing Data

Now that we have setup Accela to push events to Connect and have configured Runscope to simulate activity within our developer sandbox check out a live link to our dashboard proof of concept.

Using great resources such as Bootstrap and the great dashboard templates that are out there I was able to get visually started quickly.

Next I referenced the Connect Javascript libraries using their CDN and began querying and deploying charts quickly and easily.

All of the source code used to develop the dashboard demo can be referenced here.

Wrapping up

If you are an Accela agency that is interested in exploring alternative approaches to developing real-time dashboards let us know at developersupport@accela.com we’d love to hear from you!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s