Versions Compared

Key

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

Overview

Faecal sludge management (FSM) is a system that enables citizen to raise a request for septic tank cleaning with there ULB’s directly or reaching out to ULB counter. Citizen can track the application, make a payment for the charges and rate the service. This document contains the details about how to setup the fsm and describes the functionalities it provides.

...

  1. Deploy the latest version of fsm

  2. Add fsm-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 the egov-persister service.

  3. If index are to be created add the indexer config path in indexer service. (The file path is to be added in environment yaml file in param called egov-indexer-yaml-repo-path) and restart egov-indexer service.

Configuration Details

MDMS Configuration

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

...

Code Block
{
	"tenantId": "pb",
	"moduleName": "FSM",
	"CheckList": [{
			"code": "SPILAGE",
			"active": true,
			"required": true,
			"type": "SINGLE_SELECT",
			"options": [
				"YES",
				"NO",
				"NA"
			]
		},
		{
			"code": "SAFETY_GEARS_USED",
			"active": true,
			"type": "MULTI_SELECT",
			"required": true,
			"options": [
				"EYE_GEAR",
				"HAND_GLOVES",
				"NOSE_MASK"
			]
		},
	]
}

...

Code Block
{
    "tenantId	{
			"code": "pbNUMBER_OF_TRIPS",
			"active":    "moduleNametrue,
			"type": "FSMDROP_DOWN",
			"required":    "Configfalse,
			"options": [
        {
            "code":"noOfTrips",
            "				"1",
				"2",
				"3",
				"4",
				"5",
				"6",
				"7",
				"8",
				"9",
				"10"
			]
		}
	]
}


Config ( Configuration at application level )

Code Block
{
    "tenantId": "pb",
    "moduleName": "FSM",
    "Config": [
        {
            "code":"noOfTrips",
            "override":false,
            "default":1,
            "active":true,
            "description":"override:true indicates, noOfTrips poperty is allowed to override in FSM."
        },
        {
            "code":"additionalDetails.tripAmount",
            "override":false,
            "active":true,
            "description":"override:true indicates, tripAmount poperty is allowed to override in FSM."
        },
        {
            "code":"slumName",
            "override":true,
            "active":true,
            "description":"override:true indicates, tripAmount poperty is allowed to override in FSM."
        },
        {
            "code":"ALLOW_MODIFY",
            "WFState":"CREATED",
            "override":[
                "propertyUsage",
                "vehicleType",
                "sanitationtype",
                "address.pincode",
                "address.city",
                "address.locality",
                "address.street",
                "address.doorNo",
                "address.landmark",
                "pitDetail"
            ],
            "active":true,
            "description":"properties in override allowed to modify when FSM application moving from CREATED Status to next status."
        }
        
    ]
}

...

Code Block
{
    "tenantId": "pb",
    "moduleName": "FSM",
    "FSTPPlantInfo": [
        {
            "PlantCode": "AMR001",
            "PlantName": "Amritsar FSTP",
            "active": true,
            "PlantType":"FSTP",
            "PlantLocation":"Amritsar",
            "PlusCode":"JQ2R+7G Khapar Kheri, Punjab",
            "PlantOperationalTimings":"10.00am-08.00pm",
            "PlantOperationalCapacityKLD":"50",
            "ULBS":"ppbpb.jalandhar,pb.amritsar,pb.nayagaon"
        },
        {
            "PlantCode": "MOH002",
            "PlantName": "Mohali SeTPP",
            "active": true,
            "PlantType":"SeTP",
            "PlantLocation":"Mohali",
            "PlusCode":"MPFQ+V2 Sahibzada Ajit Singh Nagar, Punjab",
            "PlantOperationalTimings":"10.00am-06.00pm",
            "PlantOperationalCapacityKLD":"100",
            "ULBS":"pb.mohali,pb.phagwara,pb.nawanshahr,pb.derabassi"
        }
    ]
}


PitType ( Type of pit )

...

Code Block
{
  "RequestInfo": {
    "apiId": "Rainmaker",
    "action": "",
    "did": 1,
    "key": "",
    "msgId": "20170310130900|en_IN",
    "requesterId": "",
    "ts": 1513579888683,
    "ver": ".01",
    "authToken": "{{devAuth}}",
    "userInfo": {
      "id": 73,
      "userName": null,
      "name": null,
      "type": "EMPLOYEE",
      "mobileNumber": null,
      "emailId": null,
      "roles": [
        {
          "id": 2,
          "name": "Customer Support Representative",
          "code": null,
          "tenantId": null
        }
      ],
      "tenantId": null,
      "uuid": "uuid"
    }
  },
  "BusinessServices": [
        {
            "tenantId": "pb",
            "businessService": "FSM",
            "business": "fsm",
            "businessServiceSla": 172800000,
            "states": [
                {
                    "tenantId": "pb",
                    "sla": null,
                    "state": null,
                    "applicationStatus": null,
                    "docUploadRequired": false,
                    "isStartState": true,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "tenantId": "pb",
                            "action": "APPLY",
                            "nextState": "PENDING_APPL_FEE_PAYMENT",
                            "roles": [
                                "FSM_CREATOR_EMP"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "action": "CREATE",
                            "nextState": "CREATED",
                            "roles": [
                                "CITIZEN"
                            ]
                        }
                    ]
                },
                {
                    "tenantId": "pb",
                    "sla": null,
                    "state": "CREATED",
                    "applicationStatus": "CREATED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "tenantId": "pb",
                            "action": "REJECT",
                            "nextState": "REJECTED",
                            "roles": [
                                "FSM_ADMIN"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "action": "SUBMIT",
                            "nextState": "PENDING_APPL_FEE_PAYMENT",
                            "roles": [
                                "FSM_EDITOR_EMP"
                            ]
                        }
                    ]
                },
                {
                    "tenantId": "pb",
                    "sla": null,
                    "state": "PENDING_APPL_FEE_PAYMENT",
                    "applicationStatus": "PENDING_APPL_FEE_PAYMENT",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "tenantId": "pb",
                            "action": "REJECT",
                            "nextState": "REJECTED",
                            "roles": [
                                "FSM_ADMIN"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "action": "SENDBACK",
                            "nextState": "CREATED",
                            "roles": [
                                "FSM_ADMIN"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "action": "PAY",
                            "nextState": "ASSING_DSO",
                            "roles": [
                                "CITIZEN",
                                "FSM_COLLECTOR"
                            ]
                        }
                    ]
                },
                {
                    "tenantId": "pb",
                    "sla": null,
                    "state": "ASSING_DSO",
                    "applicationStatus": "ASSING_DSO",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "tenantId": "pb",
                            "action": "SENDBACKCANCEL",
                            "nextState": "PENDING_APPL_FEE_PAYMENTCANCELED",
                            "roles": [
                                "FSM_ADMIN"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "action": "CANCELASSIGN",
                            "nextState": "CANCELEDPENDING_DSO_APPROVAL",
                            "roles": [
                                "FSM_EDITOR_ADMINEMP"
                            ]
                        },
                    ]
         {       },
                {
    "tenantId": "pb",               "tenantId": "pb",
            "action": "ASSIGN",       "sla": null,
                    "nextStatestate": "PENDING_DSO_APPROVALREJECTED",
                            "roles"applicationStatus": ["DSO_REJECTED",
                    "docUploadRequired": false,
          "FSM_EDITOR_EMP"          "isStartState": false,
                 ]   "isTerminateState": false,
                    } "isStateUpdatable": true,
                    ]"actions": [
               },         {
       {                     "tenantId": "pb",
                            "slacurrentState": null"DSO_REJECTED",
                    "state": "DSO_REJECTED",        "action": "CANCEL",
                     "applicationStatus       "nextState": "DSO_REJECTEDCANCELED",
                            "docUploadRequiredroles": false,[
                    "isStartState": false,           "FSM_ADMIN"
         "isTerminateState": false,                  ]
  "isStateUpdatable": true,                     "actions": [},
                         {
                            "tenantId": "pb",
                            "currentState": "DSO_REJECTED",
                            "action": "CANCELREASSING",
                            "nextState": "CANCELEDPENDING_DSO_APPROVAL",
                            "roles": [
                                "FSM_EDITOR_ADMINEMP"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "currentState": "DSO_REJECTED",
                            "action": "REASSINGSENDBACK",
                            "nextState": "PENDING_DSO_APPROVAL",
                            "roles": [
                                "FSM_EDITOR_EMPADMIN"
                            ]
                        },
                    ]
       {         },
                {
  "tenantId": "pb",                  "tenantId": "pb",
            "currentState": "DSO_REJECTED",       "sla": null,
                    "actionstate": "SENDBACKDSO_INPROGRESS",
     
                      "nextStateapplicationStatus": "PENDING_DSO_APPROVALINPROGRESS",
                    "docUploadRequired": false,
      "roles": [             "isStartState": false,
                    "FSM_ADMINisTerminateState": false,
                    "isStateUpdatable": true,
     ]               "actions": [
        }                {
    ]                 },       "tenantId": "pb",
        {                     "tenantIdcurrentState": "pbDSO_INPROGRESS",
                    "sla": null,             "action": "SENDBACK",
       "state": "DSO_INPROGRESS",                     "applicationStatusnextState": "PENDING_DSO_INPROGRESSAPPROVAL",
                    "docUploadRequired        "roles": false,[
                    "isStartState": false,           "FSM_ADMIN"
         "isTerminateState": false,                  ]
  "isStateUpdatable": true,                     "actions": [},
                        {
                            "tenantId": "pb",
                            "currentState": "DSO_INPROGRESS",
                            "action": "SENDBACKDECLINE",
                            "nextState": "PENDINGASSING_DSO_APPROVAL",
                            "roles": [
                                "FSM_ADMINDSO",
                             ]   "FSM_EDITOR_EMP"
                     },       ]
                 {       },
                     "tenantId": "   {
                            "tenantId": "pb",
                            "currentState": "DSO_INPROGRESS",
                            "action": "DECLINECOMPLETED",
                            "nextState": "ASSINGCITIZEN_FEEDBACK_DSOPENDING",
                            "roles": [
                                "FSM_DSO",
                                "FSM_EDITOR_EMP"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "currentState": "DSO_INPROGRESS",
                            "action": "COMPLETEDCANCEL",
                            "nextState": "CITIZEN_FEEDBACK_PENDINGCANCELED",
                            "roles": [
                                "FSM_DSOADMIN",

                               "FSM_EDITOR_EMP"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "currentState": "DSO_INPROGRESS",
                            "action": "CANCELREASSING",
                            "nextState": "CANCELEDPENDING_DSO_APPROVAL",
                            "roles": [
                                "FSM_ADMINEDITOR_EMP"
                            ]
                        }
                    ]
                },
                {
                    "tenantId": "pb",
                    "sla": null,
                    "state": "PENDING_DSO_APPROVAL",
                    "applicationStatus": "PENDING_DSO_APPROVAL",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "tenantId": "pb",
                            "currentState": "PENDING_DSO_APPROVAL",
                            "action": "DSO_REJECT",
                            "nextState": "DSO_REJECTED",
                            "roles": [
                                "FSM_DSO"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "currentState": "PENDING_DSO_APPROVAL",
                            "action": "DSO_ACCEPT",
                            "nextState": "DSO_INPROGRESS",
                            "roles": [
                                "FSM_DSO"
                            ]
                        },
                        {
                            "tenantId": "pb",
                            "currentState": "PENDING_DSO_APPROVAL",
                            "action": "CANCEL",
                            "nextState": "CANCELED",
                            "roles": [
                                "FSM_ADMIN"
                            ]
                        },
                    ]    {
            },                 {"tenantId": "pb",
                    "tenantId": "pb",              "currentState": "PENDING_DSO_APPROVAL",
      "sla": null,                     "stateaction": "COMPLETEDREASSING",
                    "applicationStatus": "COMPLETED        "nextState": "PENDING_DSO_APPROVAL",
                    "docUploadRequired": false,        "roles": [
                                "isStartState": false,FSM_EDITOR_EMP"
                            ]
"isTerminateState": true,                     "isStateUpdatable": false }
               },     ]
           {     },
               "sla": null, {
                    "statetenantId": "REJECTEDpb",
                    "applicationStatussla": "REJECTED"null,
                    "docUploadRequiredstate": false"COMPLETED",
                    "isStartStateapplicationStatus": false"COMPLETED",
                    "isTerminateStatedocUploadRequired": truefalse,
                    "isStateUpdatableisStartState": false,
                    "actionsisTerminateState": nulltrue,
                },    "isStateUpdatable": false
           {     },
               "tenantId": "pb", {
                    "sla": null,
                    "state": "CANCELEDREJECTED",
                    "applicationStatus": "CANCELEDREJECTED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                },
                {
                    "tenantId": "pb",
                    "sla": null,
                    "state": "CITIZEN_FEEDBACK_PENDINGCANCELED",
                    "applicationStatus": "CITIZEN_FEEDBACK_PENDINGCANCELED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": falsetrue,
                    "isStateUpdatable": false,
                    "actions": null
[                },
        {        {
                    "tenantId": "pb",
                    "sla": null,
      "currentState              "state": "CITIZEN_FEEDBACK_PENDING",
    
                       "actionapplicationStatus": "SUBMITCITIZEN_FEEDBACK_PENDING",
                    "docUploadRequired": false,
           "nextState": "COMPLETED",         "isStartState": false,
                    "rolesisTerminateState": false,
[                    "isStateUpdatable": false,
           "CITIZEN"         "actions": [
                  ]      {
                  }          "tenantId": "pb",
         ]                 }  "currentState": "CITIZEN_FEEDBACK_PENDING",
          ]         }     ] }

Localization Setup

Using /localization/messages/v1/_upsert , add localisation (templates) for notification messages to be sent. Following are the product notification templates:

Code Block
{   "messagesaction":[ "RATE",
         {             "code": "FSM_SMS_CREATED_CREATE      "nextState": "COMPLETED",
            "message": "Dear Applicant,Your application for cleaning septic tank/pit is created with application reference no.<2>.You will be notified to make an application fee shortly.Request is expected to be completed within 24hrs of making the payment.",                "roles": [
                               "module": "rainmaker-commonCITIZEN",
            "locale": "en_IN"         },      ]
    {             "code": "FSM_SMS_PENDING_APPL_FEE_PAYMENT_SUBMIT",      }
      "message": "Dear Applicant, Please pay the application fee Rs.<AMOUNT_TO_BE_PAID>/- for cleaning the septic tank/pit with]
request number <2>.Click this link <PAY_LINK> to make the payment.Request is expected to be completed within 24hrs}
of making the payment.",         ]
   "module": "rainmaker-common",    }
    ]
}

Localization Setup

Using /localization/messages/v1/_upsert , add localisation (templates) for notification messages to be sent. Following are the product notification templates:

Code Block
{
  "localemessages":[
"en_IN"         },
        {
            "code": "FSM_SMS_PENDING_APPL_FEE_PAYMENT_APPLYCREATED_CREATE",
            "message": "Dear Applicant, Your application for cleaning septic tank /pit is created with application numberreference no.<2>.PleaseYou clickwill this link <PAY_LINK>be notified to paymake thean application fee for processing the applicationshortly.Request is expected to be completed within 24hrs<SLA_HOURS>hrs of making the payment.",
            "module": "rainmaker-common",
            "locale": "en_IN"
        },
          {
            "code": "FSM_SMS_PENDING_ASSINGAPPL_FEE_DSOPAYMENT_PAYSUBMIT",
            "message": "Dear Applicant, Amount of Please pay the application fee Rs.<AMOUNT_TO_BE_PAID>/- isfor receivedcleaning towards the payment of cleaning septic tank /pit with referencerequest number no<2>.Click <RECEIPT_NO>.You will be notified when an operatorthis link <PAY_LINK> to make the payment.Request is assignedexpected to abe request.completed Please click this link <RECEIPT_LINK> to downloadwithin <SLA_HOURS>hrs of making the receiptpayment.",
            "module": "rainmaker-common",
            "locale": "en_IN"
        },
        {
            "code": "FSM_SMS_DSOPENDING_APPL_INPROGRESSFEE_DSOPAYMENT_ACCEPTAPPLY",
            "message": "Dear Applicant, Vehicle <VEHICLE_REG_NO> will be reaching your location to clean the Your application for cleaning septic tank /pit on <POSSIBLE_SERVICE_DATE>is created with reference to your application number <2>. You can contactPlease click this link <PAY_LINK> to pay the operatorapplication infee +91 <DSO_MOBILE_NUMBER>.",
            "module"for processing the application.Request is expected to be completed within <SLA_HOURS>hrs of making the payment.",
            "module": "rainmaker-common",
            "locale": "en_IN"
        },
        {
            "code": "FSM_SMS_CITIZENASSING_FEEDBACKDSO_PENDING_COMPLETEDPAY",
            "message": "Dear Applicant, Your request for Amount of Rs.<AMOUNT_TO_BE_PAID>/- is received towards the payment of cleaning septic tank /pit is completed.Please take some time to rate us using the link <FSM_APPL_LINK>.with reference no. <RECEIPT_NO>.You will be notified when an operator is assigned to a request. Please click this link <RECEIPT_LINK> to download the receipt",
            "module": "rainmaker-common",
            "locale": "en_IN"
        },
        {
            "code": "FSM_SMS_DSO_INPROGRESS_REJECTEDDSO_REJECTACCEPT",
            "message": "Dear Applicant, Your request for cleaning Vehicle <VEHICLE_REG_NO> will be reaching your location to clean the septic tank/pit is rejectedon <POSSIBLE_SERVICE_DATE> with reference theto your reason <FSM_DSO_REJECT_REASON> . Please use this link <NEW_FSM_LINK> to create a new request if neededapplication number <2>. You can contact the operator in +91 <DSO_MOBILE_NUMBER>.",
            "module": "rainmaker-common",
            "locale": "en_IN"
        },
        {
            "code": "FSM_SMS_CITIZEN_FEEDBACK_CANCELEDPENDING_CANCELCOMPLETED",
            "message": "Dear Applicant, Your request for cleaning the septic tank/pit is cancelledcompleted.Please withtake thesome reason <FSM_CANCEL_REASON> . Please use thistime to rate us using the link <NEW<FSM_FSMAPPL_LINK> to create a new request if needed.",
            "module": "rainmaker-common",
            "locale": "en_IN"
        },
    ]
}

Actions & Role Action Mapping

Add Role-Action mapping for the API’s in MDMS. Following are the required entries. They should be mapped to both CITIZEN and appropriate employee roles.

...

Code Block
{
     {
    "id": {{PLACEHOLDER1}},       "namecode": "Create FSM Application",FSM_SMS_DSO_REJECTED_DSO_REJECT",
            "urlmessage": "/fsm/v1/_create"Dear Applicant, Your request for cleaning the septic  "displayName": "Apply FSM",
      "orderNumber": 0,
      "enabled": false,tank/pit is rejected with the reason <FSM_DSO_REJECT_REASON> . Please use this link <NEW_FSM_LINK> to create a new request if needed.",
            "serviceCodemodule": "FSMrainmaker-common",
      "code": "null",       "pathlocale": "en_IN"
        },
    {    {
  "id":   {{PLACEHOLDER2}},       "namecode": "Search FSM ApplicationFSM_SMS_CANCELED_CANCEL",

     "url": "/fsm/v1/_search",       "displayNamemessage": "Search  FSM Appliacations"Dear Applicant, Your request for cleaning the  "orderNumber": 1,
      "enabled": false,
      "serviceCode": "FSM"septic tank/pit is cancelled with the reason <FSM_CANCEL_REASON> . Please use this link <NEW_FSM_LINK> to create a new request if needed.",
      "code      "module": "nullrainmaker-common",
      "path      "locale": "en_IN"
        },
    ]
}

Actions & Role Action Mapping


Add Role-Action mapping for the API’s in MDMS. Following are the required entries. They should be mapped to both CITIZEN and appropriate employee roles.


Action Configuration

Code Block
{
      "id": {{PLACEHOLDER3PLACEHOLDER1}},
      "name": "UpdateCreate FSM Application",
      "url": "/fsm/v1/_updatecreate",
      "displayName": "UpdateApply FSM",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "FSM",
      "code": "null",
      "path": ""
    },
    {
      "id":  {{PLACEHOLDER4PLACEHOLDER2}},
      "name": "Search FSM Application Charge Payment Search",
      "url": "/collection-services/payments/FSM.TRIP_CHARGESfsm/v1/_search",
      "displayName": "FSMSearch Application Charge Payment Search"FSM Appliacations",
      "orderNumber": 1,
      "parentModule": "",
      "enabled": false,
      "serviceCode": "FSM",
      "code": "null",
      "path": ""
    },
     {
      "id": {{PLACEHOLDER5PLACEHOLDER3}},
      "name": "Update FSM Application Audit Search",
      "url": "/fsm/v1/_auditupdate",
      "displayName": "FSM Application Audit serachUpdate FSM",
      "orderNumber": 10,

     "parentModule": "",
      "enabled": false,
      "serviceCode": "FSM",
      "code": "null",
      "path": ""
    },
 

...

Code Block
[
 {{
      "rolecodeid": "CITIZEN"{{PLACEHOLDER4}},
      "actionidname": "{{PLACEHOLDER1}}FSM Application Charge Payment Search",
      "actioncodeurl": "/collection-services/payments/FSM.TRIP_CHARGES/_search",
      "tenantIddisplayName": "pb"FSM Application Charge Payment }Search",
  {     "rolecodeorderNumber": "FSM_CREATOR_EMP",1,
      "actionidparentModule": "{{PLACEHOLDER1}}",
      "actioncodeenabled": ""false,
      "tenantIdserviceCode": "pb",
  },
  {     "rolecodecode": "CITIZENnull",
      "actionidpath": "{{PLACEHOLDER2}}",""
    },
     {
      "actioncodeid": "",{{PLACEHOLDER5}},
      "tenantIdname": "pb"FSM Application Audit }Search",

 {     "rolecodeurl": "FSM_CREATOR_EMP/fsm/v1/_audit",
      "actioniddisplayName": "{{PLACEHOLDER2}}FSM Application Audit serach",
      "actioncodeorderNumber": ""1,
      "tenantIdparentModule": "pb"
  },
  {     "rolecodeenabled": "FSM_EDITOR_EMP"false,
      "actionidserviceCode": "{{PLACEHOLDER2}}",
      "actioncodecode": "null",
      "tenantIdpath": "pb"
    }, 
 {    {
"rolecode": "FSM_VIEW_EMP",     "actionidid": "{{PLACEHOLDER2PLACEHOLDER6}}",
      "actioncodename": "",Search FSM    "tenantId": "pb"
  },
Application",
 {     "rolecodeurl": "FSM_ADMIN/fsm/v1/_plainsearch",
      "actioniddisplayName": "{{PLACEHOLDER2}}Search  FSM Appliacations",
      "actioncodeorderNumber": ""1,
      "tenantIdenabled": "pb"
  }false,
  {     "rolecodeserviceCode": "FSM_DSO",
      "actionidcode": "{{PLACEHOLDER2}}null",
      "actioncodepath": "",
    "tenantId": "pb"},
   }, {
 {     "rolecodeid": "FSM_DRIVER",{{PLACEHOLDER7}},
      "actionidname": "{{PLACEHOLDER2}}Create FSTP FSTPOperator Mapping",
      "actioncodeurl": "/fsm/plantmap/v1/_create",
      "tenantIddisplayName": "pb"Create FSTP FSTPOperator }Map",
  {     "rolecodeorderNumber": "FSM_EMP_FSTPO"0,
      "actionidenabled": "{{PLACEHOLDER2}}"false,
      "actioncodeserviceCode": "FSM",
      "tenantIdcode": "pbnull"
  },

 {     "rolecodepath": "FSM_COLLECTOR","
    },
    {
      "actionidid": "{{PLACEHOLDER2PLACEHOLDER8}}",
    "actioncode": "",     "tenantIdname": "pb"Update FSTP FSTPOperator }Mapping",
   {     "rolecodeurl": "FSM_EDITOR_EMP/fsm/plantmap/v1/_update",
      "actioniddisplayName": "{{PLACEHOLDER3}}Update FSTP FSTPOperator Map",
      "actioncodeorderNumber": ""0,
      "tenantIdenabled": "pb"
  }false,
  {     "rolecodeserviceCode": "FSM_ADMIN",
      "actionidcode": "{{PLACEHOLDER3}}null",
      "actioncodepath": "",
    "tenantId": "pb"},
   }, {
 {     "rolecodeid": "FSM_DSO"{{PLACEHOLDER9}},
      "actionidname": "{{PLACEHOLDER3}}Search FSTP FSTPOperator Mapping",
      "actioncodeurl": "/fsm/plantmap/v1/_search",
      "tenantIddisplayName": "pb"Search FSTP FSTPOperator }Map",
  {     "rolecodeorderNumber": 0,
  "FSM_DRIVER"    "enabled": false,
      "actionidserviceCode": "{{PLACEHOLDER3}}FSM",
      "actioncodecode": "null",
      "tenantIdpath": "pb"
    },
  {  {
  "rolecode": "CITIZEN",     "actionidid": "{{PLACEHOLDER3PlaceHolder10}}",
   
"actioncode": "",     "tenantIdname": "pb"Inbox Search ofr }uI",
   {     "rolecodeurl": "FSM_ADMIN/inbox/v1/_search",
      "actioniddisplayName": "{{PLACEHOLDER4}}Inbox Search",
      "actioncodeorderNumber": ""0,
    "tenantId  "enabled": false,
      "serviceCode": "pbinbox",
  },
      "code": "null",
      "path": ""
    }


Role Action Mapping

Code Block
[
 {
    "rolecode": "FSM_DSOCITIZEN",
    "actionid": "{{PLACEHOLDER4PLACEHOLDER1}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_CREATOR_DRIVEREMP",
    "actionid": "{{PLACEHOLDER4PLACEHOLDER1}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_COLLECTORCITIZEN",
    "actionid": "{{PLACEHOLDER4PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "CITIZENFSM_CREATOR_EMP",
    "actionid": "{{PLACEHOLDER4PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_EDITOR_EMP",
    "actionid": "{{PLACEHOLDER4PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_VIEW_EMP",
    "actionid": "{{PLACEHOLDER4PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "CITIZENFSM_ADMIN",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_CREATOR_EMPDSO",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_EDITOR_EMPDRIVER",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_VIEWEMP_EMPFSTPO",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_ADMINCOLLECTOR",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER2}}",
    "actioncode": "",
    "tenantId": "pb"
  },
   {
    "rolecode": "FSM_DSOEDITOR_EMP",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER3}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_DRIVERADMIN",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER3}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_EMP_FSTPODSO",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER3}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_COLLECTORDRIVER",
    "actionid": "{{PLACEHOLDER5PLACEHOLDER3}}",
    "actioncode": "",
    "tenantId": "pb"
  }
]

Infra Ops Configuration

...

,
  {
    "rolecode": "CITIZEN",
    "actionid": "{{PLACEHOLDER3}}",
    "actioncode": "",
    "tenantId": "pb"
  },
   {
    "rolecode": "FSM_ADMIN",
    "actionid": "{{PLACEHOLDER4}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_DSO",
    "actionid": "{{PLACEHOLDER4}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_DRIVER",
    "actionid": "{{PLACEHOLDER4}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_COLLECTOR",
    "actionid": "{{PLACEHOLDER4}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "CITIZEN",
    "actionid": "{{PLACEHOLDER4}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_EDITOR_EMP",
    "actionid": "{{PLACEHOLDER4}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_VIEW_EMP",
    "actionid": "{{PLACEHOLDER4}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "CITIZEN",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_CREATOR_EMP",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_EDITOR_EMP",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_VIEW_EMP",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_ADMIN",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_DSO",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_DRIVER",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_EMP_FSTPO",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "FSM_COLLECTOR",
    "actionid": "{{PLACEHOLDER5}}",
    "actioncode": "",
    "tenantId": "pb"
  },
  {
      "rolecode": "FSM_EDITOR_EMP",
      "actionid": {{PLACEHOLDER6}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_VIEW_EMP",
      "actionid": {{PLACEHOLDER6}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_ADMIN",
      "actionid": {{PLACEHOLDER6}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_DSO",
      "actionid": {{PLACEHOLDER6}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_DRIVER",
      "actionid": {{PLACEHOLDER6}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_EMP_FSTPO",
      "actionid": {{PLACEHOLDER6}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_COLLECTOR",
      "actionid": {{PLACEHOLDER6}},
      "actioncode": "",
      "tenantId": "pb"
    },
  {
      "rolecode": "FSM_ADMIN",
      "actionid": {{PLACEHOLDER7}},
      "actioncode": "",
      "tenantId": "pb"
    },
     {
      "rolecode": "FSM_ADMIN",
      "actionid": {{PLACEHOLDER8}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_EMP_FSTPO",
      "actionid": {{PLACEHOLDER8}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "PT_CEMP",
      "actionid": {{PLACEHOLDER9}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "CITIZEN",
      "actionid": {{PLACEHOLDER9}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "SUPERUSER",
      "actionid": {{PLACEHOLDER9}},
      "actioncode": "",
      "tenantId": "pb"
    }, 
        {
      "rolecode": "FSM_EMP_FSTPO",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_COLLECTOR",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_EDITOR_EMP",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_VIEW_EMP",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
     {
      "rolecode": "FSM_CREATOR_EMP",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_ADMIN",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "FSM_DSO",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "PT_CEMP",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "PT_DOC_VERIFIER",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "PT_FIELD_INSPECTOR",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "PT_APPROVER",
      "actionid": {{PlaceHolder10}},
      "actioncode": "",
      "tenantId": "pb"
    },
    {
    "rolecode": "TL_CEMP",
    "actionid": {{PlaceHolder10}},
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "TL_DOC_VERIFIER",
    "actionid": {{PlaceHolder10}},
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "TL_FIELD_INSPECTOR",
    "actionid": {{PlaceHolder10}},
    "actioncode": "",
    "tenantId": "pb"
  },
  {
    "rolecode": "TL_APPROVER",
    "actionid": {{PlaceHolder10}},
    "actioncode": "",
    "tenantId": "pb"
  },
]

Infra Ops Configuration


Configurations that we can manage through values.yml fsm-calculator in infraops repo as follows
values.yml for fms-calculator can be found here

Description

name in values.yml

Current Value

id-gen host, to generate the application number

EGOV_IDGEN_HOST

egov-idgen from egov-service-host

Kafka Consumer Group

SPRING_KAFKA_CONSUMER_GROUP_ID

egov-fsm-service

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

PERSISTER_SAVE_FSM_TOPIC

save-fsm-application

kafka topic to which service push data to save workflow status

PERSISTER_UPDATE_FSM_WORKFLOW_TOPIC

update-fsm-workflow-application

kafka topic to which service push data to update the existing fsm application

PERSISTER_UPDATE_FSM_TOPIC

update-fsm-application

mdms service host

EGOV_MDMS_HOST

egov-mdms-service from egov-service-host

billing-service host

EGOV_BILLINGSERVICE_HOST

billing-service from egov-service-host

fsm-calculator service host

EGOV_FSM_CALCULATOR_HOST

fsm-calculator from egov-service-host

workflow v2 service host

WORKFLOW_CONTEXT_PATH

egov-workflow-v2 from egov-service-host

ui host, to return send the url of new application in sms notification

EGOV_UI_APP_HOST

egov-services-fqdn-name from egov-service-host

vendor service host, to get DSO details

EGOV_VENDOR_HOST

vendor from egov-service-host

Vehicle service host, to get vehicle details and manage vehicleTrip

EGOV_VEHICLE_HOST

vehicle from egov-service-host

Collection service host, to get the payment details

EGOV_COLLECTION_SERVICE_HOST

collection-services from egov-service-host

localization service host, to get the locale data

EGOV_LOCALIZATION_HOST

egov-localization from egov-service-host

user service host, to get the locale data

EGOV_USER_HOST

egov-user from egov-service-host

pdf service host, to get the locale data

EGOV_PDF_HOST

pdf-service from egov-service-host

url shortening service host, to get the short url for the long once

EGOV_URL_SHORTNER_HOST

egov-url-shortening from egov-service-host

Sample values.yml
Code Block
 - name: EGOV_IDGEN_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: egov-idgen
  - name: EGOV_MDMS_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: egov-mdms-service
  - name: EGOV_URL_SHORTNER_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: egov-url-shortening
  - name: EGOV_PDF_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: pdf-service
  - name: EGOV_USER_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: egov-user
  - name: EGOV_LOCATION_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: egov-location
  - name: EGOV_LOCALIZATION_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: egov-localization
  - name: EGOV_BILLINGSERVICE_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: billing-service
  - name: EGOV_COLLECTION_SERVICE_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: collection-services
  - name: EGOV_FSM_CALCULATOR_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: fsm-calculator
  - name: EGOV_VEHICLE_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: vehicle
  - name: EGOV_VENDOR_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: vendor
  - name: EGOV_UI_APP_HOST
    valueFrom:
      configMapKeyRef:
        name: egov-config
        key: egov-services-fqdn-name
  - name: WORKFLOW_CONTEXT_PATH
    valueFrom:
      configMapKeyRef:
        name: egov-service-host
        key: egov-workflow-v2
  - name: WORKFLOW_TRANSITION_PATH
    value: "egov-workflow-v2/egov-wf/process/_transition"
  - name: EGOV_IDGEN_FSM_APPLICATIONNUM_FORMAT
      configMapKeyRef:
        name: egov-configvalue: "[CITY.CODE]-FSM-[cy:yyyy-MM-dd]-[SEQ_EGOV_FSM]"
  - name: SPRING_KAFKA_CONSUMER_GROUP_ID
        keyvalue: egov-servicesfsm-fqdn-nameservice
  - name: WORKFLOWPERSISTER_SAVE_CONTEXTFSM_PATHTOPIC
    valueFromvalue: save-fsm-application
  -   configMapKeyRefname: PERSISTER_UPDATE_FSM_TOPIC
       namevalue: egovupdate-servicefsm-hostapplication
  - name: PERSISTER_UPDATE_FSM_WORKFLOW_TOPIC
    keyvalue: egov-workflow-v2
  - name: WORKFLOW_TRANSITION_PATH
    value: "egov-workflow-v2/egov-wf/process/_transition"
  - name: EGOV_IDGEN_FSM_APPLICATIONNUM_FORMAT
    value: "[CITY.CODE]-FSM-[cy:yyyy-MM-dd]-[SEQ_EGOV_FSM]"
  - name: SPRING_KAFKA_CONSUMER_GROUP_ID
    value: egov-fsm-service
  - name: PERSISTER_SAVE_FSM_TOPIC
    value: save-fsm-application
  - name: PERSISTER_UPDATE_FSM_TOPIC
    value: update-fsm-application
  - name: PERSISTER_UPDATE_FSM_WORKFLOW_TOPIC
    value: update-fsm-workflow-application

Users

...

User

...

Role

...

Description

...

How to create

...

FSM Creator

...

FSM_CREATOR_EMP

...

Can create FSM Application on behalf of Citizen

...

Through HRMS with role

...

FSM Editor

...

FSM_EDITOR_EMP

...

  • Can edit the application created by citizen for demand generation

  • Assing/ Re-Assign DSO

  • Complete the Application

...

Through HRMS with role

...

FSM Admin

...

FSM_ADMIN

...

  • Can cancel the application at any stage of workflow

...

Through HRMS with role

...

DSO

...

FSM_DSO

...

  • can accept/Reject the assigned Application

  • can complete the FSM Application

...

Through vendor service, use the create DSO Request from postman Collection

...

FSTP Operator

...

FSM_EMP_FSTPO

...

  • Can mark the vehicle Trip as disposed. Not FSM Service User

...

Through HRMS with role

...

Collector

...

FSM_COLLECTOR

...

  • Can collect the payment amount for application based on demand

...

Through HRMS with role

- User with userType employee and role FSM_CREATOR_EMP role,

Integration

Integration Scope

FSM can be integrated with any ULB or system which wants to track FSM application. The organisations can customise the workflow depending on there product requirements 

Integration Benefits

  • Easy tracking and resolution FSM Application

  • Configurable workflow according to client requirement

Steps to Integration

...

Citizen/ULB Employee can file Application request using the /fsm/v1/_create

...

Organisation or System can search the FSM Applications using /fsm/v1/_searchendpoint

...

update-fsm-workflow-application

Users

User

Role

Description

How to create

FSM Creator

FSM_CREATOR_EMP

Can create FSM Application on behalf of Citizen

Through HRMS with role

FSM Editor

FSM_EDITOR_EMP

  • Can edit the application created by citizen for demand generation

  • Assing/ Re-Assign DSO

  • Complete the Application

Through HRMS with role

FSM Admin

FSM_ADMIN

  • Can cancel the application at any stage of workflow

Through HRMS with role

DSO

FSM_DSO

  • can accept/Reject the assigned Application

  • can complete the FSM Application

Through vendor service, use the create DSO Request from postman Collection

FSTP Operator

FSM_EMP_FSTPO

  • Can mark the vehicle Trip as disposed. Not FSM Service User

Through HRMS with role

Collector

FSM_COLLECTOR

  • Can collect the payment amount for application based on demand

Through HRMS with role

- User with userType employee and role FSM_CREATOR_EMP role,

Integration

Integration Scope

FSM can be integrated with any ULB or system which wants to track FSM application. The organisations can customise the workflow depending on there product requirements 

Integration Benefits

  • Easy tracking and resolution FSM Application

  • Configurable workflow according to client requirement

Steps to Integration

  1. Citizen/ULB Employee can file Application request using the /fsm/v1/_create

  2. Organisation or System can search the FSM Applications using /fsm/v1/_searchendpoint

  3. Once the Application is files the organisation or system can call /fsm/v1/_update endpoint to move the application further in workflow until it get resolved

Inbox api

  • Introduced new inbox service to get the fsm applications in registered ULB employee inbox, With this ULB employee can track the application or perform the actions based on employee role.

  • ULB employee can also apply the filter to check the particular state or applications or any other filter as required.

FSM apply as service

As of now we are providing fsm as adhoc service. In order to avoid multiple times user has to create the fsm request every time, In the system itself after some particular days, we will create same fsm application and if user wants service, he will pay the amount .

MDMS changes

As we mentioned above, we need to define time paramter, in order to create periodic application.For that we added the periodic service master where we will configure the time limit and either schedular is enabled or not. Please find the below configuration and location.

https://github.com/egovernments/egov-mdms-data/blob/DEV/data/pb/amritsar/FSM/PeriodicService.json

{ "tenantId": "pb.amritsar",

"moduleName": "FSM",

"PeriodicService":[

{

"timeLimit" : 864000000,

"isSchedularConfiguration":true

}

]

}

cronjob will read the cron job’s configured in the cronjobapiconfig.json and based on the schedular time it will call the api which is configured.Please find the below configuration and file location.

https://github.com/egovernments/egov-mdms-data/blob/DEV/data/pb/common-masters/CronJobAPIConfig.json

{ "jobName": "daily",

"active": "true",

"method": "POST",

"url": "http://fsm.egov:8080/fsm/v1/_schedular",

"payload": {

"RequestInfo": "{DEFAULT_REQUESTINFO}" },

"header": { "Content-Type": "application/json"

}

}

We are using fsm/v1/_schedular api. This api will read the master data for each tenant and based on the time limit configured for that tenant, it will get the all eligiable aplications and create periodic applications for those fsm applications.

Infra changes

We added new chart called mdms-read-cronjob.Please find the below chart location.

https://github.com/egovernments/DIGIT-DevOps/tree/master/deploy-as-code/helm/charts/utilities/mdms-read-cronjob

Interaction Diagram

TBD

Reference Docs

Title 

Link

 Workflow Technical Document

 Workflow Service

 User Technical Document

User Service  

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

HRMS Technical Document

NEEDS TO BE UPDATED

API Contract

FSM API Contract

Postman Collection

FSM Postman Collection

API List