Muster Roll

Muster roll is a record of attendance and quantity of work done by wage seekers.

Overview

A muster roll serves as a record of attendance, indicating the hours worked, wages owed, and the amount of work completed by labourers during a specified time frame.

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

Functionality

The functionality includes the following APIs:

  1. Estimate Wages: This API calculates the wages for a wage seeker based on their attendance logs.

  2. Create Muster Roll: It allows you to create a muster roll, which is essentially a list of wage seekers.

  3. Update Muster Roll: You can use this API to update a muster roll with modified aggregate attendance data.

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

Deployment

Here is a list of variables that need to be configured in the Helm environment file before deploying the muster roll service. This file can typically be found under a specific directory or location as given below:

https://github.com/{{ORG}}/DIGIT-DevOps/deploy-as-code/helm/environments/{{EnvironmentFile}}.yaml

Refer to the sample here.

Configuration

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

Roles
API Endpoints

ORG_ADMIN

ORG_STAFF

/muster-roll/v1/_estimate

ORG_ADMIN

ORG_STAFF

/muster-roll/v1/_create

ORG_ADMIN

ORG_STAFF

MUSTER_ROLL_VERIFIER

MUSTER_ROLL_APPROVER

/muster-roll/v1/_update

ORG_ADMIN

ORG_STAFF

MUSTER_ROLL_VERIFIER

MUSTER_ROLL_APPROVER

BILL_CREATOR

BILL_VIEWER

/muster-roll/v1/_search

Other masters to be added

Other muster roll masters are configured in the common-masters folder:

MusterRoll.json

WageSeekers.json

Integration

Environment file

Postman collection

Steps to run the postman collection:

1. Import the postman collection for muster roll service into the Postman application.

2. Import the environment variables required for running the Postman collection. This will create an environment ‘Muster Environment’.

3. MusterRoll requires the below services from the Attendance Service API to be run. So run the below services before running the muster roll postman collection.

a) Create Attendance register - https://{hostname}/attendance/v1/_create

b) Enroll attendees to the register - https://{{hostname}}/attendance/attendee/v1/_create

c) Attendance log create - https://{{hostname}}/attendance/log/v1/_create

4. Update the current value of the variable ‘registerId’ in ‘Muster Environment’ with the id returned by the response in the create attendance register ( in step 3 a)

5. Run the ‘Muster Roll Service’ postman collection as ‘Run Collection’. It will run the /_estimate, /_create, /_update and /_search API’s success and validation error scenarios.

6. Muster will be created for the attendees enrolled in the attendance register (in step 3 b) using the attendance logs created (in step 3 c).

The current value of environment variables ‘musterRollId’ and ‘musterRollNumber’ will be set from the response of the /_create muster roll which will be used by /_update and /_search APIs.

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.