Overview
eGov-User-Events service provide a common point to manage all the events generated for the user in the system. Events include updates from multiple applications like PT, PGR, TL etc, events created by the employee addressing the citizen etc. This service provides APIs to create , update and search such events for the user.
Pre-requisites
Before you proceed with the documentation, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has egov-user-events persister config path added in it
PSQL server is running and database is created
Key Functionalities
Provide common platform to create, manage and notify events.
Events can be created either by an API call or through pushing records to the Kafka Queue.
Interaction Diagram
...
Deployment Details
Add mdms configs required for egov-user-events.
Add Role-Action mapping for API’s.
Deploy the latest version of egov-user-events
Add egov-user-events file in config folder in git and add that path in persister . (The file path is to be added in environment yaml file in param called
persist-yml-path
)
Configuration Details
Add master data in MDMS service with module name as mseva. Following is some sample master data for the service:
Event Categories
...
Please go through the code and descriptions over every method to understand the use-cases and flow-of-logic in a better way.
Integration
Integration Scope
eGov-user-events can be integrated with any organisation or system which wants to send the events generated for the user in the system
Integration Benefits
Easy manages user events on the system, which means all the events about which the user (essentially citizen) has to be notified are stored and retrieved through this service.
Steps to Integration
Employee can create events in the system using
/egov-user-event/v1/events/_create
endpointEmployee can update events in the system using
/egov-user-event/v1/events/_update
endpointEvents are searched in the system using
/egov-user-event/v1/events/_search
endpoint/egov-user-event/v1/events/notifications/_count
API is use to fetch the count of total, unread, read notifications./egov-user-event/v1/events/lat/_update
API is use to update the last-login-time of the user. We store last-login-time of the user through this API thereby deciding which notifications have been read.
Reference Docs
Doc Links
Title | Link |
API Swagger Documentation |
API List
Title | Link |
/egov-user-event/v1/events/_create | |
/egov-user-event/v1/events/_update | |
/egov-user-event/v1/events/_search | |
/egov-user-event/v1/events/notifications/_count | |
/egov-user-event/v1/events/lat/_update |
...