Skip to content

Consumer Events

Raymond Hughes edited this page Oct 18, 2024 · 2 revisions

Appeals consumer events

Event Audits

The purpose of this research is to review the Event Audit table in appeals Consumer and determine the relevance of the same or similar table within Caseflow.

There are currently two tables in Caseflow that retain data for the event process that Consumer kicks off. 

1. The Event table, which "Stores records that are created or updated by an event from the Appeals-Consumer application."
2. The Event Record table, which "Stores events from the Appeals-Consumer application that are processed by Caseflow"

The Event table acts as a over arching model that then has many Event Records. The Event Records contain data related to each record within caseflow that is being updated or created. A single event from Appeals Consumer will often times update multiple records and therefore create multiple Event Record objects. 

Between the EventRecord and Event classes within Caseflow and the Event and EventAudit within Appeals Consumer, I believe we have sufficient resources for the audit of each event passed to Caseflow. 

The only additional data that we may want to retain would be the original state a record was in before the change took place. We could do this by either saving in logs, papertrail or in the response that AppealsConsumer receives before sending the post request to Caseflow. After further research, I'm not sure that the use cases for that data would warrant this solution though.



Caseflow Event Record Table and console output

create_table "event_records", comment: "Stores records that are created or updated by an event from the Appeals-Consumer application.", force: :cascade do \|t\|    t.datetime "created_at", null: false, comment: "Automatic timestamp when row was created"    t.integer "event_id", null: false, comment: "ID of the Event that created or updated this record."    t.bigint "evented_record_id", null: false    t.string "evented_record_type", null: false    t.datetime "updated_at", null: false, comment: "Automatic timestamp whenever the record changes"    t.index ["evented_record_type", "evented_record_id"], name: "index_event_record_on_evented_record"end --


Clone this wiki locally