Versions Compared

Key

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

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

  1. Add mdms configs required for egov-user-events.

  2. Add Role-Action mapping for API’s.

  3. Deploy the latest version of egov-user-events

  4. 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

  1. Employee can create events in the system using /egov-user-event/v1/events/_create endpoint

  2. Employee can update events in the system using /egov-user-event/v1/events/_update endpoint

  3. Events are searched in the system using /egov-user-event/v1/events/_search endpoint

  4. /egov-user-event/v1/events/notifications/_count API is use to fetch the count of total, unread, read notifications.

  5. /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

Title 

Link

API Swagger Documentation

Swagger Documentation

API List

Title 

Link

 /egov-user-event/v1/events/_create

https://www.getpostman.com/collections/14812d58dff5565bd3d9

/egov-user-event/v1/events/_update

https://www.getpostman.com/collections/14812d58dff5565bd3d9

/egov-user-event/v1/events/_search

https://www.getpostman.com/collections/14812d58dff5565bd3d9

/egov-user-event/v1/events/notifications/_count

https://www.getpostman.com/collections/14812d58dff5565bd3d9

/egov-user-event/v1/events/lat/_update

https://www.getpostman.com/collections/14812d58dff5565bd3d9

...