The attendance service provides generic attendance logging functionality based on "in" and "out" timestamps. IN and OUT timestamps are recorded per individual. Aggregating and calculating attendance based on these timestamps is the function of the muster roll service.
A running DIGIT platform is needed to deploy the attendance service. Specifically, the following dependencies are needed:
Individual
MDMS
Idgen
Persister
Indexer
Provides APIs to:
Create an attendance register
Map staff to the register
Map attendees to the register
Log attendance
Edit attendance registers, staff, attendees and attendance.
/attendance/v1/
Below are the variables that should be configured for the contract service in the Helm environment file prior to deployment. The Helm environment file will be located under:
https://github.com/
{{ORG}}
/DIGIT-DevOps/deploy-as-code/helm/environments/
{{EnvironmentFile}}
.yaml
Please refer to a sample here.
Add these ‘db-host’,’db-name’,’db-url’,’domain’ and all the digit core platform services configurations (Idgen, workflow,user etc.) in respective environments yaml file.
Add attendance-service related environment variables’ value like the way it's done in the ‘dev’ environment yaml file.
Add the ‘egov-mdms-service’ related configuration to the respective environment yaml file. Make sure you change the gitsync.branch name.
Check the attendance-service persister file is added in the egov-persister.perister-yml-path variable. If not, please add the way it's done here.
Make sure to add the DB(Postgres and flyway) username & password in the respective environment secret yaml file the way it's done here.
Make sure to add the digit core services related secrets are configured in the respective environment secret file the way it's done here.
Restart egov-mdms-service, egov-persister, egov-indexer, inbox, egov-workflow-v2, egov-accesscontrol and zuul services after the above changes are performed.
Add all the APIs exposed by the attendance service (refer to table below for actual APIs) to the actions.json file in MDMS
Module name: ACCESSCONTROL-ACTIONS-TEST
Master name: actions-test
Configure roles based on the roles column below in roles.json file.
Module name: ACCESSCONTROL-ROLES
Master name: roles
Role-action mapping is configured in MDMS per the table below .
Module name: ACCESSCONTROL-ROLEACTIONS
Master name: roleactions.json
Make sure the id format is configured in the IdFormat.json file of the common-masters
module in MDMS.
Please make sure that the file attendance-service-persister.yml is present in the MDMS repository of the organisation:
https://github.com/{{ORG}}/works-configs/tree/<BRANCH>/egov-persister
Sample postman collections are here to demonstrate integration with the attendance service.
Roles | APIs /Actions |
---|---|
IDGen format for attendance register number |
---|
ORG_ADMIN
JUNIOR_ENGINEER
MUNICIPAL_ENGINEER
/attendance/v1/_create
ORG_ADMIN
JUNIOR_ENGINEER
MUNICIPAL_ENGINEER
/attendance/v1/_update
ORG_ADMIN
JUNIOR_ENGINEER
MUNICIPAL_ENGINEER
/attendance/v1/_search
ORG_ADMIN
ORG_STAFF
/attendance/staff/v1/_create
ORG_ADMIN
ORG_STAFF
/attendance/staff/v1/_delete
ORG_ADMIN
ORG_STAFF
/attendance/attendee/v1/_create
ORG_ADMIN
ORG_STAFF
/attendance/attendee/v1/_delete
ORG_ADMIN
ORG_STAFF
/attendance/log/v1/_create
ORG_ADMIN
ORG_STAFF
/attendance/log/v1/_search
ORG_ADMIN
ORG_STAFF
/attendance/log/v1/_update
{
"format": "WR/[fy:yyyy-yy]/[cy:MM]/[cy:dd]/[SEQ_ATTENDANCE_REGISTER_NUM]",
"idname": "attendance.register.number"
}