Appointment Pattern
How to model officer-set appointments using SET_APPOINTMENT and PENDING_APPOINTMENT.
Flow
Key rules
SET_APPOINTMENTis alwaysROLE_OFFICER,systemAuthorised: false- No
breakingAction— only anonBreakingActionsnotification - Notification template variables:
${APPLICANT_NAMES},${appointmentDate},${comment},${serviceName},${applicationNumber} PENDING_APPOINTMENTstateNamemirrorsstateCodeexactly
SET_APPOINTMENT transition
{
"startState": "PENDING_OFFICER_PROCESSING_LEVEL_1",
"event": "SET_APPOINTMENT",
"endStateOne": {
"stateName": "PENDING_APPOINTMENT",
"stateNames": null,
"stateCode": "PENDING_APPOINTMENT",
"breakingAction": null,
"breakingActions": null,
"nonBreakingActions": [
{
"actionType": "NOTIFICATION",
"args": {
"notificationType": "STATIC",
"staticTemplate": {
"en": {
"title": null,
"subject": "Appointment Requested",
"emailBody": "...",
"smsBody": "Dear ${APPLICANT_NAMES}, your appointment for ${serviceName} (${applicationNumber}) is scheduled on ${appointmentDate}. Officer remarks: ${comment}",
"emailMessage": null
},
"fr": {
"title": null,
"subject": "Rendez-vous demandé",
"emailBody": "...",
"smsBody": "...",
"emailMessage": null
},
"rw": {
"title": null,
"subject": "Gahunda yashyizweho",
"emailBody": "...",
"smsBody": "...",
"emailMessage": null
}
},
"certificateWithList": false,
"updateFieldWithDatasetValue": false,
"excludeCurrentApplication": true
}
}
],
"nextEvent": null,
"position": null
},
"endStateTwo": null,
"endStateCondition": null,
"authorisation": {
"authorisedRoles": ["ROLE_OFFICER"],
"authorisedUsers": null,
"systemAuthorised": false
},
"position": null,
"eventNames": null,
"eventConfigs": null
}