FSM Vendor Registry v1.0
Details for registering new vendors

Overview

Vendor Registry is a system that enables ULB Employees to create and search Vendor i.e Desludging Operator (DSO) and driver entities with appropriate vehicle Entities for FSM Application. This document contains details about how to set up the Vendor 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 fsm-calculator-persister config path added in it
    PSQL server is running and a database is created to store FSM Application data
    Following services should be up and running:
      egov-mdms-service
      egov-user-service
      boundary-service
      vehicle

Key Functionalities

Deployment Details

    1.
    Deploy the latest version of FSM
    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 )

Configuration Details

MDMS Configuration

NA

Business Service / Workflow Configuration

NA

Actions & Role Action Mapping

Actions
1
{
2
"id": {{PLACEHOLDER1}},
3
"name": "Create Vendor/DSO",
4
"url": "/vendor/v1/_create",
5
"displayName": "Create Vehicle",
6
"orderNumber": 0,
7
"enabled": false,
8
"serviceCode": "vendor",
9
"code": "null",
10
"path": ""
11
},
12
{
13
"id": {{PLACEHOLDER1}},
14
"name": "Search Vendor/DSO",
15
"url": "/vendor/v1/_search",
16
"displayName": "Search Vendor",
17
"orderNumber": 1,
18
"enabled": false,
19
"serviceCode": "vendor",
20
"code": "null",
21
"path": ""
22
},
Copied!
Role Action Mapping
1
[
2
{
3
"rolecode": "FSM_ADMIN",
4
"actionid": "{{PLACEHOLDER1}}",
5
"actioncode": "",
6
"tenantId": "pb"
7
},
8
{
9
"rolecode": "FSM_ADMIN",
10
"actionid": "{{PLACEHOLDER2}}",
11
"actioncode": "",
12
"tenantId": "pb"
13
},
14
{
15
"rolecode": "FSM_DSO",
16
"actionid": "{{PLACEHOLDER2}}",
17
"actioncode": "",
18
"tenantId": "pb"
19
},
20
{
21
"rolecode": "FSM_EDITOR_EMP",
22
"actionid": "{{PLACEHOLDER2}}",
23
"actioncode": "",
24
"tenantId": "pb"
25
},
26
{
27
"rolecode": "FSM_VIEW_EMP",
28
"actionid": "{{PLACEHOLDER2}}",
29
"actioncode": "",
30
"tenantId": "pb"
31
},
32
{
33
"rolecode": "FSM_EMP_FSTPO",
34
"actionid": "{{PLACEHOLDER2}}",
35
"actioncode": "",
36
"tenantId": "pb"
37
},
38
{
39
"rolecode": "CITIZEN",
40
"actionid": "{{PLACEHOLDER2}}",
41
"actioncode": "",
42
"tenantId": "pb"
43
}
44
]
Copied!
Infra Ops Configuration
Configurations that we can manage through values.yml vehicle in infraops repo as follows values.yml for the vehicle can be found.
Description
name in values.yml
Current Value
Kafka Consumer Group
SPRING_KAFKA_CONSUMER_GROUP_ID
egov-vendor-services
kafka topic to which service push data to save new Vendor
PERSISTER_SAVE_VENDOR_TOPIC
save-vendor-application
mdms service host
EGOV_MDMS_HOST
egov-mdms-service from egov-service-host
Vehicle Service host
EGOV_VEHICLE_HOST
vehicle from egov-service-host
User service host
EGOV_USER_HOST
egov-user-service from egov-service-host
Location Service Host
EGOV_LOCATION_HOST
egov-location from egov-service-host
Configurations sample in Values.yml
1
# Common Labels
2
labels:
3
app: "vendor"
4
group: "rainmaker"
5
6
# Ingress Configs
7
ingress:
8
enabled: true
9
zuul: true
10
context: "vendor"
11
12
# Init Containers Configs
13
initContainers:
14
dbMigration:
15
enabled: true
16
schemaTable: "vendor_schema"
17
image:
18
repository: "vendor-db"
19
20
# Container Configs
21
image:
22
repository: "vendor"
23
replicas: "1"
24
healthChecks:
25
enabled: true
26
livenessProbePath: "/vendor/health"
27
readinessProbePath: "/vendor/health"
28
appType: "java-spring"
29
tracing-enabled: true
30
heap: "-Xmx256m -Xms256m"
31
java-args: "-Dspring.profiles.active=monitoring"
32
33
# Additional Container Envs
34
env: |
35
- name: EGOV_VEHICLE_HOST
36
valueFrom:
37
configMapKeyRef:
38
name: egov-service-host
39
key: vehicle
40
- name: EGOV_MDMS_HOST
41
valueFrom:
42
configMapKeyRef:
43
name: egov-service-host
44
key: egov-mdms-service
45
- name: EGOV_USER_HOST
46
valueFrom:
47
configMapKeyRef:
48
name: egov-service-host
49
key: egov-user
50
- name: EGOV_LOCATION_HOST
51
valueFrom:
52
configMapKeyRef:
53
name: egov-service-host
54
key: egov-location
55
- name: EGOV_HRMS_HOST
56
valueFrom:
57
configMapKeyRef:
58
name: egov-service-host
59
key: egov-hrms
60
- name: SPRING_KAFKA_CONSUMER_GROUP_ID
61
value: egov-vendor-services
62
- name: PERSISTER_SAVE_VENDOR_TOPIC
63
value: save-vendor-application
64
- name: PERSISTER_UPDATE_VENDOR_TOPIC
65
value: update-vendor-application
66
- name: SPRING_KAFKA_PRODUCER_KEY_SERIALIZER
67
value: org.apache.kafka.common.serialization.StringSerializer
68
- name: SPRING_KAFKA_PRODUCER_VALUE_SERIALIZER
69
value: org.springframework.kafka.support.serializer.JsonSerializer
70
- name: JAVA_OPTS
71
value: {{ index .Values "heap" | quote }}
72
- name: JAVA_ARGS
73
value: {{ index .Values "java-args" | quote }}
74
- name: SERVER_PORT
75
value: "8080"
76
- name: SECURITY_BASIC_ENABLED
77
value: "false"
78
- name: MANAGEMENT_SECURITY_ENABLED
79
value: "false"
80
{{- if index .Values "tracing-enabled" }}
81
- name: TRACER_OPENTRACING_ENABLED
82
value: "true"
83
{{- end }}
Copied!

Data Setup

DSO for FSM System is a vendor, For every city/ULB DSO should be created with the Representative details as owner, associated vehicles and drivers
Sample Curl
1
curl --location --request POST 'https://dev.digit.org/vendor/v1/_create' \
2
--header 'Content-Type: application/json' \
3
--data-raw '{
4
"RequestInfo": {
5
"apiInfo": {
6
"id": "string",
7
"version": "string",
8
"path": "string"
9
},
10
"deviceDetail": {
11
"id": "string",
12
"signature": "string"
13
},
14
"ts": 0,
15
"action": "string",
16
"key": "string",
17
"msgId": "string",
18
"requesterId": "string",
19
"authToken": "a35b5ba7-2d5f-4272-8a67-0303cfab2c9f"
20
},
21
"vendor": {
22
"tenantId": "pb.amritsar",
23
"name": "DSO TATA1",
24
"address": {
25
"tenantId": "pb.amritsar",
26
"doorNo": "my door",
27
"plotNo": "my plot",
28
"landmark": "my landmark",
29
"city": "amritsar",
30
"district": "amritsar",
31
"region": "amritsar",
32
"state": "punjab",
33
"country": "in",
34
"pincode": "143001",
35
"additionDetails": null,
36
"buildingName": "my building",
37
"street": "my streat",
38
"locality": {
39
"code": "SUN178",
40
"name": "Mohalla Singh kia - Area2",
41
"label": "Locality",
42
"latitude": null,
43
"longitude": null,
44
"area": "Area2",
45
"pincode": null,
46
"boundaryNum": 1,
47
"children": []
48
},
49
"geoLocation": {
50
"latitude": 0,
51
"longitude": 0,
52
"additionalDetails": {}
53
}
54
},
55
"owner": {
56
57
"tenantId": "pb.amritsar",
58
"name": "DSOc4",
59
"fatherOrHusbandName": "Phani",
60
"relationship": "FATHER",
61
"gender": "MALE",
62
"dob": 550261800000,
63
"emailId": "[email protected]",
64
"correspondenceAddress": "KPHB",
65
"mobileNumber": 8919146603
66
},
67
"vehicles": [{
68
"tenantId": "pb.amritsar",
69
"registrationNumber": "TS 09 PA 3586",
70
"model":"1998",
71
"type":"TATA.407",
72
"tankCapacity":"2000",
73
"suctionType":"SEWER_SUCTION_MACHINE",
74
"pollutionCertiValidTill":1611584416772,
75
"InsuranceCertValidTill":1611584416772,
76
"fitnessValidTill":1611584416772,
77
"roadTaxPaidTill":1611584416772,
78
"gpsEnabled":true,
79
"source":"Municipal records",
80
"owner": {
81
82
"tenantId": "pb.amritsar",
83
"name": "DSOc4",
84
"fatherOrHusbandName": "Phani",
85
"relationship": "FATHER",
86
"gender": "MALE",
87
"dob": 550261800000,
88
"emailId": "[email protected]",
89
"correspondenceAddress": "KPHB",
90
"mobileNumber": 8919146617
91
}
92
},{
93
"tenantId": "pb.amritsar",
94
"registrationNumber": "TS 09 PA 2584",
95
"model":"1998",
96
"type":"MAHINDRA.BOLERO_PICKUP",
97
"tankCapacity":"2000",
98
"suctionType":"SEWER_SUCTION_MACHINE",
99
"pollutionCertiValidTill":1611584416772,
100
"InsuranceCertValidTill":1611584416772,
101
"fitnessValidTill":1611584416772,
102
"roadTaxPaidTill":1611584416772,
103
"gpsEnabled":true,
104
"source":"Municipal records",
105
"owner": {
106
107
"tenantId": "pb.amritsar",
108
"name": "DSOc3",
109
"fatherOrHusbandName": "Phani",
110
"relationship": "FATHER",
111
"gender": "MALE",
112
"dob": 550261800000,
113
"emailId": "[email protected]",
114
"correspondenceAddress": "KPHB",
115
"mobileNumber": 8919146617
116
}
117
}],
118
"drivers": [{
119
120
"tenantId": "pb.amritsar",
121
"name": "DriverDSO4",
122
"fatherOrHusbandName": "Phani",
123
"relationship": "FATHER",
124
"gender": "MALE",
125
"dob": 550261800000,
126
"emailId": "[email protected]",
127
"correspondenceAddress": "KPHB",
128
"mobileNumber": 8919146216
129
},{
130
131
"tenantId": "pb.amritsar",
132
"name": "DriverDSO3",
133
"fatherOrHusbandName": "Phani",
134
"relationship": "FATHER",
135
"gender": "MALE",
136
"dob": 550261800000,
137
"emailId": "[email protected]",
138
"correspondenceAddress": "KPHB",
139
"mobileNumber": 8919146216
140
}],
141
"source": "WhatsApp"
142
}
143
}'
Copied!

Integration

Integration Scope

Any system or digit module can **be integrated with Vendor Service, helps to manage the Vendor with the vehicles, drivers and owner for representative and login for the representative/owner to login into the system to carry our role-specific operations.

Integration Benefits

    Validation of DSO/Vendor availability
    Fetch the vehicle assigned to the DSO
    Fetch the Drivers assigned to the DSO

Steps to Integration

    FSM to call vendor/v1/_search to fetch the DSO’s
    FSM can call vendor/v1/_search to fetch the DSO’s and the respective vehicles and drivers

Interaction Diagram

TBD

Reference Docs

Title
Link
Workflow Technical Document
User Technical Document
MDMS Technical Document
NEEDS TO BE UPDATED
IDGen Technical Document
NEEDS TO BE UPDATED
Localization Technical Document
NEEDS TO BE UPDATED
Persister Technical Document
NEEDS TO BE UPDATED
SMS Notification Technical Document
NEEDS TO BE UPDATED
API Contract
Postman Scripts

API List

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Last modified 5mo ago