Vehicle Registry v1.3

Overview

Vehicle Registry is a system that enables ULB Employees to create and search Vehicle Entities and schedule Vehicle Trip for FSM Application and track the VehicleTrip. This document contains the details about new enhancements made to the Vehicle service as part of FSM v1.2.1 release and how to setup the Vehicle and describe the functionalities provided.

 

Pre-requisites

Before you proceed with the configuration, make sure the following pre-requisites are met -

  • Java 8

  • Kafka server is up and running

  • egov-persister service is running and has vehicle-persister config path added in it

  • PSQL server is running and database is created to store FSM Application data

  • Following services should be up and running:

    • egov-perister

    • egov-mdms-service

    • egov-workflow-v2

    • egov-idgen

Key Functionalities

EXISTING
  1. DSO or ULB can create multiple vehicle trips based on the number of trips entered while submitting the FSM application.

  2. FSTPO can decline the vehicle trip with appropriate reason.

  3. Owner attribute has been added to the vehicle.

  4. FSTPO Vehicle Log Inbox Enhancements to include Application No search filter so that FSTPO can view all the vehicle trips associated with the application.

  5. FSPTO vehicle log API upgraded to show trip numbers in case of multi-trip application.

ENHANCEMENT
  1. Introduced Vehicle Tab.

  2. Option to add/remove/update vehicle individually.

  3. Admin can enable or disable the vehicle.

  4. Functionality to add/remove vehicles to vendor.

Deployment Details

  1. Deploy the latest version of vehicle

  2. Add vehicle-persister.yml 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 ) and restart egov-persister-service.

  3. Integrate the following below changes in vehicle-persister.yml

    https://github.com/egovernments/configs/commit/2e536376408a0f09a2afe03c478201f5d81edfe4

  4. https://github.com/egovernments/configs/pull/2238/files

  5. https://github.com/egovernments/configs/pull/2240/files

Configuration Details


https://github.com/egovernments/configs/commit/32a7e1b606ac2b7466c83007e07d104d75153695

https://github.com/egovernments/configs/commit/23237c8f467684c452461c5d0bf88ff54157fb8b

https://github.com/egovernments/configs/commit/9b2f6043694a2f23e5a2bce83600e4b41a99b7f5

https://github.com/egovernments/configs/commit/482185f1a79ad094f716e480922374e40c6e217a

https://github.com/egovernments/configs/commit/56da639add16c412056aeac119517abd434a5ece

History for egov-persister/vehicle-persister.yaml - egovernments/configs

configs/vendor-persister.yaml at DEV · egovernments/configs


MDMS Configuration

Add master data in MDMS service with module name as Vehicle and restart egov-mdms-service. Following is some sample master data for

SuctionType

{ "tenantId": "pb", "moduleName": "Vehicle", "SuctionType": [ { "code": "SEWER_SUCTION_MACHINE", "name": "Sewer suction machine", "active": true }, { "code": "SEWER_SUCTION_CUM_JETTING_MACHINE", "name": "Sewer suction cum jetting machine", "active": true } ] }

 

VehicleOwner

{ "tenantId": "pb", "moduleName": "Vehicle", "VehicleOwner": [{ "name": "ULB", "code": "ULB", "active": true }, { "name": "Private", "code": "Private", "active": true } ] }

 

VehicleMakeModel

{ "tenantId": "pb", "moduleName": "Vehicle", "VehicleMakeModel": [ { "code": "MAHINDRA", "name": "Mahindra", "active": true }, { "code": "MAHINDRA.BOLERO_PICKUP", "name": "Bolero Pickup", "active": true, "make": "MAHINDRA", "capacity": "5000", "amount": "500" }, { "code": "TATA", "name": "TATA", "active": true }, { "code": "TATA.LPT709/34", "name": "TATA LPT709/34", "active": true, "make": "TATA", "capacity": "2000", "amount": "200" }, { "code": "TATA.407", "name": "TATA 407", "active": true, "make": "TATA", "capacity": "1000", "amount": "100" }, { "code": "TAFE", "name": "TAFE", "active": true }, { "code": "TAFE.TRACTOR_45DI", "name": "TAFE Tractor 45DI", "active": true, "make": "TAFE", "capacity": "10000", "amount": "1000" }, { "code": "SONALIKA", "name": "Sonalika", "active": true }, { "code": "SONALIKA.TRACTOR_35DI", "name": "Sonalika Tractor 35DI", "active": true, "make": "SONALIKA", "capacity": "8000", "amount": "1000" } ] }

FSTPORejectionReason (Vehicle decline reason codes)


SAN-1049: Added role actions for Driver APIs. · egovernments/egov-mdms-data@fb8e530

SAN-1063: Added the permissiosn for Vehicle trip creation · egovernments/egov-mdms-data@632ee94

SAN-1047: Added role action mapping for vendor and vehicle update · egovernments/egov-mdms-data@3e608a8


Business Service / Workflow Configuration


  1. Search the FSM_VEHICLE_TRIP workflow by the given search api.

/egov-workflow-v2/egov-wf/businessservice/_search? tenantId=pb.amritsar&businessServices=FSM_VEHICLE_TRIP

2. Update this below given action at “null” state at line no. 20  for FSM_VEHICLE_TRIP in below workflow and restart the workflow service

 


Actions & Role Action Mapping


Actions




Role Action Mapping

 



Infra Ops Configuration

Configurations that we can manage through values.yml vehicle in infraops repo as follows
values.yml for vehicle can be found

Description

name in values.yml

Current Value

Description

name in values.yml

Current Value

id-gen host, to generate the application number

EGOV_IDGEN_HOST

egov-idgen from egov-service-host

mdms service host

EGOV_MDMS_HOST

egov-mdms-service from egov-service-host

workflow v2 service host

WORKFLOW_CONTEXT_PATH

egov-workflow-v2 from egov-service-host

user service host, to get the locale data

EGOV_USER_HOST

egov-user from egov-service-host

Kafka Consumer Group

SPRING_KAFKA_CONSUMER_GROUP_ID

egov-vehicle-services

kafka topic to which service push data to save new vehicle application

PERSISTER_SAVE_VEHICLE_TOPIC

save-vehicle-application

kafka topic to which service push data of the vehicleTrip to save

PERSISTER_SAVE_VEHICLE_TRIP_TOPIC

save-vehicle-trip

kafka topic to which service push data of the vehicleTrip to update

PERSISTER_UPDATE_VEHICLE_TRIP_TOPIC

update-vehicle-trip

kafka topic to which service push data of the vehicleTrip to update the status

PERSISTER_UPDATE_VEHICLE_TRIP_WORKFLOW_TOPIC

update-workflow-vehicle-trip

VehicleTrip Appilcatiion Number format`

egov.idgen.vehicle.trip.applicationNum.format

"[CITY.CODE]-VT-[cy:yyyy-MM-dd]-[SEQ_EGOV_VEHICLETRIP]"

Configurations sample in Values.yml

 


https://github.com/egovernments/DIGIT-DevOps/blob/master/deploy-as-code/helm/charts/sanitation/vehicle/values.yaml


Data Setup

Create Vehicle

Create Vehicle with the one of the vehicleType available in the VehicleMakeModel MDMS

 

Sample Curl

 

Integration

Integration Scope

Integrated with Application through REST API to create, and search vehicles.

For any module where vehicle Trip is required, can integrate REST API trip/v1/create, update, search

Integration Benefits

  • Vehicle Managed would become easy

  • Trip Management would become easy

Steps to Integration

  • FSM Application can vehicle/v1/_search to validate the fsm vehicle assignment

  • FSM Application call vehicle/trip/v1/_create on assigning vehicle to the Application

  • FSTP operator can mark the vehicleTrip as DISPOSED.

 

Interaction Diagram

 

Reference Docs

Doc Links

API List