This overview page describes how COGConnect represents and processes Code Enforcement case events and their associated phase changes. The representative screen shot of the UI for these services is found in ceCases.xhtml and looks like this (extra UI elements clipped):
Code enforcement cases possess a
CasePhase object which is a custom type in postgres and an Enum in Java. In the early days of COGConnect these phases were vetted and checked with code officers. Jesse even said “That’s exactly what we do.” The challenge is, however, that a seven-phase work flow is not easily tracked in one’s head. We needed a more succinct way to express where a given code enforcement case may be in its life cycle.
CitationStatus objects also contain a
CasePhaseChangeRule object which is processed whenever a
Citation changes status. This, processing may lead to a change in
CasePhase but also the creation of additional
The Phases are as follows (in order of actual case management workflow)
A case stage (not a Java object) is a value derived from the case’s phase, and reduces the seven phases to three active stages and the closed stage:
Ushering a code enforcement case through these phases is driven by a set of rules which are encapsulated in an object called the
CasePhaseChangeRule. These objects live on
EventCategory objects and, when present on a given
Event, are used by the
CaseCoordinator during event processing to make two distinct but related determinations:
EventCategoryshould be requested?
Information for making both of these determinations is bundled in the single
CasePhaseChangeRule object because many requested event categories themselves trigger case phase changes, so designing the relationships together and writing them to a single object simplifies what is already a somewhat convoluted determination process.
If a CasePhase rule passes, that rule’s specified triggered
EventCategory is created and added to the case. Since this
EventCategory could also have its own rule, and triggered
EventCategory, a set cascade of case changes may occur with the processing of a single event.
For example, if a
Citation has its status changed to ‘case dismissed’, that
CitationStatus object will contain a
CasePhaseChangeRule object which specifies that the code enforcement case’s
CasePhase should become
CasePhase.Closed and that a logically categorized
Event should be attached to the case depicting this particular series of events–to be forever encapsulated in the case’s history.