RFA Pattern
Request for Action loop — sending applications back to the applicant and routing the resubmission to the correct state.
Used when a reviewer (officer or partner) needs to send the application back to the applicant for corrections. Can happen at any processing level.
Flow
Where SUBMIT_RFA returns — critical difference
| Who sent the RFA | SUBMIT_RFA returns to |
|---|---|
Internal officer (ROLE_OFFICER) | Same PENDING_OFFICER_PROCESSING_LEVEL_N the RFA came from |
| External partner | First state in the integration chain (re-runs all pushes with fresh data) |
When a partner RFA is resubmitted, the integration chain uses IS_RESUBMITTED conditional branching (see Conditional Branching).
Key rules
PENDING_RESUBMISSION_LEVEL_NstateNamemirrorsstateCodeexactlyREQUEST_FOR_ACTIONauthorisedRoles:["ROLE_OFFICER"]for internal; ask user for partner roleSUBMIT_RFAis always["ROLE_CITIZEN", "ROLE_AGENT"],systemAuthorised: false- No
breakingActionon either transition — onlynonBreakingActions: [NOTIFICATION]
REQUEST_FOR_ACTION transition (adjust level/role as needed)
{
"startState": "PENDING_OFFICER_PROCESSING_LEVEL_2",
"event": "REQUEST_FOR_ACTION",
"endStateOne": {
"stateName": "PENDING_RESUBMISSION_LEVEL_2",
"stateNames": null,
"stateCode": "PENDING_RESUBMISSION_LEVEL_2",
"breakingAction": null,
"breakingActions": null,
"nonBreakingActions": [
{
"actionType": "NOTIFICATION",
"args": {
"notificationType": "STATIC",
"staticTemplate": {
"en": {
"title": null,
"subject": "Application requested for further action",
"emailBody": "...",
"smsBody": "...",
"emailMessage": null
},
"fr": {
"title": null,
"subject": "...",
"emailBody": "...",
"smsBody": "...",
"emailMessage": null
},
"rw": {
"title": null,
"subject": "...",
"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
}SUBMIT_RFA transition (example returning to LEVEL_2)
{
"startState": "PENDING_RESUBMISSION_LEVEL_2",
"event": "SUBMIT_RFA",
"endStateOne": {
"stateName": "PENDING_OFFICER_PROCESSING_LEVEL_2",
"stateNames": null,
"stateCode": "PENDING_OFFICER_PROCESSING_LEVEL_2",
"breakingAction": null,
"breakingActions": null,
"nonBreakingActions": [
{
"actionType": "NOTIFICATION",
"args": {
"notificationType": "STATIC",
"staticTemplate": {
"en": {
"title": "Application Resubmitted",
"subject": "Application Resubmitted",
"emailBody": "...",
"smsBody": "...",
"emailMessage": null
},
"fr": {
"title": "...",
"subject": "...",
"emailBody": "...",
"smsBody": "...",
"emailMessage": null
},
"rw": {
"title": "...",
"subject": "...",
"emailBody": "...",
"smsBody": "...",
"emailMessage": null
}
},
"certificateWithList": false,
"updateFieldWithDatasetValue": false,
"excludeCurrentApplication": true
}
}
],
"nextEvent": null,
"position": null
},
"endStateTwo": null,
"endStateCondition": null,
"authorisation": {
"authorisedRoles": ["ROLE_CITIZEN", "ROLE_AGENT"],
"authorisedUsers": null,
"systemAuthorised": false
},
"position": null,
"eventNames": null,
"eventConfigs": null
}