Muster Roll
Overview
The attendance service supplies raw attendance logs, while the muster roll service collects these logs and calculates attendance according to specific business rules. For instance, determining whether attendance is measured in hours or days and defining what constitutes a half-day or a full day of attendance are decisions that depend on the specific implementation. These configurations can be adjusted within the service, and attendance calculations will be carried out based on these settings.
Pre-requisites
Attendance
Individual
Persister
MDMS
Workflow
Idgen
Notification
Functionalities
The functionality includes the following APIs:
Estimate Muster Roll: This API calculates the attendance for a wage seeker based on their attendance logs.
Create Muster Roll: It allows you to create a muster roll, which is essentially a list of wage seekers.
Update Muster Roll: You can use this API to update a muster roll with modified aggregate attendance data.
Search for Muster Roll: This API enables you to search for a muster roll using specific parameters. For more details, you can refer to the Swagger contract.
Setup
Locate the Environment YAML File
Go to the Helm environment file for your deployment environment:
https://github.com/{{ORG}}/DIGIT-DevOps/deploy-as-code/helm/environments/{{EnvironmentFile}}.yaml
Add Required Variables
In the environment file, add the following:
Database details:
db-host
,db-name
,db-url
domain
Core service configs:
idgen
,workflow
,user
, etc.Muster Roll-specific variables (refer to how it’s done in the dev file):
Verify Helm Chart Reference
Ensure you're using the correct chart for muster roll: health-muster-roll chart
Configure Persister Path
Check that the muster-roll persister YAML file is added in egov-persister.persister-yml-path
. Add it if missing.
Add Secrets to Secret YAML File
In the corresponding secrets file:
Add DB credentials for Postgres and Flyway
Add secrets for DIGIT core services (like user, filestore, mdms, etc.)
Sample steps given here
Configuration Details
Configure Actions
Add all the APIs exposed (refer to the table below for actual APIs) to the actions.json file in MDMS
Module name: ACCESSCONTROL-ACTIONS-TEST
Master name: actions-test
Configure Roles
Configure roles based on the roles column below in roles.json file.
Module name: ACCESSCONTROL-ROLES
Master name: roles
Configure Role-Action
Role-action mapping is configured in MDMS per the table below.
Module name: ACCESSCONTROL-ROLEACTIONS
Master name: roleactions.json
CAMPAIGN_SUPERVISOR
PROXIMITY_SUPERVISOR
/muster-roll/v1/_estimate
CAMPAIGN_SUPERVISOR PROXIMITY_SUPERVISOR
/muster-roll/v1/_create
CAMPAIGN_SUPERVISOR PROXIMITY_SUPERVISOR
/muster-roll/v1/_update
CAMPAIGN_SUPERVISOR PROXIMITY_SUPERVISOR
/muster-roll/v1/_search
Other masters to be added
Other muster roll masters are configured in the common-masters
folder:
Persister Configuration
Integration Details
Links to the Environment file and Postman collection
Import Collection Load the Muster Roll Postman collection into your Postman app.
Import Environment Import the environment file. This sets up a "Muster Environment" with required variables.
Run Attendance Setup APIs First Before running the Muster Roll APIs, run the following Attendance APIs:
Create Attendance Register
POST https://{{hostname}}/{{attendance_context}}/v1/_create
Enrol Attendees
POST https://{{hostname}}/{{attendance_context}}/attendee/v1/_create
Create Attendance Logs
POST https://{{hostname}}/{{attendance_context}}/log/v1/_create
Update Register ID Copy the
registerId
from the response of the first API (step 3a), and set it as the current value ofregisterId
in the Muster Environment.Run the Muster Roll Collection Use the "Run Collection" option in Postman. This will trigger:
/muster-roll/v1/_estimate
/muster-roll/v1/_create
/muster-roll/v1/_update
/muster-roll/v1/_search
— covering both success and error scenarios.
Track Output Variables After
/create
, the environment variablesmusterRollId
andmusterRollNumber
will be set automatically. These are used in the update and search requests.
Last updated
Was this helpful?